-
Notifications
You must be signed in to change notification settings - Fork 17.6k
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
set RemoteID status to Emergency if vehicle is lost #22448
set RemoteID status to Emergency if vehicle is lost #22448
Conversation
You could check if the parachute has deployed. Advanced failsafe also has the option to terminate the vehicle. |
AP_HAL::panic method rules infinitely. |
Added.
@muramura I did check the panic methods in the AP_HAL library. So far they are only triggered in an init function or in a simulation function. Therefore I have not added this to the emergency check. |
added the Advanced failsafe and use the internal fault_type to cover the AP_HAL::panic. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i've incorporated the watchdog check into the other PR, along with a GPS check with a new option bit for non-GPS operation
uint8_t uav_status = hal.util->get_soft_armed()? MAV_ODID_STATUS_AIRBORNE : MAV_ODID_STATUS_GROUND; | ||
|
||
//check if there are conditions that make AP uncontrollable. If so set location to emergency status | ||
if (AP_Notify::flags.vehicle_lost == true || AP_Notify::flags.parachute_release == 1) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better to ask the parachute subsystem directly
} | ||
|
||
//if advanced failsafe is enabled and it wants to crash the UA, set Remote ID to emergency status | ||
#ifdef ADVANCED_FAILSAFE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this ifdef doesn't work as the define is at the vehicle level
According to the FAA MoC, the drone should set the location status to emergency in case of Uncontrolled descent or loss of control. See also ArduPilot/ArduRemoteID#34
In this PR, the location status is set to emergency when the vehicle is set to vehicle_lost. Not sure if there are other emergency cases in which we also need to set the location status to emergency.
@tridge