berthubert / galmon

galileo open source monitoring
GNU General Public License v3.0
200 stars 53 forks source link

Add flag to set ublox dynamic platform model. #71

Open philcrump opened 4 years ago

philcrump commented 4 years ago

This adds a flag, --dynamic-model or -m, which takes the dynamic model id. Configuration is only done if the flag is passed.

The model id is checked for validity before configuring. No other navigation configuration is affected.

Valid flags are: 0 Portable 2 Stationary 3 Pedestrian 4 Automotive 5 Sea 6 Airborne <1g 7 Airborne <2g 8 Airborne <4g 9 Wrist Watch 10 Bike

This has been tested on a MAX-M8Q, and is identically documented on the ZED-F9P.

Thanks to ptudor for his input on this.

ahupowerdns commented 4 years ago

Should we maybe make this default to stationary? Thoughts?

jeffpc commented 4 years ago

I think that the device default (portable) is a good ubxtool default as well. People tend to mess with the receivers, which involves some motion. For the truly stationary receivers, it is easy enough to specify the mode on the command line.

Alternatively, ubxtool could require specifying the dynamic model. That way, it's less likely that operators will use the wrong mode.

akhepcat commented 4 years ago

Added this patch to my local build for testing. Seems to be working fine, though I don't know if there's a way that ubxtool can poll the module to see what mode it's in for reporting; that would also be an interesting metric.

For now, I've just updated my startup script to test for the option, so I can move back and forth easily:

check for dynamic

DYNAMIC=$(${WD}/ubxtool --help 2>&1 | grep -i dynam) pARGS="${pARGS} ${DYNAMIC:+--dynamic-model 2}"

Agree that the default should be "portable" as that's the module default, because it's so easy to set otherwise.

philcrump commented 4 years ago

Yes having the configured model reported on the observer.html page, and available for inter-observer comparisons/pretty graphs sounds like a good idea to me.

Easy enough to implement on the ubxtool side, just a read of this UBX-CFG-NAV5 on init and another navmon message field, I'll leave it to @ahupowerdns however as he'll also need to tie it up server-side.

philcrump commented 4 years ago

Just had a case with Remco where he'd switched back to a revision that did not configure the model, but of course the model was still set from his previous experimentation, and so the "large delta_hz_corr" bug appeared.

I think this adds to jeffpc's argument for requiring the model to be specified, making it obvious that we're setting/changing the model, and obvious what we're changing it to. This also encourages people to pick a suitable model for their installation rather than staying with what ublox deems a good default now & in the future.

If @ahupowerdns weighs in one way or another then I'll sort it and we can at least get one or the other option merged in :)

philcrump commented 4 years ago

Updated to match latest master.