Jump to content
The simFlight Network Forums

charlie172sierra

new Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    United States

charlie172sierra's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hello Pete, I did exactly as you said, using the Liar Lua as a template, and now have the Flight Illusion GSA40 Directional Gyro reporting the magnetic heading and properly possessing the stability of a gyrocompass. Thanks much for your advice! I cut & pasted the code below in case anyone else has this issue (of course, if you see coding glitches or inefficiencies, please comment if you wish.) -- "spoofMH4TH" is a Lua plug-in for FSUIPC4 -- that spoofs magnetic heading as true heading for FSUIPC clients. -- Adapted from Pete Dowson's "Liar" Lua by charlie172sierra -- PROBLEM: -- Flight Illusion's GSA40 Directional Gyro can only indicate true heading with the desirable -- characteristic of gyro stability but with the huge drawback of not indicating magnetic heading, OR -- desirably indicate magnetic heading but with the huge drawback of having all of the lags -- associated with a whiskey compass. -- SOLUTION: -- Use Lua plug-in to read magnetic variation and true heading, compute magnetic heading, and -- spoof magnetic heading as true heading for Flight Illusion's gauges Control Program V 7.0.8 -- (the FSUIPC client.) Flight Illusion's GSA40 Directional Gyro will then indicate magnetic -- heading despite "thinking" that it is still indicating the true heading. -- NOTES: -- This is a work-around for my inability to enable the encoders on the GSA40 Directional Gyro. -- Were the encoders enabled, I'd simply adjust the DG heading to match the whiskey compass -- heading (like compensating for gyro drift.) -- Flight Illusion's Control Program 7.0.8 identifies true heading as "real heading" in the configuration -- window for the GSA40. -- Within FSUIPC (enabled in registered version only), user must define a key press that -- activates "Lua spoofMH4TH". It may also be desirable to define a different -- key press that toggles: "LuaToggle spoofMH4TH". -- ****************** Begin main routine ******************************** -- Loop till flag 0 is set (setting 0 can be done by toggling the Lua off) while ipc.testflag(0) == false do -- ***** read magnetic variation & true heading ***** mv, th = ipc.readStruct( 0x02A0, "1SW", 0x0580, "1UD") -- ***** convert from FS units to aviation units ***** mv = mv * 360 / 65536 th = th * 360 / (65536 * 65536) -- ***** determine magnetic heading ************** mh = th - mv -- ***** convert from aviation units to FS units ***** mh = (mh / 360) * (65536 * 65536) -- ***** spoof magnetic heading as true heading **** ipc.writeStruct(0x0024,"1UW",0x0580,"1UW",4,"1UD",mh) -- Sleep for 50 mSecs so the update gets done roughly 20 times per second ipc.sleep(50) end -- ****************** end main routine ******************************** -- Lua was toggled off -- Now undo the overrides (otherwise they'll take about 12 seconds to die, with frozen values provided!) ipc.writeStruct(0x0024,"1UW",0x0580,"1UW",0) Thanks again - FSUIPC helped me resolve a really annoying 3rd party hardware&software issue! David
  2. Hello Pete, Thanks for the quick reply. I definitely agree that it is a Flight Illusion driver issue and I am hoping that one of their personnel will respond to a posting I put within their customer support forum (which resides within the simFlight forum.) That said, I think their customer support staff probably consists of one person who also does R&D, manufacturing, marketing and accounting...so the response time is often longer than ideal. I will school myself on what a Lua is, tinker with the files associated with Flight Illusion's controller program, and maybe track down the offset parameterization and alter it to read the magnetic heading from FSUIPC's output. I am already sure that it cannot be configured from using the menus within Flight Illusion's control program. I will post here if I find a quick resolution, otherwise I've got some learning to do by perusing the forum before I will be able to comprehend the "spoofing" solution. Thanks again, David
  3. Hello Mr. Dowson & fellow simmers, I have recently upgraded to the registered version of FSUIPC (version 4.7 I believe) in the hopes of tweaking the FSUIPC data output to the Flight Illusion Simulator Control Program Version 7.0.8. Flight Illusion's gauges require both the FSUIPC and FI software to complete the interface between FSX and FI's gauges. Specifically I have the following problem: The GSA40 Directional Gyro is reporting the true heading instead of the magnetic heading. Flight Illusion's software allows monitoring the received values of both magnetic heading and true heading (among several other flight characteristics.) Furthermore, FI's software can force the gyro to report the compass heading (a.k.a. magnetic heading) but with the following huge drawback: the gryo mimics all of the lags associated with a whiskey compass. What I would like to do, if possible, is configure FSUIPC to send the magnetic heading value in place of the true heading value. That is, Flight Illusion's software thinks it is receiving the true heading from FSUIPC when in fact FSUIPC is sending it the magnetic heading. Is such a programming trick possible? I realize that there would be another work-around. I would simply use the heading encoder to adjust the GSA40 to match the FSX simulated whiskey compass' heading, like what is necessary to do to correct for gyro drift. Alas, I cannot get the encoder to function so I'm unable to do this (I'm waiting to hear back from FI or other simmers in a different posting within Flight Illusion's forum pages in the simFlight website.) So, for now, I have to either endure a gyrocompass with gyro stability always reporting the true heading, or a gyro that reports magnetic heading but exhibits all of the lags of a whiskey compass. I am no expert at computer programming (I have minimal experience with Visual Basic) and am certainly no flight expert (I've only just begun flight school -- best decision in my life!), so I understand that I may be in error in my understanding of the situation. Any advice or comments would be greatly appreciated! Thanks much, David
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.