It seems some people are having problems implementing FlightGear's multiplayer network protocol, particularly the PlayerPosition array in the position message defined in mpmessages.hxx. Well, the solution isn't simple.

PlayerPosition is an array of three doubles that describe the location of the model in question in FlightGear's Cartesian coordinate system, as x, y, and z in meters from the center of the earth. This tidbit isn't explained anywhere in the source code, which means it might take you 2.5 days to figure it out. If your own representation is in WGS-84 geodetic coordinates then you'll need to convert to geocentric coordinates before converting to Cartesian coordinates, and this can be tricky. I recommend using the functions in FlightGear's "ls_geodesy.c" file, ls_geod_to_geoc() and ls_geoc_to_geod(). Note however that they use feet, not meters!



Email blogmasterofnoneATgmailDOTcom for text link and key word rates.

Site Info