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.
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