|
From: Richard H. <rj...@za...> - 2017-02-24 23:50:04
|
On 13/02/2017 02:13, Richard Harrison wrote: > > Will then setup a fgms local instance and see > > I've just committed a nearly finished (but needs tidying) version to > https://sourceforge.net/u/r-harrison/flightgear/ci/ecc38e76c22e193704ba0c73159910ff3e9178a5/ I'll respond to the other messages on this subject next, but mostly these are outside this first set of changes. Just pushed to my clone what is a nearly finished set of changes. https://sourceforge.net/u/r-harrison/flightgear/ci/d130797ef7174a8ddf666ed34da1aca9ac750112/ * Basic compatibility with older clients[1]; the position message is visible. * 80 new ShortInts ; each takes only 4 bytes, but can only contain +/-32768 * Added scaled shortints, (1,2,3,4 decimal places, and a +/- 1 for normalised values) * /sim/multiplay/visibility-range-nm is transmitted in the header reusing the obsolete ReplyAddress field. For possible future support at the fgms level. * When running in V2 most of the properties are transmitted using shortint scaled values. * the first property transmitted is the packet version (prop ID 10, value 1 or 2). * Selectable protocol (1/2) via /sim/multiplay/protocol-version * Added debugging /sim/multiplay/debug-level - Bit 1 : loopback mode : receives directly the outgoing packet so you can see yourself - Bit 2: log outgoing properties: SG_NETWORK, SG_INFO - Bit 3: hexdump outgoing packets - Bit 4: log all incoming properties: SG_NETWORK, SG_INFO I've removed the partitioning code; although the packets are built in two parts - simply because to get more efficiency in packing. It is still possible to add code to fgms for message translation for compatibility based on client version. The way I've packed the shortints means that these will be easily identifiable (as the id is in the topword). With the new packing a packet that was previously 1080 bytes is now 790 bytes: http://i.imgur.com/u7ZVCc5.png (new on the left). loopback will be a big plus for modellers when working on animations: http://i.imgur.com/Xxln2yR.png the gap between the aircraft isn't something I coded it's just the way it comes out, and varies with velocity. I've added a hexdump log method to simgear that I've not yet pushed so this will not build (unless the LOG_HEXDUMP is commented out). I'm still considering whether to add a 32 element generic boolean arrays - which will take 4 bytes. ----------------- [1] The properties will not be seen by older clients, so animations, lights etc will not work, and no chat messages will be received. |