When requesting RPOS, the requested update rate is not honoured.

0 votes
asked May 11 by balt (15 points)
edited May 15 by balt
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.

1 Answer

0 votes
answered May 15 by jroberts (17,635 points)
selected May 15 by balt
 
Best answer

If it is not respecting the requested send rate, it may be a bug. File a bug report here for further investigation by an X-Plane developer. Include the log.txt and a copy of the plugin you've written to do this.

commented May 15 by balt (15 points)
Thanks, I've filed a bug report.

Welcome to X-Plane Q&A, where you can ask support questions and get answers from members of the community.

This site is for X-Plane support questions only. Please search for existing answers before posting your question. Off-topic questions will be locked.

If you’re new, you’ll need to register before asking your first question.

If your question is answered, click on the check mark to select the best response.

...