Jump to content
The simFlight Network Forums

jtitus

new Members
  • Posts

    3
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    KVPC

jtitus's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Martin - Sounds like you're doing everything I'm doing and I don't think GPSout.dll is required. Some basic sanity checks: Make sure you can ping your iPad's IP address from your PC to confirm basic network connectivity (pretty much confirmed via Xplane, but check anyway). Enable Lua logging by selecting Add-ons -> FSUIPC -> Logging and checking "Debug/Trace Lua plugins" and "Send to console window" from within FSX. Uncomment the debug print statement near the bottom of the Lua file to print the datagram, ip address and port. Start a flight in an area covered by Foreflight then Launch the Lua script. Reduce the size of your sim window so you can see the console window. Confirm via the console windows that the Lua script launches, the datagrams looks reasonable and that the IP address is correct. You should see a datagram being broadcast once per second and a 'MySim' GPS source listed on Foreflight's More->Devices page within 5 seconds of launching the Lua script. Hope that helps, -Joshua
  2. That's correct Pete. I'm not associated with Foreflight in any way, but I do use their app in my daily RW flying for their geo-referenced approach charts and as a backup moving map. I use FSX primarily to keep the rust off the procedural aspects of my instrument "skills", so the closer I can keep my sim flows to the real thing the better. FSUIPC plus Lua is powerful - thanks for the contribution and feel free to move my post wherever you see fit. Best, -Joshua
  3. Foreflight recently announced a new feature enabling flight sims to drive their latest ForeFlight Mobile™ app over a local netwwork as if the sim were an external GPS. http://www.forefligh...ort/network-gps I've enjoyed using Foreflight's app for years and I'm very impressed they would release this detailed, and admittedly nerdy, feature. So, using their new interface along with Pete's Lua suggestion earlier in this thread I've created a small Lua program to drive Foreflight running on an iPAD over your local network. This script works well during my limited testing, but of course, use at your own risk. I'm attaching my Lua file and copying the source here for your reference. You will need to update the ip address below to point to your iPad. (I'm sure this could be enhanced to use a broadcast packet to eliminate the IP requirement if one desired) A good tutorial on installing and executing a Lua module can be found here: http://www.anadrac.c...cuting Code.htm -- This Lua script polls FSX once per second for lat/lon, altitude, ground-speed and ground-track -- This info forms the datagram for a UDP packet which is broadcast over the local network -- to directly drive the popular Foreflight Mobile(tm) iPad application. -- This is possible only due to Foreflight's recent, and welcomed, addition of flight simulator support. -- Annoucement found here: http://www.foreflight.com/support/network-gps -- -- Appears to work great on my machine, but use at your own risk. socket = require("socket"); -- This port was designated by Foreflight local port = "49002"; -- Insert your iPad IP address here local ip = "xxx.xxx.xxx.xxx"; local udp = assert(socket.udp()); assert(udp:setsockname('*',0)); function getvars(time) local lat = ipc.readDBL(0x6010); local lon = ipc.readDBL(0x6018); local alt = ipc.readDBL(0x6020); local gs = ipc.readDBL(0x6030); local trutrack = math.deg(ipc.readDBL(0x6040) + ipc.readDBL(0x6028)); local datagram = string.format("%s, %0.3f, %0.3f, %0.1f, %0.3f, %0.1f","XGPSMySim",lon,lat,alt,trutrack,gs); -- print("Sending datagram " .. datagram .. " to " .. ip .. ", " .. port .." "); assert(udp:sendto(datagram, ip, port)); end -- Call getvars once per second event.timer(1000, "getvars"); [/CODE] Enjoy! XGPSMySim.zip
×
×
  • 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.