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
Author
Message
ricardo View Drop Down
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 69
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 26
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: 26
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: 715
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: 137
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: 26
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: 137
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: 137
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 137
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 69
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 69
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 137
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: 69
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: 26
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: 18
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: 26
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 26
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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: 26
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
Groupie
Groupie


Joined: 17 Jan 2022
Location: Seattle, wa
Status: Offline
Points: 82
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
Groupie
Groupie
Avatar

Joined: 11 Dec 2013
Location: PHNL
Status: Offline
Points: 80
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: 137
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
 Post Reply Post Reply
  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.117 seconds.