Problem Getting Parameters

19 views
Skip to first unread message

8HOKEIAAC

unread,
May 3, 2021, 10:41:49 AM5/3/21
to MAVLink
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


Screenshot_3.png

8HOKEIAAC

unread,
May 5, 2021, 6:09:13 AM5/5/21
to MAVLink
  1. 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.

  2. My code and the request of the streams (if I try the STREAM_ALL the result is the same) are attached to this e-mail.

  3. 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.

  4. 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

2.png
1.png
Reply all
Reply to author
Forward
0 new messages