ardupilot icon indicating copy to clipboard operation
ardupilot copied to clipboard

AP_GPS: make receiver logging configurable through parameters

Open flyingthingsintothings opened this issue 1 year ago • 9 comments

Add parameters that allow users to configure logging from within their ground control station software. The implementation is kept generic so all drivers that want this can implement it. It's currently only implemented for the SBF (Septentrio) driver. The following new parameters are added:

  • GPS_LOG_HZ: Set frequency at which data is logged in the receiver
  • GPS_LOG_LEVEL: Set level (Lite, Basic, Default or Full) of detail that should be logged
  • GPS_LOG_FORCE: Set whether the driver should overwrite existing logging (Enabled) or add to it (Disabled)

flyingthingsintothings avatar Mar 07 '24 08:03 flyingthingsintothings

@SeptentrioGNSS

flyingthingsintothings avatar Mar 07 '24 08:03 flyingthingsintothings

I updated the parameter to be a float instead. I also changed the logging command to set up incremental logging which is required to have correctly split logs across reboots. Tested the parameters in Mission Planner as well and they show up fine. Tested with and without overwrite, with frequency of 0Hz (off) and 1 and 2Hz and it worked fine. I still need to choose correct output blocks for each level so I will leave this as a draft for now.

flyingthingsintothings avatar Mar 13 '24 12:03 flyingthingsintothings

could the setFileNaming command send not be named px4log but "ardup" or "log" as with incremental only the first 5 chars are used (right padded with _ if needed) followed by modulo-1000 counter

SeptentrioGNSS avatar Mar 29 '24 08:03 SeptentrioGNSS

@WickedShell Is this PR ready to merge or would it need further changes?

flyingthingsintothings avatar May 29 '24 07:05 flyingthingsintothings

Would it be possible to have your review @WickedShell to know if anything needs changing?

chiara-septentrio avatar Jul 29 '24 13:07 chiara-septentrio

@chiara-septentrio please test! and if you can, do us a SITL simulator for SBF :-)

tridge avatar Aug 07 '24 09:08 tridge

I tested the changes and made some of my own to make the flow of configuration work better. The program reacts correctly correctly to each parameters and I can see them in Mission Planner, but I can't see the description or set the parameters from Mission Planner (I changed the parameters in the code for testing). I would guess the parameters need to be accepted to the main code for it to be possible, am I correct @tridge ?

chiara-septentrio avatar Aug 09 '24 08:08 chiara-septentrio

I tested the changes and made some of my own to make the flow of configuration work better. The program reacts correctly correctly to each parameters and I can see them in Mission Planner, but I can't see the description or set the parameters from Mission Planner (I changed the parameters in the code for testing). I would guess the parameters need to be accepted to the main code for it to be possible, am I correct @tridge ?

It is correct that you will not be able to see the parameter description in Mission Planner. These need to be backed in MP compilation. So you will not be able to have a drop-down menu and select it. But you should be able to input the raw value directly. params

Don't forget to Write Param after you've entered the value.

Georacer avatar Aug 14 '24 09:08 Georacer

I haven't made any headway on this. The parameters are displayed and when changed in mission planner, the change is kept in memory and displayed correctly. However, the gps is still configured as if the parameters were at default

chiara-septentrio avatar Aug 23 '24 13:08 chiara-septentrio