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

SYS_STATUS GPS enabled flag not set by default #19753

Open
julianoes opened this issue Jun 1, 2022 · 4 comments
Open

SYS_STATUS GPS enabled flag not set by default #19753

julianoes opened this issue Jun 1, 2022 · 4 comments
Labels

Comments

@julianoes
Copy link
Contributor

julianoes commented Jun 1, 2022

PX4 does - by default - not set the flag SYS_STATUS.onboard_control_sensors_enabled for GPS.
https://mavlink.io/en/messages/common.html#SYS_STATUS

It only sets the flag if the param COM_ARM_WO_GPS is set to 0 meaning "Require GPS to arm".

I can see that by setting this param to 0 we make sure to only fly with GPS, however, I would argue, that whenever you switch to a mode which requires GPS, and relies on it, you essentially have the GPS "enabled". Or you could go as far as that if you run the GPS drivers, then clearly the GPS is "enabled.

For context: I've stumbled on this when implementing this flag in MAVSDK: mavlink/MAVSDK#1794
I can work around the oddity for now but - in my opinion - it is not really according to how I'd interpret the spec.

Here is where the flag is set:

set_health_flags(subsystem_info_s::SUBSYSTEM_TYPE_GPS, gps_present, !arm_without_gps, gps_success, vehicle_status);

@dagar
Copy link
Member

dagar commented Jun 1, 2022

I don't really know how to interpret it either, but one idea I had was to capture configuration parameters per GNSS instance.
#19402

@junwoo091400
Copy link
Contributor

I think checking the fix_type of the sensor_gps message would be reasonable. What do you think?

@junwoo091400
Copy link
Contributor

Oops that would be about the health. Sorry!

@junwoo091400
Copy link
Contributor

Or with SYS_HAS_GPS parameter? As that's how it's used in the ekf2Check:

https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/commander/Arming/PreFlightCheck/checks/ekf2Check.cpp#L165-L166

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

No branches or pull requests

3 participants