I’ve been working recently on a CIVA unit for X-plane/DCS. Now X-plane allows you to export almost any data over UDP and/or send commands back. The CIVA IV unit has a series of commands for this so I figured it would be rather easy to read the data from the displays.
Alas, it was not. I hopped into my 737 and checked the lattitude and longtitude positions and then went on to request the data and check it in Wireshark(an application to sniff out network packets).
This yielded weird results, couldn’t make head or tails of it, I got hex value’s like 0x000000005c42 back that just didn’t translate into any known value through normal means.
This boggled me for a few days since I expected the value’s on the displays to be normal integer value’s, doubles or even float value’s transmitted in hex format. Perhaps even ASCII or UNICODE Characters since it can display more then numbers. But nope.
It was a lot simpler. the 42 at end was a terminator and the two digits before simply shift from a base value. I think in the back end it’s a shift of a pointer in a database or something like that, and well the datarefs are often times directly taken from the backend and not formatted for ease of use.
So yeah, a dictionary and the problem is solved… woops…