mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 17:55:28 +03:00
Increase nav_wp_safe_distance
This PR increases the maximum safe distance for the first waypoint to 1500m. A lot of fixed wing LR pilots are frustrated with the 650m limit. This corrects that while not increasing the memory used by the variable. I didn't see any reason for this to be in cm. It's not divided anywhere. So metres is much more fitting.
This commit is contained in:
parent
94fc2531a1
commit
2b38a259c6
3 changed files with 7 additions and 7 deletions
|
@ -3834,11 +3834,11 @@ Waypoint radius [cm]. Waypoint would be considered reached if machine is within
|
||||||
|
|
||||||
### nav_wp_safe_distance
|
### nav_wp_safe_distance
|
||||||
|
|
||||||
First waypoint in the mission should be closer than this value [cm]. A value of 0 disables this check.
|
First waypoint in the mission should be closer than this value [m]. A value of 0 disables this check.
|
||||||
|
|
||||||
| Default | Min | Max |
|
| Default | Min | Max |
|
||||||
| --- | --- | --- |
|
| --- | --- | --- |
|
||||||
| 10000 | | 65000 |
|
| 100 | | 1500 |
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
|
@ -2355,10 +2355,10 @@ groups:
|
||||||
min: 0
|
min: 0
|
||||||
max: 2000
|
max: 2000
|
||||||
- name: nav_wp_safe_distance
|
- name: nav_wp_safe_distance
|
||||||
description: "First waypoint in the mission should be closer than this value [cm]. A value of 0 disables this check."
|
description: "First waypoint in the mission should be closer than this value [m]. A value of 0 disables this check."
|
||||||
default_value: 10000
|
default_value: 100
|
||||||
field: general.waypoint_safe_distance
|
field: general.waypoint_safe_distance
|
||||||
max: 65000
|
max: 1500
|
||||||
- name: nav_wp_mission_restart
|
- name: nav_wp_mission_restart
|
||||||
description: "Sets restart behaviour for a WP mission when interrupted mid mission. START from first WP, RESUME from last active WP or SWITCH between START and RESUME each time WP Mode is reselected ON. SWITCH effectively allows resuming once only from a previous mid mission waypoint after which the mission will restart from the first waypoint."
|
description: "Sets restart behaviour for a WP mission when interrupted mid mission. START from first WP, RESUME from last active WP or SWITCH between START and RESUME each time WP Mode is reselected ON. SWITCH effectively allows resuming once only from a previous mid mission waypoint after which the mission will restart from the first waypoint."
|
||||||
default_value: "RESUME"
|
default_value: "RESUME"
|
||||||
|
|
|
@ -127,7 +127,7 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
|
||||||
// General navigation parameters
|
// General navigation parameters
|
||||||
.pos_failure_timeout = SETTING_NAV_POSITION_TIMEOUT_DEFAULT, // 5 sec
|
.pos_failure_timeout = SETTING_NAV_POSITION_TIMEOUT_DEFAULT, // 5 sec
|
||||||
.waypoint_radius = SETTING_NAV_WP_RADIUS_DEFAULT, // 2m diameter
|
.waypoint_radius = SETTING_NAV_WP_RADIUS_DEFAULT, // 2m diameter
|
||||||
.waypoint_safe_distance = SETTING_NAV_WP_SAFE_DISTANCE_DEFAULT, // centimeters - first waypoint should be closer than this
|
.waypoint_safe_distance = SETTING_NAV_WP_SAFE_DISTANCE_DEFAULT, // Metres - first waypoint should be closer than this
|
||||||
#ifdef USE_MULTI_MISSION
|
#ifdef USE_MULTI_MISSION
|
||||||
.waypoint_multi_mission_index = SETTING_NAV_WP_MULTI_MISSION_INDEX_DEFAULT, // mission index selected from multi mission WP entry
|
.waypoint_multi_mission_index = SETTING_NAV_WP_MULTI_MISSION_INDEX_DEFAULT, // mission index selected from multi mission WP entry
|
||||||
#endif
|
#endif
|
||||||
|
@ -3869,7 +3869,7 @@ navArmingBlocker_e navigationIsBlockingArming(bool *usedBypass)
|
||||||
|
|
||||||
// Don't allow arming if first waypoint is farther than configured safe distance
|
// Don't allow arming if first waypoint is farther than configured safe distance
|
||||||
if ((posControl.waypointCount > 0) && (navConfig()->general.waypoint_safe_distance != 0)) {
|
if ((posControl.waypointCount > 0) && (navConfig()->general.waypoint_safe_distance != 0)) {
|
||||||
if (distanceToFirstWP() > navConfig()->general.waypoint_safe_distance && !checkStickPosition(YAW_HI)) {
|
if (distanceToFirstWP() > METERS_TO_CENTIMETERS(navConfig()->general.waypoint_safe_distance) && !checkStickPosition(YAW_HI)) {
|
||||||
return NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR;
|
return NAV_ARMING_BLOCKER_FIRST_WAYPOINT_TOO_FAR;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue