Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_GPS: make receiver logging configurable through parameters #26442

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

flyingthingsintothings
Copy link
Contributor

@flyingthingsintothings flyingthingsintothings commented Mar 7, 2024

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
Copy link
Contributor Author

@SeptentrioGNSS

libraries/AP_GPS/AP_GPS.cpp Outdated Show resolved Hide resolved
@flyingthingsintothings
Copy link
Contributor Author

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 flyingthingsintothings force-pushed the flexible-logging branch 2 times, most recently from c4c8b69 to bc999da Compare March 19, 2024 15:41
@SeptentrioGNSS
Copy link

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

@flyingthingsintothings
Copy link
Contributor Author

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

@chiara-septentrio
Copy link
Contributor

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

@chiara-septentrio chiara-septentrio force-pushed the flexible-logging branch 2 times, most recently from 6354620 to aafdd1c Compare August 6, 2024 10:03
@tridge tridge force-pushed the flexible-logging branch 2 times, most recently from 08c963c to 9ec00d2 Compare August 7, 2024 09:43
@tridge
Copy link
Contributor

tridge commented Aug 7, 2024

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

Add parameters that allow users to configure logging from within their
ground control station software.

AP_GPS: make SBF specific parameters private to SBF backend

this avoids exposing them to all users, and allows different logging
for each SBF receiver
@chiara-septentrio
Copy link
Contributor

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 ?

@Georacer
Copy link
Contributor

Georacer commented Aug 14, 2024

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.

@chiara-septentrio
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants