SkyDemon Forums

Connecting flightgear to SkyDemon

http://forums.skydemon.aero/Topic29299.aspx

By rlcb - 9/1/2019 1:00:29 AM

Hi,

I've been trying to connect flightgear to SkyDemon using the X-Plane support that's already there. flightgear is quite flexible and should be able to send the needed data in whatever format required, but I can't seem to figure out what that is exactly. Please could I have some help?

I found http://forums.skydemon.aero/Topic4664-2.aspx and http://forums.skydemon.aero/Topic9838-2.aspx which suggest that all I need to do is send the correct NMEA sentences, but whatever I send, SkyDemon just sits with "Waiting for X-Plane".

Am I right in understanding that I need to be sending to UDP port 49002? I'm using an iPad Air. I think that's right because when not in "Waiting for X-Plane" mode I get an ICMP port unreachable back, but otherwise the packets seem to get to the tablet with no complaints.

I've been sending various combinations of GPRMC, GPGGA and GPGSA, and based on the other forum posts have tried setting hdop, vdop and pdop to 1.0.

I've also tried no terminator, using "\r\n", putting all three sentences into one packet, sending them in separate packets, etc. And I've tried adjusting the date/time for the current date and time as I resend them at 1 Hz.

I hope I am calculating the checksum correctly. My calculation function seemed to match the checksums in the first post I linked above, so I think it's right.

Here's an example that produces nothing out of SkyDemon:

#
U 192.168.0.9:36899 -> 192.168.0.165:49002
$GPRMC,004902,A,3723.2475,N,12158.3416,W,0.1,309.6,010919,,*03..            
#
U 192.168.0.9:36899 -> 192.168.0.165:49002
$GPGGA,004903,3723.2475,N,12158.3416,W,1,07,1.0,9.0,M,,,,*0C..            
#
U 192.168.0.9:36899 -> 192.168.0.165:49002
$GPRMC,004903,A,3723.2475,N,12158.3416,W,0.1,309.6,010919,,*02..            

That's based on one of the examples in the post I linked above. The two dots at the end are "\r\n". I've also tried various other examples with more of the fields filled in.

What is the minimum that SkyDemon needs, exactly, please?

If I can figure out a configuration for flightgear with your help, I'd be happy to share it. Or I can write a conversion program to convert its output into something that SkyDemon understands.
By rlcb - 9/1/2019 3:07:53 PM

That's just what I needed to know. Thanks!

It turns out that XGPS1 is implemented in flightgear already under the name "foreflight-xgps". So all that was needed was "--generic=socket,out,2,192.168.0.165,49002,udp,foreflight-xgps" (changing 192.168.0.165 to the tablet's IP address as needed) and flightgear works with SkyDemon without any other effort.

I noticed that ground speed is commented in flightgear's protocol definition as "m/sec" with a conversion factor of 0.50277 - slightly different from the (reciprocal) factor in your code. I don't know to what extent SkyDemon uses the value, but if knowing that it's m/sec helps you, there you go Smile

Also, if it helps anyone, the XGPS1 command has no prefix "$" and no suffix "*" or the checksum, and I didn't use any line termination either.