Hi everyone,

I am new to FlightGear and am using it for a UAV project (yep, yet
another one - see http://www.albatross-uav.org).

I need FlightGear to output binary-formatted data into UDP packets to
support a custom protocol used in the system (that is, to have data from
FlightGear look like data coming from the UAV, to test the ground
station software etc.). 

There has been talk on the mailing list before (e.g. here:
http://www.opensubscriber.com/message/flightgear-devel@flightgear.org/1750238.html
by Michael Meyers) about added binary support to the generic protocol,
but it seems nothing was done about it. 

I added basic binary mode support to Network/generic.cxx that is enabled
with a <binary_mode>true</binary_mode> tag in the protocol XML file. The
patch is quite small, and if the <binary_mode> tag is not found it does
not fail (meaning any existing protocol XML files continue to work). As
well as supporting simple packed binary output, configurable data can be
added at the end of each packet (aka "line" in ASCII protocols), such as
a magic number, or the length of the packet. Other things like a CRC
checksum of the packet could be added easily.

I also updated OpenGC for this change and made a OpenGC.xml protocol
file, but it appears the OpenGC project is more or less dead. Also,
Network/opengc.cxx is a bit of a mess and seemingly unmaintained; it
might be nice to get rid of it and replace it with a XML file at some
stage. One approach is to directly replace opengc.cxx with an XML file
that emulates the structure of the ogcFGData class, - however different
compilers probably pad the variables in the class differently (for
alignment/efficiency), so a patch to OpenGC does need to be made. 

If anyone wants the generic binary mode patch, or better yet, wants to
add it into the main FlightGear repository, reply (to the list).

Also, if anyone else has uses or requirements for binary protocols, let
discuss them here, so that we can make generic binary support as broad
and applicable as possible.

Cheers,
Hugo Vincent.




-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to