ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AP_GPS: hdop and vdop are unitless

Open Williangalvani opened this issue 1 year ago • 3 comments

https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)

Williangalvani avatar Jun 27 '24 13:06 Williangalvani

They don’t have a physical unit, but they are scaled by 100. I.e. if the field has a value of 157, then a GCS would display an hdop of 1.57.

The comment should explain this scaling.

tpwrules avatar Jun 27 '24 14:06 tpwrules

They don’t have a physical unit, but they are scaled by 100. I.e. if the field has a value of 157, then a GCS would display an hdop of 1.57.

The comment should explain this scaling.

Hah, I had looked at the code for UBX and it sets the hdop directly. but UBX itself has it scaled: image I'll update the comment

Williangalvani avatar Jun 27 '24 16:06 Williangalvani

They don’t have a physical unit, but they are scaled by 100. I.e. if the field has a value of 157, then a GCS would display an hdop of 1.57.

The comment should explain this scaling.

Not sure how "GCS" enters into the equation here. These variables are internal to ArduPilot; you have to go via the mavlink layer to get data to the GCS (typically).

It looks like the descriptions on the mavlink messages could be improved in a manner similar to this PR, 'though!

      <field type="uint16_t" name="eph">GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX</field>

peterbarker avatar Jun 28 '24 00:06 peterbarker