PX4 / PX4-user_guide

PX4 User Guide

Home Page:https://docs.px4.io/main/en/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GPS Altitude in Millimeters not Meters

breuerpeter opened this issue · comments

Analyzing the topics sensor_gps and
vehicle_gps_position in a ULog with PlotJuggler I notice that the fields related to the altitude are given in centimeters and not in meters as stated in the message reference (see link above). I am using the Holybro H-RTK F9P GNSS Series.

After uploading the ULog I noticed that the altitude estimate is displayed in the correct units. It seems to be a problem with PlotJuggler then.

Yeah it does seem like GPS driver for Uboox for example correctly puts them in meter unit (converts from mm to m):

https://github.com/PX4/PX4-GPSDrivers/blob/63990d218ec35ea965d634af6a79d3155561b743/src/ubx.cpp#L1900

And I noticed that PlotJuggler displays in cm units as well, will have to debug why that's the case.

@breuerpeter I believe your log is showing the GPS altitude in mm, which is correct (Plot juggler shows the values correctly at least on my system).

The units in the sensor_gps message changed to meters in this PR, and it is identifiable under a different field name (e.g. alt vs alt_m)

@Jaeyoung-Lim Yes, I meant to say mm and not cm. Sorry about that! How come my log has different field names than in the sensor_gps reference? The only altitude info I see in PlotJuggler is in the field "alt".

@breuerpeter Because you are running a different px4 version. The field names changed with the commit that I forwarded you to.

You can check the commit you are running and check whether it is before or after the change was made

Thank you very much for the clarification @Jaeyoung-Lim. I really appreciate the support!