In my application I am trying to obtain simple parameters such as the roll, pitch and yaw angles (mavlink_msg_attitude), and the speeds in each direction (x, y and z - mavlink_msg_global_position_int).
If for the first ones 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, 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 drone being stopped it gives me speeds in X of 30000.
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.
What is this and how can I solve it?