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

set RemoteID status to Emergency if vehicle is lost #22448

Closed

Conversation

BluemarkInnovations
Copy link
Contributor

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

@IamPete1
Copy link
Member

You could check if the parachute has deployed. Advanced failsafe also has the option to terminate the vehicle.

@muramura
Copy link
Contributor

AP_HAL::panic method rules infinitely.
The state to access this method is also emergency.

@BluemarkInnovations
Copy link
Contributor Author

BluemarkInnovations commented Dec 19, 2022

You could check if the parachute has deployed. Advanced failsafe also has the option to terminate the vehicle.
@IamPete1

Added.

AP_HAL::panic method rules infinitely. The state to access this method is also emergency.

@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.

@BluemarkInnovations
Copy link
Contributor Author

added the Advanced failsafe and use the internal fault_type to cover the AP_HAL::panic.

Copy link
Contributor

@tridge tridge left a 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) {
Copy link
Contributor

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

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

@tridge tridge closed this Jan 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants