Avidyne Homepage
Forum Home Forum Home > Avidyne General > IFD 5 Series & IFD 4 Series Touch Screen GPS/NAV/COM
  New Posts New Posts RSS Feed - Workaround for IFD XP Trainer AP Bug
  FAQ FAQ  Forum Search   Register Register  Login Login

Workaround for IFD XP Trainer AP Bug

 Post Reply Post Reply Page  12>
Author
Message
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Topic: Workaround for IFD XP Trainer AP Bug
    Posted: 30 Nov 2022 at 1:13am
The IFD XP Trainer is an excellent tool for learning and developing proficiency with the IFD Navigator.

But it has 2 bugs that have bugged me for some time.

1 - It does not set the HSI course in GPS mode to the GPS desired track.  This keeps instruments like a G5 or G1000 or Aspen HSI from working as they do in the real world.  (you can work around this by manually setting the correct HSI course for every leg in your FP, kind of a PITA)

2 - When driving the Autopilot (like a GFC500 or STEC31), it sometimes does some crazy turns away from the GPS track for a few seconds (then comes back).

Both of these bugs take away from the immersion of the simulator and the learning process.

So I did a little debugging and figured out fixes to both these problems and wrote a AirManager instrument that fixes both of these problems for XPlane.

I exported the instrument and you can download it and import it into your own AirManager panel. (LINK)

Hope this helps some of you .. its made my time with IFD XP Trainer more enjoyable.
-----------------------------------------------------------

More info about what the workaround does

IFD XP writes the desired track to sim/cockpit/radios/gps_course_degtm, the workaround subscribes to this dataref and copies that value to sim/cockpit2/radios/actuators/hsi_obs_deg_mag_pilot, basically slewing the HSI to the GPS track when in GPS mode.

It also ignores values of -360 which is what i noticed gets written to gps_course_degtm when the IFD looses control of the AP, instead it keeps track of the last known good course, and writes that back into gps_course_degtm, avoiding a change in direction by the AP.

This workaround could probably be written as an XPlane plugin, but i already had airmanager, and fixing it there was easy.

-----------------------------------------------------------


Edited by ricardo - 01 Dec 2022 at 1:55am
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 22 Dec 2022 at 6:28pm
Thanks to Jack Walton there is now a xplane plugin that fixes these 2 bugs

" I wrote an X-Plane plugin that takes care of this issue as well. Unzip this folder and put it in the "X-Plane 11\Resources\plugins" folder."

https://drive.google.com/file/d/1DK5zcQbIWvXiLvGLQ90TZ7EW2PrVUs0l/view?fbclid=IwAR3mrwMeonoVxu8i7InnPBdX-_txhG3dBL5gvi0FF1tzgw6s1paeQTS3qfE


Edited by ricardo - 22 Dec 2022 at 6:31pm
Back to Top
doog View Drop Down
Groupie
Groupie


Joined: 27 Nov 2017
Location: KCCR
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote doog Quote  Post ReplyReply Direct Link To This Post Posted: 23 Dec 2022 at 1:59am
That's great thanks, of course it would be better if they'd just fix the bug...  although not before fixing the damn frequency reset pain in the butt !

Separate question - do you somehow have IFD trainer XP working within an air manager panel?  I mean do you have the training somehow rendering on a pc air manager panel instead of the ipad?  That would be way better for me since I have a touchscreen air manager panel and it would be cool to stick the IFD there like I do with the GTN. 

Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 23 Dec 2022 at 2:55am
negative -- 

I use airmanager for the other instruments (and a knobster) .. the IFD Trainer XP runs on an ipad mini 

I tried a few screen sharing apps to see if i could get IFD onto one of my touch panel monitors, but nothing worked better than having it on the ipad.

