Getting the same parameter twice

Hi there!

In my application I am trying to obtain simple parameters such as the roll, pitch and yaw angles, and the speeds in each direction (x, y and z). If for the first few I am able to do it without a problem (using the MAV_DATA_STREAM_EXTENDED_STATUS stream), for the speeds I have not been so lucky.
Whether using MAV_DATA_STREAM_POSITION or MAV_DATA_STREAM_ALL, I always get 2 values for each speed, even using a frequency of 0x01. The worst of all is that, although the second value seems correct, the first is always absurd, for example, with the FC being stopped it gives me speeds in X of 30000.
What is this and how can I solve it?

Best regards

image

My flight controller is a Cube Orange PX4, and I’m using a ESP32 WifiModule in an Adafruit board, but it is programable in the Arduino IDE.

This is my code:

And this is the request of the streams (if I try with the STREAM_ALL the result is the same):

  1. This stream (GLOBAL_POSITION_INT) provides the ground speed in cm/s (so it’s not angular speed), and I only ask for those values, so I dont know what is this problem.
    When I increase the frequency to 0x05 (for example), I also get the first line of data incorrect, but all of the other 5 lines are correct (vx=0, vy=0, vz=0).
    I looked in Mission Planner and the values coming from the PX4 are correct, so I dont know what huge and ridiculous values are that.
    Also, in each cycle these wrong values are random, like: it goes from 30000 to -25244 to 523.

Best regards