I would like X-Plane to start sending me UDP packets with position/attitude information.
I'm sending a UDP packet to X-plane's IP address listed in the network dialog, containing this: RPOS\0 followed by 4 bytes representing an int value of 1, for, according to the documentation, 1 update per second.
This is what's written to the log:
Public-message parse, RECV label=RPOS, len=4
Got RPOS from IP=127.0.0.1-60670, rpos_output_sends=-2147483648
followed by something like 20 RPOS messages per second.
I've also tried to sent a long instead of an int (for 8 bytes received) with the same result. Here's a snippet of the Java code used to assemble the UDP packet, perhaps someone can modify this so it works...?
ByteArrayOutputStream os = new ByteArrayOutputStream();
os.write("RPOS".getBytes(StandardCharsets.UTF_8));
os.write(0x00); //mandatory null
ByteBuffer buffer = ByteBuffer.allocate(Long.BYTES);
buffer.putLong(1); // 1 packet per second
os.write(buffer.array());
UDPSend(os.toByteArray(), "localhost", 49000);
As soon as I start sending UDP packets, the network settings dialog under "Receiving Data From" states: Multiplayer machine flying MD-82 (127.0.0.1) and under "Sending data to" says internal-use-only.
The Log.txt files has a million entries of that form:
time= 290.2, RECV label=RPOS from IP=127.0.0.1-55016, length after packaging removal=4
Private-message parse, RECV label=RPOS, len=4
Public-message parse, RECV label=RPOS, len=4
Got RPOS from IP=127.0.0.1-55016, rpos_output_sends=-2147483648
Time= 290.3, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.3, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.3, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.4, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.4, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.4, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.5, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.5, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.5, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.5, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.6, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.6, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.6, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.7, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.7, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.7, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.8, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.8, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.8, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.9, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.9, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 290.9, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.0, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.0, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.0, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.1, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.1, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.1, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.2, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.2, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
Time= 291.2, SEND label=RPOS to IP 127.0.0.1 port_int=55016. Length sent=69
This is on OS X High Sierra.