i am using a RAM mount on the edge of the desk so that the ipad sits between the yoke and the throttle quadrant .. so it works well.
Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (1) Thanks(1)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 24 Dec 2022 at 2:18pm
I updated my fix for this issue:
https://drive.google.com/file/d/1DK5zcQbIWvXiLvGLQ90TZ7EW2PrVUs0l/view?fbclid=IwAR3mrwMeonoVxu8i7InnPBdX-_txhG3dBL5gvi0FF1tzgw6s1paeQTS3qfE

Back to Top
rfriend View Drop Down
Newbie
Newbie


Joined: 15 Mar 2017
Location: Kbmg
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote rfriend Quote  Post ReplyReply Direct Link To This Post Posted: 27 Dec 2022 at 10:25am
I would love to try your fix but when I went to your link to download the plug-in - it said the file was in your trash. Thanks for your efforts on trying to correct the software.
Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Dec 2022 at 10:29am
Try this.
https://drive.google.com/file/d/1LWPZ81iurNexfPP9z75XyBKjmJrtqQBS/view?usp=share_link

Back to Top
rfriend View Drop Down
Newbie
Newbie


Joined: 15 Mar 2017
Location: Kbmg
Status: Offline
Points: 24
Post Options Post Options   Thanks (0) Thanks(0)   Quote rfriend Quote  Post ReplyReply Direct Link To This Post Posted: 27 Dec 2022 at 12:55pm
Got it. Thanks.Will work with it later today.
Back to Top
brou0040 View Drop Down
Senior Member
Senior Member


Joined: 13 Dec 2012
Location: KIYK
Status: Offline
Points: 720
Post Options Post Options   Thanks (0) Thanks(0)   Quote brou0040 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Dec 2022 at 8:35pm
I'm able to get the XP trainer on a windows PC and into VR using Vysor, but I don't have a touchscreen to test that.
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jan 2023 at 4:30pm
I have a problem with XP Trainer.

When I pause the xplane simulation, the proper CDI and course are displayed on the E1000 (aspen Evolution) from that which I have selected within the Trainer XP RNAV approach for example).  As soon as I un-pause, the GPS needle and CDI both disappear and I'm left with a  default GPS needle pointing to 13 degrees (no CDI). 

Ive checked the Network settings and everything seems to set correctly.  The frequencies match the GNS530 GPS unit that came with the aircraft. 

Xplane 12
VFly Arrow III with Aspen 1000

I have also loaded teh above fix into the plugin folder and it appears to loaded


Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jan 2023 at 4:50pm
In my experiments the XP trainer does not work with xPlane12, on 11.
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 09 Jan 2023 at 5:27pm
I was afraid of that.  Its so close!

Any idea if they are planning on updating it to work with XP12.

In your experiments, what issues did you find?
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 10 Jan 2023 at 3:41pm
Found a solution.

