From cdfbea9eabf7ae71128256cd0baf641ac3a8c86a Mon Sep 17 00:00:00 2001 From: jonas Date: Thu, 19 Nov 2026 14:23:44 +0100 Subject: [PATCH] docs(geofence): say breach instead of violation in events and parameters The geofence and pre-geofence event texts, the parameter descriptions and the mission check used both words. Use breach, as the other mission check texts, the failsafe flags and the documentation do. The IDs of the existing events keep their names, because an event ID is a hash of its name. The pre-geofence event IDs are new and use breach. Assisted-by: Claude:claude-fable-5-2 Signed-off-by: jonas --- docs/en/config/safety.md | 2 +- .../checks/geofenceCheck.cpp | 18 +++++++++--------- src/modules/navigator/geofence_params.yaml | 6 +++--- .../navigator/mission_feasibility_checker.cpp | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/docs/en/config/safety.md b/docs/en/config/safety.md index cd2db6803ee..94e499c00fb 100644 --- a/docs/en/config/safety.md +++ b/docs/en/config/safety.md @@ -225,7 +225,7 @@ The settings and underlying [geofence parameters](../advanced_config/parameter_r | Max Altitude | [GF_MAX_VER_DIST](../advanced_config/parameter_reference.md#GF_MAX_VER_DIST) | Height of geofence cylinder. Geofence disabled if 0. | ::: info -Setting `GF_ACTION` to terminate will kill the vehicle on violation of the fence. +Setting `GF_ACTION` to terminate will kill the vehicle on a breach of the fence. Due to the inherent danger of this, this function is disabled using [CBRK_FLIGHTTERM](#CBRK_FLIGHTTERM), which needs to be reset to 0 to really shut down the system. ::: diff --git a/src/modules/commander/HealthAndArmingChecks/checks/geofenceCheck.cpp b/src/modules/commander/HealthAndArmingChecks/checks/geofenceCheck.cpp index a5cab0fca4c..86564f70832 100644 --- a/src/modules/commander/HealthAndArmingChecks/checks/geofenceCheck.cpp +++ b/src/modules/commander/HealthAndArmingChecks/checks/geofenceCheck.cpp @@ -65,7 +65,7 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter) */ reporter.armingCheckFailure(NavModes::All, health_component_t::system, events::ID("check_gf_violation_max_hor_dist"), - events::Log::Error, "Geofence violation: exceeding maximum distance to Home"); + events::Log::Error, "Geofence breach: exceeding maximum distance to Home"); if (reporter.mavlink_log_pub()) { mavlink_log_critical(reporter.mavlink_log_pub(), "Geofence: exceeding maximum distance to Home\t"); @@ -81,7 +81,7 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter) */ reporter.armingCheckFailure(NavModes::All, health_component_t::system, events::ID("check_gf_violation_max_alt"), - events::Log::Error, "Geofence violation: exceeding maximum altitude above Home"); + events::Log::Error, "Geofence breach: exceeding maximum altitude above Home"); if (reporter.mavlink_log_pub()) { mavlink_log_critical(reporter.mavlink_log_pub(), "Geofence: exceeding maximum altitude above Home\t"); @@ -97,7 +97,7 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter) */ reporter.armingCheckFailure(NavModes::All, health_component_t::system, events::ID("check_gf_violation_custom_gf"), - events::Log::Error, "Geofence violation: approaching or outside geofence"); + events::Log::Error, "Geofence breach: approaching or outside geofence"); if (reporter.mavlink_log_pub()) { mavlink_log_critical(reporter.mavlink_log_pub(), "Geofence: approaching or outside geofence\t"); @@ -115,8 +115,8 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter) * */ reporter.armingCheckFailure(NavModes::All, health_component_t::system, - events::ID("check_pre_gf_violation_max_hor_dist"), - events::Log::Error, "Pre-geofence violation: exceeding maximum distance to Home"); + events::ID("check_pre_gf_breach_max_hor_dist"), + events::Log::Error, "Pre-geofence breach: exceeding maximum distance to Home"); if (reporter.mavlink_log_pub()) { mavlink_log_critical(reporter.mavlink_log_pub(), "Pre-geofence: exceeding maximum distance to Home\t"); @@ -131,8 +131,8 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter) * */ reporter.armingCheckFailure(NavModes::All, health_component_t::system, - events::ID("check_pre_gf_violation_max_alt"), - events::Log::Error, "Pre-geofence violation: exceeding maximum altitude above Home"); + events::ID("check_pre_gf_breach_max_alt"), + events::Log::Error, "Pre-geofence breach: exceeding maximum altitude above Home"); if (reporter.mavlink_log_pub()) { mavlink_log_critical(reporter.mavlink_log_pub(), "Pre-geofence: exceeding maximum altitude above Home\t"); @@ -147,8 +147,8 @@ void GeofenceChecks::checkAndReport(const Context &context, Report &reporter) * */ reporter.armingCheckFailure(NavModes::All, health_component_t::system, - events::ID("check_pre_gf_violation_custom_gf"), - events::Log::Error, "Pre-geofence violation: approaching or outside pre-geofence"); + events::ID("check_pre_gf_breach_custom_gf"), + events::Log::Error, "Pre-geofence breach: approaching or outside pre-geofence"); if (reporter.mavlink_log_pub()) { mavlink_log_critical(reporter.mavlink_log_pub(), "Pre-geofence: approaching or outside pre-geofence\t"); diff --git a/src/modules/navigator/geofence_params.yaml b/src/modules/navigator/geofence_params.yaml index d991981e7ff..139efb5520c 100644 --- a/src/modules/navigator/geofence_params.yaml +++ b/src/modules/navigator/geofence_params.yaml @@ -4,10 +4,10 @@ parameters: definitions: GF_ACTION: description: - short: Geofence violation action + short: Geofence breach action long: |- Note: Setting this value to 4 enables flight termination, - which will kill the vehicle on violation of the fence. + which will kill the vehicle on a breach of the fence. type: enum values: 0: None @@ -55,7 +55,7 @@ parameters: increment: 1 GF_PRE_ACTION: description: - short: Pre-geofence violation action + short: Pre-geofence breach action long: If the geofence is breached as well, the more severe of the two actions is taken. type: enum values: diff --git a/src/modules/navigator/mission_feasibility_checker.cpp b/src/modules/navigator/mission_feasibility_checker.cpp index dac3bfb16f3..1d5e5043a94 100644 --- a/src/modules/navigator/mission_feasibility_checker.cpp +++ b/src/modules/navigator/mission_feasibility_checker.cpp @@ -298,9 +298,9 @@ MissionFeasibilityChecker::checkMissionAgainstGeofence(const mission_s &mission, break; case Failure::Waypoint: - mavlink_log_critical(_navigator->get_mavlink_log_pub(), "Geofence violation for waypoint %zu\t", failed_item + 1); + mavlink_log_critical(_navigator->get_mavlink_log_pub(), "Geofence breach for waypoint %zu\t", failed_item + 1); events::send(events::ID("navigator_mis_geofence_violation"), {events::Log::Error, events::LogInternal::Info}, - "Geofence violation for waypoint {1}", failed_item + 1); + "Geofence breach for waypoint {1}", failed_item + 1); break; }