ArduPilot / ardupilot

ArduPlane, ArduCopter, ArduRover, ArduSub source
http://ardupilot.org/
GNU General Public License v3.0
10.69k stars 17.16k forks source link

Request to remove or alter auto config for Septentrio GNSS receiver #26070

Open SeptentrioGNSS opened 7 months ago

SeptentrioGNSS commented 7 months ago

Feature request

In the current and latest stable version of the ArduPilot code for the implementation of Septentrio receivers (SBF), there is an auto config for a logged stream to the internal disk of the receiver. The mention of this stream is in the file: AP_GPS_SBF.h. Is there a possibility to make it more configurable for any user to specify if they want this stream logged and what content needs to be logged.

Is your feature request related to a problem? Please describe. A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] Currently a setSBFOutput command is sent to the receiver. It overwrites configurations made on the receiver side or it might not be needed by the user to have this log and there is no way of removing this from the auto config. As there is no parameters to change the contents of the command this is very limiting as the overwrite happens on every boot of the autopilot. After boot the connected receiver needs to be reprogrammed in order to have the right configurations for a flight.

Describe the solution you'd like A clear and concise description of what you want to happen. More customisation could be accomplished by adding 4 variables in MissionPlanner:

With these variables the content of the message sent to the Septentrio receiver can be customised from MissionPlanner itself. The OFF variable assignment would mean no message regarding logging is sent. The variables define the fields needed in the Septentrio command line interface (CLI) command where the interval, the kind of messages logged and an overwrite can be set by the user. The advanced option would allow for an open text field that anny Septentrio command can be sent to the receiver.

Regarding the other fields in the command (e.g. Stream# or Dsk1) it is fine to keep them fixed as I would suggest only making a note which states the usage of the fixed fields in the command so the user is aware of this on the README of the GPSdriver or the .h or .cpp of the SBF code.

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered. Removing the command so that the receiver logging configuration is not touched by MissionPlanner and all the necessary configurations can be made from Septentrio software tools but this adds a level of extra work as not everything can be done from MissionPlanner itself. The preferred solution is the one above as this incorporates a mostly all-in-one solution for integrations of ArduPilot and Septentrio GNSS receivers.

Platform [ X ] All [ ] AntennaTracker [ X ] Copter [ ] Plane [ ] Rover [ ] Submarine

Additional context Add any other context or screenshots about the feature request here. ArduPilot_Code code in question is at line 87

peterbarker commented 7 months ago

Ping @WickedShell , who is responsible for the current logging settings and might have a vested interest in the current settings

WickedShell commented 7 months ago

There are a couple of things we can do here, listed in ease of things that already exist:

Regarding the comments made, I'd really prefer the ArduPilot implementation of logging continue to request Comment+ReceiverStatus as from a support perspective I've found both of these to be extremely useful, and pretty light weight. And if you are logging PostProcess having Event seems much more useful, and again if it's not connected it should be pretty low impact. Are you seeing problems with this?

My builds have been adding the Support block as I've found it to be valuable and nice. (I can be convinced it should be in the default logging set). If we add that in, that would only leave us needing to add a flag for BBSamples and rates I guess.

flyingthingsintothings commented 6 months ago

I would like to work on this issue. I discussed the implementation with @SeptentrioGNSS and we had the following idea for a more flexible logging implementation.

There could be three new parameters added in the GPS module. The first would allow the user to choose a logging frequency from a set of discrete values (Off (0Hz), 0.1Hz, 0.5Hz, 1Hz... 20Hz). This frequency would then be used on a best-effort basis by every driver that wants to support custom logging frequency. Users could choose Off (0Hz) to disable logging completely which would prevent any logging setup from being performed on the receiver. The second parameter would represent a logging level that is then translated by each driver into actual data that makes sense for that level (e.g. Lite logs only contain Comment+ReceiverStatus on Septentrio GNSS receivers, Basic contains Lite + PostProcess+Support...). The levels could be called Lite, Basic, Default and Full. The specific data at each level for Septentrio GNSS receivers isn't decided yet, but would be properly documented so users know which level logs what. The third parameter would be used to indicate whether logging should be added to any existing logging that is already on the receiver, or would overwrite it.

Suggested names for the parameters would be GPS_LOG_HZ for the logging frequency, GPS_LOG_LEVEL for the logging level and GPS_LOG_FORCE for log overwriting.

The advantage of this approach is that the parameters are detailed enough for users to configure logging how they want, while being generic enough to support different drivers/receivers without adding driver-specific parameters. Any driver-specific things could be documented so users are aware whether their receiver will support the chosen parameter values.

I would love any input on this approach. @WickedShell

peterbarker commented 6 months ago

@flyingthingsintothings created a PR reflecting his ideas here: https://github.com/ArduPilot/ardupilot/pull/26442