The GNS530 GPS that comes with the aircraft must be set to GPS not VLOC.  I pressed on the upper right button on the Trainer XP to switch out of VLOC but it would not.  When I pressed teh button on the GNS530, it switches to GPS and so does the trainer XP (in fact it switched to GPS -> LPV.  Then the procedure in the Trainer XP works. 


Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 11 Jan 2023 at 11:42am
oh right -- 

when you start Xplane -- you need to cycle between VLOC and GPS at least once so that the IFD XP Trainer properly overrides the GPS on board.
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 15 Jan 2023 at 5:06pm
One more thing, you have to start X-plane so that the aircraft is ready to fly before you turn on the IFD trainer xp app.  If you don't, the trainer will appear to connect but the gps/vloc will not toggle and the flight plans will not display within Xplane even though the comms freq sync.
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jan 2023 at 3:43am
there should be a FAQ about trainer xp with all this info
Back to Top
doog View Drop Down
Groupie
Groupie


Joined: 27 Nov 2017
Location: KCCR
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote doog Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jan 2023 at 7:54pm
I installed the bug fix plugin but it still doesn’t skew my hsi…. Also I don’t get any flight plan transfer from the ifd to the planes 530… should that work?
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 21 Jan 2023 at 10:44pm
no that not how the IFD trainer XP works --

you just use the trainer on the ipad as if it was your navigator and it will override the instruments and autopilot.

the nav 1 GNS on the airplane is unused.
Back to Top
doog View Drop Down
Groupie
Groupie


Joined: 27 Nov 2017
Location: KCCR
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote doog Quote  Post ReplyReply Direct Link To This Post Posted: 22 Jan 2023 at 11:43pm
ok... the HSI in the plane follows the default GPS not the IFD on the iPad.  Is this fix supposed to solve that?  I copied the win.xpl file to the Resources/Plugins folder.



Edited by doog - 22 Jan 2023 at 11:43pm
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 23 Jan 2023 at 8:14pm
we identified a few problems with the xp trainer .. and i made an airmanager instrument that fixes it -- jwalton49 made an xplane plugin with the same (though i do not use the plugin).

make sure you cycle the airplane from NAV to LOC to NAV at startup to get the IFD XP a chance properly take over the plane navigation.
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 25 Jan 2023 at 5:22pm
Don't forget to check your wifi network.. It has to be on the same network as the xplane.  The ipad seems to change all by itself because sometimes I can't get the trainer xp to link up even though it's dedicated to the xplane. Then as soon as I remember to check the network, it links right up.
Back to Top
doog View Drop Down
Groupie
Groupie


Joined: 27 Nov 2017
Location: KCCR
Status: Offline
Points: 73
Post Options Post Options   Thanks (0) Thanks(0)   Quote doog Quote  Post ReplyReply Direct Link To This Post Posted: 26 Jan 2023 at 12:08am
Definitely on the same wifi, everything works except the HSI.  I tried the plugin and the air-manager instrument.  In both cases the HSI points somewhere random and does not even move with the CRS selector.  Also Aspen HSI on Airmanager glitches back and forth.  I'll try to dig into the data refs when I get some time.  Might be because I'm using Xplane12. 



Edited by doog - 26 Jan 2023 at 12:21am
Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 28 Jan 2023 at 12:31pm
For xPlane 12 you must have 'Send network data ouput' checked on the Settings | dataoutput screen. Apparently this is not a default setting.
Back to Top
Mikey View Drop Down
Newbie
Newbie
Avatar

Joined: 01 Mar 2023
Location: California
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote Mikey Quote  Post ReplyReply Direct Link To This Post Posted: 02 Mar 2023 at 10:45am
Many thanks for the Air Manager work around, I installed and it worked great ending the long frustration of manually setting the course.  One question if someone knows the answer:

Does IFD trainer send the active GPS waypoint name and distance to x-plane? The x-plane PFD (e.g. Avidyne Entegre) displays the active waypoint and distance, but they are not the current data from IFD trainer. It seems DataRef “sim/cockpit2/radios/indicators/gps_nav_id” is from the build-in Garmin 430 GPS nav. 


Back to Top
Jmfmem View Drop Down
Newbie
Newbie


Joined: 05 May 2020
Location: Memphis,TN
Status: Offline
Points: 22
Post Options Post Options   Thanks (0) Thanks(0)   Quote Jmfmem Quote  Post ReplyReply Direct Link To This Post Posted: 22 Mar 2023 at 3:57pm
Hey Ricardo, 
Thanks for working on this.  I am trying to install your instrument in Air Manager.  I imported the file into Air Manager but I can't see an "instrument" to use.  I think I am not understanding on how to implement this workaround in Air Manager.  I have used Airmanager for other panels and instruments but can't get this working.  
Thanks
John Freeman
Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 23 Mar 2023 at 6:39pm
The Avidyne trainer does not send active waypoint information to xPlane. There should not be a flight plan loaded into xplane.
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 1:07am
Instructions on how to use an exported Instrument with AirManager.

1 - Download the .siff file from the link at the top post of this thread.
2 - on airmanager, go to the Create/Edit tab
3 - select import, and select the SIFF file you downloaded
4 - a new instrument should now exist called "IFD Trainer Patch"

If you to your panel, and then add an instrument you should be able to search for the "IFD Trainer Patch" and it will be added to your panel.

That should be it.

Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 1:08am
If for whatever reason someone can't get the import to work on air manager, here is the code for the instrument, and you can create a new instrument yourself.

-- --------------------------- START --------------

-- Global variable to store the last known good course.
last_course = 0.0

-- Callback, receives data updates from XPlane
function new_ifd_data(state, course)
    -- If we're not in GPS mode, ignore the course update.
    if (state == 0) then
        return
    end
    
    -- Sometimes we get a crazy course of -360, this is a bug in the IFD XP Trainer, that looses control of XPlane.
    -- Ignore those updates, and write the last known good course to XPlane to regain control of the autopilot.
    if (course == -360.0) then
        xpl_dataref_write("sim/cockpit/radios/gps_course_degtm", "FLOAT", last_course)
    else
        -- Calculate the absolute course. (0-359)
        local abs_course = 0.0
        if (course < 0.0) then
            abs_course = 360 + course
        else
            abs_course = course
        end
    
        -- Write the new course to the hsi obs, this basically slews the HSI to the GPS course, as it
        -- should be.
        last_course = course
        xpl_dataref_write("sim/cockpit2/radios/actuators/hsi_obs_deg_mag_pilot", "FLOAT", abs_course)   
    end
end

-- Subscribe to updates to the HSI source, and the GPS course.
-- IFD XP Trainer will write to the GPS course.
xpl_dataref_subscribe("sim/cockpit2/radios/actuators/HSI_source_select_pilot", "INT",
                       "sim/cockpit/radios/gps_course_degtm", "FLOAT", new_ifd_data)

mytext1 = txt_add("IFD XP Trainer Patch", "size:18; color: black;", 15, 15, 200, 200)

Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 1:10am
Originally posted by Mikey Mikey wrote:

Many thanks for the Air Manager work around, I installed and it worked great ending the long frustration of manually setting the course.  One question if someone knows the answer:

Does IFD trainer send the active GPS waypoint name and distance to x-plane? The x-plane PFD (e.g. Avidyne Entegre) displays the active waypoint and distance, but they are not the current data from IFD trainer. It seems DataRef “sim/cockpit2/radios/indicators/gps_nav_id” is from the build-in Garmin 430 GPS nav. 



I've been tempted to get access to the SDK for the IFD, and create a plugin, or instrument that would make the active waypoint and distance work properly. -- i think it would be rather straight forward, 

1 - get waypoint from IFD
2 - inject it in xplane in the correct dataref


Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 10:31am
How would you get the SDK for the IFD?
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 2:14pm
I think you just ask for it .. 
Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 2:21pm
I don’t think Avidyne has an SDK for their apps. I have the xPlane SDK.
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 27 Mar 2023 at 4:09pm
I mean avisdk -- http://avidynelive.com/where-to-get-avisdk_topic2344.html
Back to Top
Melohn View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 Dec 2013
Location: PHNL
Status: Offline
Points: 140
Post Options Post Options   Thanks (0) Thanks(0)   Quote Melohn Quote  Post ReplyReply Direct Link To This Post Posted: 12 Apr 2023 at 2:17am
I found that the IFD trainerXP works as expected with the C172 (non-G1000) in X-Plane 12 pretty well. 

There is one problem; the glide slope on the Nav1 display when driven by the iPad is flagged, so the X-Plane 12's S-tec emulation won't track the VDI, although it tracks the CDI without problems. The VDI actually provides the correct deviation right down to the .1 nm distance from the final, so fixing this should be very simple, as it only effects the autopilot. 

None of the G1000 based APs work. I haven't been able to get them to work with X-Plane 11 either. 


Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 22 Apr 2023 at 2:27pm
Originally posted by jwalton49 jwalton49 wrote:

For xPlane 12 you must have 'Send network data ouput' checked on the Settings | dataoutput screen. Apparently this is not a default setting.


Do I use the default 0.1 IP address or teh IP address of my ipad
Back to Top
CalumAARI View Drop Down
Newbie
Newbie


Joined: 14 Jun 2023
Location: Reno, NV
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote CalumAARI Quote  Post ReplyReply Direct Link To This Post Posted: 14 Jun 2023 at 2:32pm
Originally posted by ricardo ricardo wrote:

The IFD XP Trainer is an excellent tool for learning and developing proficiency with the IFD Navigator.

But it has 2 bugs that have bugged me for some time.

1 - It does not set the HSI course in GPS mode to the GPS desired track.  This keeps instruments like a G5 or G1000 or Aspen HSI from working as they do in the real world.  (you can work around this by manually setting the correct HSI course for every leg in your FP, kind of a PITA)

2 - When driving the Autopilot (like a GFC500 or STEC31), it sometimes does some crazy turns away from the GPS track for a few seconds (then comes back).

Both of these bugs take away from the immersion of the simulator and the learning process.

So I did a little debugging and figured out fixes to both these problems and wrote a AirManager instrument that fixes both of these problems for XPlane.

I exported the instrument and you can download it and import it into your own AirManager panel. (LINK)

Hope this helps some of you .. its made my time with IFD XP Trainer more enjoyable.
-----------------------------------------------------------

More info about what the workaround does

IFD XP writes the desired track to sim/cockpit/radios/gps_course_degtm, the workaround subscribes to this dataref and copies that value to sim/cockpit2/radios/actuators/hsi_obs_deg_mag_pilot, basically slewing the HSI to the GPS track when in GPS mode.

It also ignores values of -360 which is what i noticed gets written to gps_course_degtm when the IFD looses control of the AP, instead it keeps track of the last known good course, and writes that back into gps_course_degtm, avoiding a change in direction by the AP.

This workaround could probably be written as an XPlane plugin, but i already had airmanager, and fixing it there was easy.

-----------------------------------------------------------

Hey Ricardo, sounds like you're quite a whizz with this coding stuff!
I tried the xplane plugin and the air manager thing but neither worked for my situation (It would grab the course for the first couple of waypoints but then forget them and would be stuck at 000 and unable to move it with the CRS knob) 
But im using something different than the training app, Im using a real IFD550 that avidyne gave me some test software that integrates it into xplane (It's mostly complete but the guy who wrote the code isn't there anymore) I'm also using air manager and that's a bit of a nightmare in itself- it seems almost every HSI/CDI instrument has at least one glitch so I'm trying to build just one or two nav instruments that are capable of displaying both VLOC ILS and a GPS LPV. 
I'm not a coder at all but I've been able to fumble my way through a couple of things. I'm trying to get to the stage where we are the first in the world to get an avidyne IFD in an FAA AATD certified simulator. Would you (Or any other code savvy people) be able to help me? 


Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (0) Thanks(0)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 16 Jun 2023 at 10:53pm
holy cow .. that is an awesome setup.  

i would like to help, not sure i can .. but let me know what i can do.

they (avidyne) must have used different code to connect the real deal to xplane vs the trainer.  (otherwise the fix i amde might have worked right?) 

the way i debugged the trainer was i i watched the values of the data refs as i flew around with the GPS controlling the AP and took note of the problems when it lost control of the AP ..  when i found the problem pattern i was able to override that pattern with the air manager instrument.

i’d think you would need to reverse engineer how your IFD is communicating with xplane (is it the using those same data refs that i found or different ones?) .. and perhaps find a simple way to make it work.  i’m no plane plugin / air manager developer, so there might be better ways to do this.

wish you were nearby (i’m in WA) .. would love to see that setup you have and help.
Back to Top
Bobynette View Drop Down
Newbie
Newbie


Joined: 17 Oct 2021
Location: Cyqb
Status: Offline
Points: 2
Post Options Post Options   Thanks (0) Thanks(0)   Quote Bobynette Quote  Post ReplyReply Direct Link To This Post Posted: 18 Jun 2023 at 9:15pm
Hi folk, just installed X Plane 12 and I’m unable to transfer flight plan from IFD Trainer app to the Xplane Garmin 530. I’m able to switch CDI (GPS-LOC) and change frequencies but the flight plan and active waypoint isn’t transferring to the simulator. I activated ‘Send network data output’ and didn’t help. Any idea?
Best regards 
Back to Top
trinav1 View Drop Down
Newbie
Newbie


Joined: 05 Apr 2023
Location: New York
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote trinav1 Quote  Post ReplyReply Direct Link To This Post Posted: 30 Aug 2023 at 4:21pm
I'm setting up an X-Plane 11 sim with Air Manager instruments for my Socata Trinidad, and using the Avidyne XP trainer. Had the same issue with the G5 HSI acting wacky as described in the original post. I grabbed a copy of Ricardo's instrument that fixes the two bugs and all worked great. Then I accidentally resized the image of the "instrument" and it broke. I don't know why, but if you resize the image that goes with the bug fix, it ceases to work. Just FYI in case anyone else runs into this.
BTW, thanks for making the bug fix, Ricardo. Brilliant!
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 09 Sep 2023 at 2:35pm
Is the IFD trainer issue of not pushing the FP to the Garmin 530 and not showing the FP on the Aspen an XP12 issue?

All the sposts that say Ricardo's air manager fix worked are citing XP11.

I installed XP12, have the trainer on an ipad connected tot he same network. Installed Richardo's fix.  The location of the aircraft is found, the Comms sync with the Garmin 530 in the aircraft but any FP I enter is completely ignored by the Aspen.  The track tot he destination is not displayed (on the Aspen)

Ricardo, are you planning on addressing this issue?




Edited by cavu - 09 Sep 2023 at 2:37pm
Back to Top
trinav1 View Drop Down
Newbie
Newbie


Joined: 05 Apr 2023
Location: New York
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote trinav1 Quote  Post ReplyReply Direct Link To This Post Posted: 09 Sep 2023 at 2:43pm
The thing I keep forgetting to do is turn on the autopilot switch (lower middle on my Trinidad), and tell the 530 to run GPS mode, not NAV mode. On my Trinidad there's a button near the autopilot switch that I can click that does the same thing - switch between NAV and GPS. If you don't switch, then Xplane ignores the input from the Avidyne completely.
Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 12 Sep 2023 at 10:13am
The Aspen has a GPSS button but that is the only "switch".  The 530, if used alone, provides the FP and indicator needles with or without pressing GPSS on the E1000.  Its when I use the IFD Trainer, that it doesn't work.  I will try a different Aspen E1000 as the one I am using was on the panel of the vFlyte Arrow aircraft.  Perhaps the generic E1000 within Air Manager will work better.
Back to Top
trinav1 View Drop Down
Newbie
Newbie


Joined: 05 Apr 2023
Location: New York
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote trinav1 Quote  Post ReplyReply Direct Link To This Post Posted: 12 Sep 2023 at 1:59pm
cavu - My understanding of the GPSS button on the G5 is to select GPS steering from a non-Garmin autopilot, such as the Avidyne. I'm guessing the Aspen E1000 performs the same way a couple of G5's would, one a PFD and one an HSI. If you're using the Garming 530 as autopilot with G5's, apparently there is no need for a GPSS button at all, since it's all Garmin equipment.

What aircraft are you flying in Xplane 12? Does it have the stock Garmin 530 in the panel?

Back to Top
cavu View Drop Down
Senior Member
Senior Member


Joined: 17 Apr 2015
Location: KRME
Status: Offline
Points: 152
Post Options Post Options   Thanks (0) Thanks(0)   Quote cavu Quote  Post ReplyReply Direct Link To This Post Posted: 12 Sep 2023 at 4:18pm
I have the VFlyte Arrow III for XP12

It has its own E1000 and a Garmin 530 which you can pop out to use on air manager panels

If I use their E1000, and FP using their Garmin 530, from KRME to KSYR I get a display on the E1000 that points to KSYR and the CDI is left of centerline which would be correct.  The FP path (magenta) is not shown on the E1000 but KSYR displays on the lower half of the E1000.

If I program the FP using the IFD Trainer, (GPS toggled in the upper right corner of the IFD) then it points to KSYR, but the CDI needle is rapidly switch back and forth from the CRS setting and the GPS desired track.  The FP path does not appear on the G530 no matter what I do.  Also, KSYR does not appear in the lower half of the E1000 but the CRS of 012 does appear.  GPS1 appears above this.

If I use the Air Manager Aspen E1000 instrument, it only points to the destination once if I enter using the IFD trainer.  If I change the destination it doesn't point to the new destination but to the CRS setting even though GPS is selected on the E1000 and the IFD Trainer.  Using the IFD Trainer, the KSYR identifier does not appear on lower half of the display below GPS1, just 012 deg (which is the CRS setting and not the heading to the destination).  The flashing between the CRS and GPS track does not happen as fast as the the VFlyte 1000 but it does occur every minute or so.

If I use the G530 to enter a FP, both Aspens work fine, KSYR appears with only one CDI needle appearing and no flashing of the CDI between the CRS and GPS.

I have a video but not sure how to submit.

I've tried to describe it as best I can so maybe someone will recognize the problem. 
Back to Top
trinav1 View Drop Down
Newbie
Newbie


Joined: 05 Apr 2023
Location: New York
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote trinav1 Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 2023 at 9:53am
On the topic of bugs in the Avidyne IFD trainer, does anyone else have the problem of holds not being flown properly? It seems most of the time when I have a hold in an approach or at the end of a missed, the plane doesn't follow the defined hold. It will turn the wrong way, make up it's own hold pattern, or just not hold at all.
Is it just me?
Back to Top
ricardo View Drop Down
Senior Member
Senior Member


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 134
Post Options Post Options   Thanks (1) Thanks(1)   Quote ricardo Quote  Post ReplyReply Direct Link To This Post Posted: 05 Oct 2023 at 11:05am
yup .. same. here .. the IFD xp trainer doesn’t fly holds properly (or procedure turns) .. 

so i just switch over to HDG and fly lead the plane around the hold in xplane.
Back to Top
ch_dupre View Drop Down
Newbie
Newbie


Joined: 22 Jan 2022
Location: UK
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote ch_dupre Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2024 at 7:21pm
Hi @jwalton49,
would you be willing to share the code for your plugin. I'd like to try it, but i'm on linux
Back to Top
Melohn View Drop Down
Senior Member
Senior Member
Avatar

Joined: 11 Dec 2013
Location: PHNL
Status: Offline
Points: 140
Post Options Post Options   Thanks (1) Thanks(1)   Quote Melohn Quote  Post ReplyReply Direct Link To This Post Posted: 20 Feb 2024 at 10:06pm
Originally posted by trinav1 trinav1 wrote:

On the topic of bugs in the Avidyne IFD trainer, does anyone else have the problem of holds not being flown properly? It seems most of the time when I have a hold in an approach or at the end of a missed, the plane doesn't follow the defined hold. It will turn the wrong way, make up it's own hold pattern, or just not hold at all.
Is it just me?

This is a problem with the X plane Auto Pilot, not the IFD Trainer. If you put the AP in GPSS mode, assuming your aircraft supports this, it will track holds, procedure turns, and DME Arcs without problems. if you don't have GPSS mode, then you are out of luck.

Back to Top
jwalton49 View Drop Down
Newbie
Newbie


Joined: 11 Sep 2018
Location: TEXAS
Status: Offline
Points: 27
Post Options Post Options   Thanks (0) Thanks(0)   Quote jwalton49 Quote  Post ReplyReply Direct Link To This Post Posted: 21 Feb 2024 at 10:01am
//here is the plugin code. I basically took Ricardo's fix and wrote it in C. sorry for the delay. I just started getting email notifications a couple of days ago. Not sure why they stopped.
 
    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include "XPLMDataAccess.h"
    #include "XPLMPlugin.h"
    #include "XPLMProcessing.h"
    #include "XPLMUtilities.h"
 
    static XPLMDataRef  hsiSource;
    static XPLMDataRef  gps_course_degtm;
    static XPLMDataRef  hsi_obs_deg_mag_pilot;
   // static XPLMDataRef dataRefHsi_obs_deg_mag_pilot;
    //variable to store the last known good course.
    static float  last_course = 0.0;

 
    float MyFlightLoopCallback(
        float                inElapsedSinceLastCall,
        float                inElapsedTimeSinceLastFlightLoop,
        int                  inCounter,
        void* inRefcon);
 
     PLUGIN_API int XPluginStart(
                                                char *          outName,
                                                char *          outSig,
                                                char *          outDesc)
     {
        strcpy(outName, "FixAvidyneTrainerBug");
        strcpy(outSig, "nyrs.avidyne.bugfixes");
        strcpy(outDesc, "A plugin fixes bugs in Avidyne Trainer.");

        gps_course_degtm = XPLMFindDataRef("sim/cockpit/radios/gps_course_degtm");
        hsiSource = XPLMFindDataRef("sim/cockpit2/radios/actuators/HSI_source_select_pilot");
        hsi_obs_deg_mag_pilot = XPLMFindDataRef("sim/cockpit2/radios/actuators/hsi_obs_deg_mag_pilot");

        XPLMRegisterFlightLoopCallback(
            MyFlightLoopCallback, /* Callback */
            1.0, /* Interval */
            NULL); /* refcon not used. */
        return 1;
     }
 
 
    PLUGIN_API void XPluginStop(void)
    {
     
    }
 
 
    PLUGIN_API int XPluginEnable(void)
    {
        return 1;
    }
 
 
    PLUGIN_API void XPluginDisable(void)
    {
 
    }
 
 
    PLUGIN_API void XPluginReceiveMessage(
                    XPLMPluginID inFromWho,
                    long inMessage,
                    void * inParam)
    {

    }
    
    float MyFlightLoopCallback(
        float                inElapsedSinceLastCall,
        float                inElapsedTimeSinceLastFlightLoop,
        int                  inCounter,
        void* inRefcon)
    {
        char buffer[256];
        float abs_course = 0.0;

        int navSource = XPLMGetDatai(hsiSource);
        if (navSource == 0) // if not in GPS mode, just return
        {
            return 1.0;
        }

        float course = XPLMGetDataf(gps_course_degtm);
        sprintf(buffer, "Avidyne GPS course - %f\n", course);
        //XPLMDebugString(buffer);
       
        if (course == -360)
        {
            XPLMSetDataf(gps_course_degtm, last_course);
        }
        else
        {
            abs_course = 0.0;
            if (course < 0.0)
            {
                abs_course = 360 + course;
            }
            else
            {
                abs_course = course;
            }
            last_course = course;
            XPLMSetDataf(hsi_obs_deg_mag_pilot, abs_course);
        }
        sprintf(buffer, "Avidyne Heading - %f\n", abs_course);
       // XPLMDebugString(buffer);
        /* Return 1.0 to indicate that we want to be called again in 1 second. */
        return .25;
    }
Back to Top
ch_dupre View Drop Down
Newbie
Newbie


Joined: 22 Jan 2022
Location: UK
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote ch_dupre Quote  Post ReplyReply Direct Link To This Post Posted: 21 Feb 2024 at 6:07pm
Thanks a lot for that.

It only worked when I paused the simulator at first.
Eventually I switch the IFD to VLOC and back to GPS and it then it worked.
Back to Top
 Post Reply Post Reply Page  12>
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.01
Copyright ©2001-2018 Web Wiz Ltd.

This page was generated in 0.195 seconds.