Board index FlightGear Support Interfacing

Foreflight support?

Connecting two computers, using generic protocol, connecting with Matlab?

Foreflight support?

Postby @ns1bl3 » Fri Aug 24, 2012 4:01 pm

Hi,

Now x-plane supports foreflight, a good iPhone planning tool used by real pilots.
http://www.x-plane.com/2012/08/foreflig ... FFID=83402

It would be cool to have this in flightgear too ^^

Thanks
@ns1bl3
 
Posts: 10
Joined: Tue Aug 21, 2012 2:39 pm

Re: Foreflight support?

Postby Hooray » Fri Aug 24, 2012 4:17 pm

what is needed on the interfacing side?
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Foreflight support?

Postby @ns1bl3 » Fri Aug 24, 2012 4:32 pm

I'm not a dev so I cannot say. Someone with a dev knowledge and an iPhone can perhaps try the thing.
@ns1bl3
 
Posts: 10
Joined: Tue Aug 21, 2012 2:39 pm

Re: Foreflight support?

Postby mnewbery » Wed Dec 28, 2016 9:13 am

My first post. I created a generic protocol that works with FGFS 2.6.0 and the latest demo of Foreflight on the iPad wirelessly. I have no idea how to attach the XML either as a file or text. Next I will be doing the same of OzRunways which uses the X-Plane format
mnewbery
 
Posts: 9
Joined: Wed Dec 28, 2016 8:54 am

Re: Foreflight support?

Postby Johan G » Wed Dec 28, 2016 4:40 pm

mnewbery wrote in Wed Dec 28, 2016 9:13 am:I have no idea how to attach the XML either as a file or text.

If it is not a too big file you could add it between [code] tags in a forum post (you can type them or use the [>_ ] button above the text edit box).
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Foreflight support?

Postby mnewbery » Thu Feb 09, 2017 4:32 am

Code (foreflightprotocol.xml): Select all
<?xml version="1.0"?>

<PropertyList>

<generic>

<output>
<line_separator>newline</line_separator>
<var_separator>,</var_separator>

<chunk>
<name>LinePreamble</name>
<format>XGPSMy Sim</format>
</chunk>

<!-- Position -->

<chunk>
<name>longitude-deg</name>
<type>double</type>
<format>%.10lf</format>
<node>/position/longitude-deg</node>
</chunk>

<chunk>
<name>latitude-deg</name>
<type>double</type>
<format>%.10lf</format>
<node>/position/latitude-deg</node>
</chunk>

<chunk>
<name>altitude-m</name>
<type>float</type>
<format>%f</format>
<node>/position/altitude-ft</node>
<factor>0.3038</factor>
</chunk>

<!-- Velocity and track -->
<chunk>
<name>track-deg</name>
<type>double</type>
<format>%f</format>
<node>/orientation/track-deg</node>
</chunk>

<chunk>
<name>groundspeed-ms</name>
<type>double</type>
<format>%.1lf</format>
<node>/veocities/groundspeed-kt</node>
<factor>0.50277</factor>
</chunk>

</output>

</generic>

</PropertyList>
mnewbery
 
Posts: 9
Joined: Wed Dec 28, 2016 8:54 am

Re: Foreflight support?

Postby mnewbery » Thu Feb 09, 2017 4:34 am

Comment caused an issue in the SQL insert

Usage:

Longitude
Latitude
Altitude in meters MSL
Track-along-ground from true north
Groundspeed in meters/sec
mnewbery
 
Posts: 9
Joined: Wed Dec 28, 2016 8:54 am

Re: Foreflight support?

Postby wkitty42 » Fri Feb 10, 2017 4:00 am

most likely due to a UTF-8 character in the content... use 7bit characters only and you should be good...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9146
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Foreflight support?

Postby mnewbery » Mon Jan 08, 2018 4:47 am

Did anyone besides me get to try this out?
mnewbery
 
Posts: 9
Joined: Wed Dec 28, 2016 8:54 am

Re: Foreflight support?

Postby jhaiduce » Sun Dec 13, 2020 1:56 am

mnewbery wrote in Mon Jan 08, 2018 4:47 am:Did anyone besides me get to try this out?


At the risk of annoying someone by resurrecting a stale thread, I'm interested to try this out. I'm trying to interface with Garmin Pilot, which uses the same protocol as ForeFlight to receive data from flight simulators. But I'm not sure what I need to do with that XML file you posted. I assume I need to put it somewhere that FlightGear can find it, but I'm not sure the path. Care to enlighten me?
jhaiduce
 
Posts: 11
Joined: Sat May 21, 2016 9:14 pm

Re: Foreflight support?

Postby Johan G » Sun Dec 13, 2020 8:37 am

Discalaimer: I can not test this locally, but is what I can gather from the documentation for FlightGear and ForeFlight, linked to below.

That seem to be a generic protocol (which is kind of a misnomer since it is a custom protocol).

You need to copy that file to the ../data/Protocol/ directory of your FlightGear installation and then add an option (with quite a lot of parameters) to the command line.

Code: Select all
--generic=socket,out,1,localhost,49002,udp,<protocol file>

This tells FlightGear that you will send 1 message per second to the 49002* port using UDP formatted as per the <protocol file>.

You can read more about the generic protocol feature on the FlightGear wiki: Generic protocol (permalink) and more about the ForeFlight protocol on ForeFlight's website: Flight Simulator GPS Integration (UDP Protocol).
____
* Port 49002 was the port mentioned on ForeFlight's web site.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Foreflight support?

Postby jhaiduce » Mon Dec 14, 2020 5:00 pm

Thanks, I tried that, and I found that my version of FlightGear already has protocol files for ForeFlight in /usr/share/flightgear/Protocol. (foreflight-xatt.xml and foreflight-xgps.xml). I was able to get it working by running flightgear with the following command:

Code: Select all
fgfs --generic=socket,out,1,255.255.255.255,49002,udp,foreflight-xgps --generic=socket,out,10,255.255.255.255,49002,udp,foreflight-xatt


and I could see the position updating in Garmin Pilot on my phone.
Last edited by Johan G on Tue Dec 15, 2020 12:52 am, edited 1 time in total.
Reason: Please do not quote the entire preceding post.
jhaiduce
 
Posts: 11
Joined: Sat May 21, 2016 9:14 pm

Re: Foreflight support?

Postby Johan G » Tue Dec 15, 2020 12:56 am

jhaiduce wrote in Mon Dec 14, 2020 5:00 pm:[...] I found that my version of FlightGear already has protocol files for ForeFlight in /usr/share/flightgear/Protocol. (foreflight-xatt.xml and foreflight-xgps.xml).

Great! :)

jhaiduce wrote in Mon Dec 14, 2020 5:00 pm:I was able to get it working by running flightgear [...] and I could see the position updating in Garmin Pilot on my phone.

Perfect! :D

Feel free to mark the topic solved by clicking the button with green checkmark on your post above.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Foreflight support?

Postby Apollox » Thu Apr 21, 2022 4:07 am

Sorry reviving an old thread, but could you explain how foreflight can be linked to FG?
thank you
Apollox
 
Posts: 16
Joined: Thu Apr 21, 2022 4:05 am

Re: Foreflight support?

Postby Apollox » Thu Apr 21, 2022 9:20 pm

Nevermind. Figured it out. Thank you Sirs!
Apollox
 
Posts: 16
Joined: Thu Apr 21, 2022 4:05 am

Next

Return to Interfacing

Who is online

Users browsing this forum: No registered users and 1 guest