openpilot icon indicating copy to clipboard operation
openpilot copied to clipboard

qcomgpsd: set horizontal accuracy

Open dzid26 opened this issue 6 months ago • 7 comments

Description

qcomgpsd.py was not setting accuracy parameter that is present in capnp and so it was always 0.

    accuracy = 0,
    verticalAccuracy = 1.3863411,
    bearingAccuracyDeg = 83.561844,

Verification I can see plausible accuracy value.

    accuracy = 0.79913158,
    verticalAccuracy = 1.3863411,
    bearingAccuracyDeg = 83.561844,

dzid26 avatar Feb 23 '24 14:02 dzid26

Btw, there are two types of accuracy values that could be used here: PDOP and HDOP.

I would use PDOP, but since there is no separate horizontalAccuracy in capnp, I chose HDOP. (This also matches ublox which also uses horizontal accuracy for the accuracy).

dzid26 avatar Feb 23 '24 14:02 dzid26

@haraschax I assume there's a reason we didn't do this?

In any case, we'd have to validate this output before merging and make sure the locationd tuning is still valid.

adeebshihadeh avatar Feb 23 '24 19:02 adeebshihadeh

No reason we didn't do this. Just didn't notice that accuracy was supposed to mean horizontalAccuracy. I made a PR to rename. @dzid26 If you send me a couple routes with this change, I can get the correct to modify locationd, so your PR can be merged.

https://github.com/commaai/openpilot/pull/31629

haraschax avatar Feb 28 '24 23:02 haraschax

Thanks for contributing to openpilot! In order for us to review your PR as quickly as possible, check the following:

  • Convert your PR to a draft unless it's ready to review
  • Read the contributing docs
  • Before marking as "ready for review", ensure:
    • the goal is clearly stated in the description
    • all the tests are passing
    • the change is something we merge
    • include a route or your device' dongle ID if relevant

github-actions[bot] avatar Mar 04 '24 01:03 github-actions[bot]

@haraschax still interested in logging HDOP or wanna change the signals entirely?

adeebshihadeh avatar Mar 18 '24 00:03 adeebshihadeh

I can send some routes here. I’m interested in seeing this merged.

andiradulescu avatar Mar 18 '24 09:03 andiradulescu

A couple of routes with this change:

b387d7bf0f78af1b/00000022--2c92057f4b b387d7bf0f78af1b/0000001a--c9c3300b1c b387d7bf0f78af1b/00000019--1f18b856bb

The branch I used includes the rename: https://github.com/andiradulescu/openpilot/commit/29639c875727f1fc06e1141b131d6cc15db2cb77

andiradulescu avatar Mar 31 '24 20:03 andiradulescu