m1ndgames wrote in Tue Aug 07, 2012 10:51 am:i need a bit help with the coordinates, can someone give me a quick overview what each colon is?
cti@LOCAL: 3304995.501337 4199655.641280 3492631.694056 33.342395 51.798379 41109.850304 -1.477888 -2.248279 1.432895 Aircraft/CitationX/Models/Citation-X.xml
1=user, 2=server, 3=?, 4=?, 5=?...
im currently workin on the function that determines where a player is, and trigger an event when he reaches a certain point (which will actually be a defined grid later)
You really need to take a look at the headers, i.e. the source code - it's all there, and not at all complicated.
The MP protocol is really simple and dumb, which is your advantage now
The data you receive is just a plain C struct, with XDR-encoded values. The format depends on the message types.
All message types are listed in
http://gitorious.org/fg/flightgear/blob ... ssages.hxxProperties are never transmitted verbatim, they are using so called "property IDs" which are unique and specified here:
http://gitorious.org/fg/flightgear/blob ... cxx#line70So whenever you have a property field, you need to do a lookup to see which property is referenced, using the integer ID.
That's why I suggested to convert the C/C++ header to a Perl header.
To see how the position messages are decoded, just see:
http://gitorious.org/fg/flightgear/blob ... x#line1095To see how the headers are decoded, just see:
http://gitorious.org/fg/flightgear/blob ... xx#line900You can use lots of FG/SimGear helpers to convert between geographic coordinates:
http://wiki.flightgear.org/Geographic_C ... te_SystemsAlso, I don't mind providing additional help/support, as long as you use the wiki to document your findings, i.e. by adding to the multiplayer protocol page in the wiki, so that others can also use that information.
I'd also suggest to take a look at the fgms side of things (i.e. the server), let me know if you need help understanding the C++ source code.