August 26, 200916 yr Are there HSIs written in XML code? The reason I ask is that I flew a machine for about 5 years that was equipped with duals HSIs. Any existing HSIs for FS are coupled to nav 1. Is it possible to reprogram an HSI guauge (assuming its XML) to couple to nav 2? If not then I will live with what I have. Oh, well.Paul
August 26, 200916 yr Hi,As far as i know, it is possible in fs9.Jan Jan "Beatus ille qui procul negotiis..."
August 26, 200916 yr Moderator Yes, it is relatively easy to accomplish.However, bear in mind that the default HSI_xxx variables are all tied to GPS/NAV1. You would simply need to substitute variables that're related to NAV2 instead...NAV CDI:2 in place of HSI CDI NEEDLENAV GSI:2 in place of HSI GS NEEDLEetc. Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
August 29, 200916 yr Author I was successful in getting the HSI to work on NAV2. This is part of the code I used.<value>(A: NAV2 CDI:2 needle vaild, bool) (More here) <value> Same with the glideslope. The issue for me now is how to get the AP to integrate to nav2. I am not a C programmer and can barely modify XML stuff.Paul
August 29, 200916 yr Moderator I was successful in getting the HSI to work on NAV2. This is part of the code I used.<value>(A: NAV2 CDI:2 needle vaild, bool) (More here) <value> Same with the glideslope. The issue for me now is how to get the AP to integrate to nav2. I am not a C programmer and can barely modify XML stuff.Paul AP_NAV_SELECT_SET Sets the nav (1 or 2) which is used by the Nav hold modesNAV1 is the default source. To enable NAV2 as the source, the following will {a} set the source to NAV2 and {b} turn on the lateral hold mode. <Click> 2 (>K:AP_NAV_SELECT_SET) (>K:AP_NAV1_HOLD)</Click> To restore NAV1 as the source, simply re-set the situation <Click> 1 (>K:AP_NAV_SELECT_SET) (>K:AP_NAV1_HOLD)</Click> Actually, thank you very, very much for asking this question! It reminds me that I need to modify a current project to enable NAV2 to drive the autopilot! :( What I'll do is integrate the command 2 (>K:AP_NAV_SELECT_SET) into my EHSI script. Whenever the ESHI is set for NAV2 as the source for display, it will also send the command 2 (>K:AP_NAV_SELECT_SET) to set the AP's lateral hold mode to use NAV2 as the source for lateral navigation.Similarly, when NAV1 is selected as the EHSI source, a command 1 (>K:AP_NAV_SELECT_SET) will be issued to return to the default lateral nav mode.The above only illustrate the sequence of the commands. Obviously there are more elegant methods, which may be scripted... ;) Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
August 29, 200916 yr Moderator Here is the "solution" for my current EHSI's mouse routine: <Click> (L:CDI_Select,enum) 1 + (>L:CDI_Select,enum) (L:CDI_Select,enum) 2 > if{ 0 (>L:CDI_Select,enum) } (L:CDI_Select,enum) 0 == (A:GPS drives nav1, bool) 0 == and if{ (>K:TOGGLE_GPS_DRIVES_NAV1) } (L:CDI_Select,enum) 1 == (A:GPS drives nav1, bool) 1 == and if{ (>K:TOGGLE_GPS_DRIVES_NAV1) } (L:CDI_Select,enum) 1 == if{ 1 (>K:AP_NAV_SELECT_SET) } (L:CDI_Select,enum) 2 == if{ 2 (>K:AP_NAV_SELECT_SET) }</Click> Where (L:CDI_Select,enum) has the following selections:0 = GPS source/steering of ap hold1 = NAV1 source/steering of ap hold2 = NAV2 source/steering of ap holdThe "key" to how this works is that merely selecting the source for the EHSI has no affect whatever unless the ap is commanded to perform a NAV1 Hold... :(Normally, I wouldn't bother explaining in so much detail, but since you are "new" to the process, I'll be a bit more verbose than usual...1. All commands within a <Click></Click> statement are executed in strict sequence whenever invoked by a mouse click.2. The first two commands simply cycle the (L:CDI_Select,enum) variable throught the sequence: 0,1,2,0,1,2,0,1,2... ad infinitum.3. The next two commands ensure that the (A:GPS drives nav1, bool) variable remains in synch with the selected source.4. The final two commands (newly added) ensure that if NAV1 is the source selected, the ap will use that source, or if NAV2 is the source selected, the ap will use that source.Simple, eh? :( Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
September 1, 200916 yr Author Bill, Thanks for the heads up. My previous post about the gauge wroking was really in error. I think I have gotten myself in trouble. The issues I face now are: The heading bugs on both HSIs are linked. The t/f flags also are linked . The CDI on the one I am working on will not deflect. The unit Iam trying to convert to nav2 was downloaded from avsim (KI525) was made for a payware plane. I have been comparing the code with the one from the Baron HSI. What symbol do I use to coment out lines ofcode? will // do?Paul (w3tzi)still learning.
September 1, 200916 yr Moderator What symbol do I use to coment out lines ofcode? will // do?Paul (w3tzi)still learning.To comment out XML script, you must use these symbols (highlighted below in red):<!-- This a comment -->There is of course a separate Key_ID command for the NAV2 OBI...You can use a structure in the <Mouse> <Click> routine to dynamically select which Key_ID event to use...In the example below, if NAV2 is selected as the steering source, then the knob will invoke the VOR2_OBI_INC or _DEC commands, otherwise will use VOR1_OBI_INC or _DEC commands.VOR1 (NAV1) and GPS both use the VOR1_OBI_INC and _DEC command set. <!-- ======================= CRS KNOB VOR1 =========================== --> <Area Left="923" Top="262" Height="14" Width="32"> <Tooltip>CRS ADJ</Tooltip> <Cursor Type="DownArrow"/> <Click Repeat="Yes"> (L:CDI_Select,enum) 2 == if{ >K:VOR2_OBI_DEC) } els{ (>K:VOR1_OBI_DEC) } </Click> </Area> <Area Left="937" Top="262" Height="14" Width="32"> <Tooltip>CRS ADJ</Tooltip> <Cursor Type="UpArrow"/> <Click Repeat="Yes"> (L:CDI_Select,enum) 2 == if{ >K:VOR2_OBI_INC) } els{ (>K:VOR1_OBI_INC) } </Click> </Area> Fr. Bill AOPA Member: 07141481 AARP Member: 3209010556 Avsim Board of Directors | Avsim Forums Moderator
Create an account or sign in to comment