geofence: added pre-arm check if too close to fence

- prevents dangerous situations during and after takeoff when the geofence
breach avoidance tries to push the vehicle away from the fence

Signed-off-by: RomanBapst <bapstroman@gmail.com>
This commit is contained in:
RomanBapst
2022-01-03 16:53:30 +03:00
parent bdec85fdd0
commit 4c717e2714
9 changed files with 85 additions and 9 deletions
+1
View File
@@ -7,6 +7,7 @@ uint8 GF_ACTION_TERMINATE = 4 # flight termination
uint8 GF_ACTION_LAND = 5 # switch to AUTO|LAND
bool geofence_violated # true if the geofence is violated
bool geofence_too_close_on_ground # true if vehicle close than GF_MINDIST_GND while landed or disarmed
uint8 geofence_action # action to take when geofence is violated
bool home_required # true if the geofence requires a valid home position
+1
View File
@@ -88,6 +88,7 @@ bool high_latency_data_link_lost # Set to true if the high latency data link
bool engine_failure # Set to true if an engine failure is detected
bool mission_failure # Set to true if mission could not continue/finish
bool geofence_violated
bool geofence_too_close_on_ground # the vehicle is too close to a geofence boundary while being on the ground
uint8 failure_detector_status # Bitmask containing FailureDetector status [0, 0, 0, 0, 0, FAILURE_ALT, FAILURE_PITCH, FAILURE_ROLL]