Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
0cbb147
FW nav: speed-aware waypoint turn predictor (FLY_BY / FLY_OVER)
b14ckyy Jun 9, 2026
06dc453
FW nav: turn feed-forward, energy bank guard, loiter-radius floor, S-…
b14ckyy Jun 9, 2026
b14c707
FW nav: stabilised loiter radius + target/ceiling bank semantics + lo…
b14ckyy Jun 10, 2026
3c622f1
FW nav: arc-based coordinated WP turn coordinator
b14ckyy Jun 11, 2026
63170d1
FW nav: fix stale arc-coordinator state across nav interruptions
b14ckyy Aug 20, 2026
7d41d87
FW nav: review follow-ups - lead-time cap floor + energy guard vs man…
b14ckyy Aug 20, 2026
f69b25c
FW nav: remove leftovers of the superseded arc handback design
b14ckyy Aug 20, 2026
e31dd23
FW nav: loiter FF gate, capture fallback for capped/sharp corners, pr…
b14ckyy Aug 21, 2026
c0d4845
FW nav: coordinated FLY_OVER (tangent exit) + shaped arc roll-out
b14ckyy Aug 21, 2026
bf5edef
FW nav: coordinated FLY_INTO - aligned WP crossing via internal-tange…
b14ckyy Aug 21, 2026
27eb7cb
FW nav: coordinated FLY_OVER with path tracking - bounded-intercept S…
b14ckyy Aug 22, 2026
02add41
FW nav: consolidate WP turn settings into nav_fw_wp_turn_mode, releas…
b14ckyy Aug 22, 2026
8f7fda8
FW nav: leg-line capture - fallback turns converge onto the track whe…
b14ckyy Aug 22, 2026
67ec0f2
FW nav: autoland approach always flies coordinated FLY_BY turns
b14ckyy Aug 22, 2026
e8b787f
FW nav: loiter circle controller - steady arc law replaces the additi…
b14ckyy Aug 22, 2026
2d4729e
FW nav: settings wording - bank angle as sustained target, drop dev f…
b14ckyy Aug 22, 2026
ba6e15d
FW nav: review fixes - DIRECT is a true legacy opt-out, collapse PG bump
b14ckyy Aug 22, 2026
e44d144
Merge remote-tracking branch 'upstream/maintenance-10.x' into fw-turn…
b14ckyy Aug 26, 2026
d17f2b3
FW nav: use fast_fsqrtf for the turn-arc intersection solves
b14ckyy Aug 26, 2026
4fe56ea
FW nav: close the arc seams and bound the away arc
b14ckyy Aug 26, 2026
6cfda67
FW nav: keep the legacy yaw-rate lead when the level gate is off
b14ckyy Aug 24, 2026
6b42e38
FW nav: detect a passed waypoint geometrically in WP mode
b14ckyy Aug 26, 2026
5e4d484
FW nav: FLY_INTO marks the waypoint reached at the main-arc commit
b14ckyy Aug 26, 2026
e452bf0
FW nav: gate the turn FF to actual turns, make engage seams continuous
b14ckyy Aug 26, 2026
965a4a4
Merge branch 'fw-roll-smoothing' into fw-turn-predictor
b14ckyy Aug 27, 2026
687e0a6
Merge branch 'fw-roll-smoothing' into fw-turn-predictor
b14ckyy Sep 2, 2026
05e4d41
Merge branch 'fw-roll-smoothing' into fw-turn-predictor
b14ckyy Sep 8, 2026
0d4e1b7
Merge branch 'fw-roll-smoothing' into fw-turn-predictor
b14ckyy Sep 16, 2026
375dc5f
Fixed wing: hardcode turn FF gain and control ease, drop temporary se…
b14ckyy Sep 17, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions docs/Fixed Wing Landing.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ This enables up to 4 different approach directions, based on the landing site an
7. Flare: Only if a LIDAR/Rangefinder sensor is present: the motor remains switched off and the pitch angle of "Flare Pitch" is held
8. Landing: As soon as INAV has detected the landing, it is automatically disarmed, see setting `nav_disarm_on_landing`.

All turns between the approach legs are flown as coordinated FLY_BY corner cuts: the turn start is anticipated from the aircraft's actual turn radius (speed and `nav_fw_bank_angle`) so the plane rolls out already aligned on the next leg. This applies during the landing approach regardless of the configured `nav_fw_wp_turn_mode`.

To activate the automatic landing, the parameter `nav_rth_allow_landing` must be set to `ALWAYS` or `FAILSAFE`.

> [!WARNING]
Expand Down Expand Up @@ -90,8 +92,8 @@ If WP-Tracking is not used, the Plane will head straight to the landiung locatio
* `nav_fw_pitch2thr`: The navigation throttle modifier has to be tuned well to allow stable navigation during climbs and descents to prevent a stall. Make sure your plane maintains Ground or Airspeed, when climbing in any navigation mode.
The Craft should not get slower and not speed ub significantly during a navigation climb, if P2T is tuned properly. See `Fixed Wing Pitch To Throttle Tuning.md` for a full tuning procedure.

* `nav_wp_radius`: This parameter might be too high if you have set up your craft with INAV 6 or INAV 7. With a too high value, the turning points for the Crosswind-Leg and Final Approach are hit too early and make it difficult for the plane to align to the runway or cut short the approach.
Make sure this parameter is not set greater than 1000 (cm). The better your craft and navigation system is tuned, the lower this value can be. We recommend to start with 1000 for flying wings and 800 for a Plane with Tail.
* `nav_wp_radius`: The turning points for the Crosswind-Leg and Final Approach are calculated automatically from the aircraft's coordinated turn radius; `nav_wp_radius` does not shape the approach corners.
Make sure this parameter is not set greater than 1000 (cm) so approach waypoints are not detected as reached too early.

* Test your Navigation-Tuning: A better Navigation-Tune will reward you with smoother and more reliable landings. To test your nav systems limit, we recommend to create a waypoint missions with many 90° turn angles with shorter and shorter tracks.
With this Method, you can find out how well your plane can follow a navigation path and how long it takes to align to a waypoint track. A well tuned plane should be able to pull of a WP Mission that looks like this, where the distance between WP6 and WP7 si recommended to be the minimum approach length:
Expand Down
24 changes: 18 additions & 6 deletions docs/Settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,7 @@ Defines debug values exposed in debug variables (developer / debugging setting)
| VTOL_MC_PROTECT | |
| TERRAIN_NAV | |
| ESC | |
| FW_TURN | |

---

Expand Down Expand Up @@ -3706,7 +3707,7 @@ P gain of auto speed PID controller.

### nav_fw_bank_angle

Max roll angle when rolling / turning in GPS assisted modes, is also restrained by global max_angle_inclination_rll
Maximum sustained roll angle when turning in GPS assisted modes: the target bank that turn and loiter radii are planned for. Corrections may exceed it temporarily; the absolute ceiling remains max_angle_inclination_rll

| Default | Min | Max |
| --- | --- | --- |
Expand Down Expand Up @@ -4244,15 +4245,26 @@ Sets the maximum allowed alignment convergence angle to the waypoint course line

---

### nav_fw_wp_turn_smoothing
### nav_fw_wp_turn_max_lead_time

Smooths turns during WP missions by switching to a loiter turn at waypoints. When set to ON the craft will reach the waypoint during the turn. When set to ON-CUT the craft will turn inside the waypoint without actually reaching it (cuts the corner).
COORD_FLYBY only. Cap on how early a turn may start before the waypoint [ms]. The required lead time grows with speed and turn angle (up to ~10 s for fast models in sharp corners); a too-low cap forces late turn-ins and overshoot. Raise towards 12000 for sluggish models, lower towards 3000 to keep turns close to the waypoint.

| Default | Min | Max |
| --- | --- | --- |
| 6000 | 3000 | 12000 |

---

### nav_fw_wp_turn_mode

How the aircraft turns at waypoints during FW WP missions. DIRECT uses the legacy heading-PID turn. The COORD modes fly coordinated arcs of the real turn radius (from speed and nav_fw_bank_angle): COORD_FLYBY cuts the corner and passes the waypoint abeam, COORD_FLYOVER overflies the waypoint before turning onto the next leg, COORD_FLYINTO crosses the waypoint already aligned with the outbound leg (survey line entries).

| Allowed Values | |
| --- | --- |
| OFF | Default |
| ON | |
| ON-CUT | |
| DIRECT | |
| COORD_FLYBY | Default |
| COORD_FLYOVER | |
| COORD_FLYINTO | |

---

Expand Down
59 changes: 59 additions & 0 deletions docs/development/fw-turn-debugging.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Fixed-wing coordinated turn debugging (`DEBUG_FW_TURN`)

`set debug_mode = FW_TURN` exposes the fixed-wing coordinated WP turn system: the arc turn
coordinator, the S sequencer (COORD_FLYOVER with path tracking / COORD_FLYINTO), the loiter
radius stabiliser, the turn/loiter feed-forward and the energy bank guard. Values are available
via the CLI `debug` command, the `OSD_DEBUG` element, MSP `DEBUGMSG`/`DEBUG` telemetry and
blackbox logging.

## Channels

| debug[] | Value | Unit | Written by |
|---|---|---|---|
| 0 | Active turn/loiter radius | cm | Loiter stabiliser every cycle; overridden by the COORD_FLYBY planning radius while a corner approach is active, and by the engaged arc's radius while the coordinator flies the turn (latest writer wins) |
| 1 | Coordinator state (see below) | – | Arc coordinator |
| 2 | Exit course of the active arc | centideg | Arc coordinator, only while engaged |
| 3 | Remaining heading to the exit course | centideg | Arc coordinator, only while engaged |
| 4 | Arc bank command | centideg | Arc coordinator, only while engaged; clamped to the effective bank ceiling |
| 5 | WP-turn roll feed-forward | centideg | Feed-forward (0 when disabled, loitering, or inside the heading deadband) |
| 6 | Energy-guard bank ceiling | deg | Energy bank guard (sits at `max_angle_inclination_rll` unless the guard is reducing it) |
| 7 | Roll ease time | ms | Arc coordinator, only while engaged (sizes the entry/exit ramps and the turn-start lead) |

Channels 2, 3, 4 and 7 hold their last value after the arc disengages; check channel 1 to know
whether the coordinator is active.

## Channel 1: coordinator state

While the arc coordinator is engaged the value is `(arc phase + 1) * 10 + S stage`; while idle
it is the S stage alone. Two loiter states use their own values: `4` = holding, approach on the
stock carrot guidance; `40` = loiter circle controller engaged (steady arc law holds the
radius).

Arc phase (tens digit):

| Digit | Phase | Meaning |
|---|---|---|
| 1 | RAMP_IN | Smoothstep bank ramp onto the pre-placed circle |
| 2 | STEADY | Coordinated arc: live feed-forward bank + radius/tangent feedback |
| 3 | CAPTURE | Predictive roll-out onto the exit course |

S stage (ones digit; 0 outside the S modes):

| Digit | Stage | Meaning |
|---|---|---|
| 0 | – | Plain single-arc turn (COORD_FLYBY, COORD_FLYOVER tangent exit) |
| 1 | AWAY | First arc of the S; the second arc is staged |
| 2 | MAIN | Second arc of the S (COORD_FLYINTO: the aligned WP crossing; COORD_FLYOVER + tracking: the corner-cut onto the leg) |
| 3 | DONE | S completed for this leg, waiting for the next leg switch |

Examples: `20` = flying a plain coordinated turn; `21` = steady on the first S arc; `32` =
rolling out of the S's second arc; `3` (idle) = S finished, coordinator handed back.

## Reading a turn

A healthy COORD_FLYBY corner shows: channel 1 stepping `10 → 20 → 30 → 0`, channel 4 ramping to
the nominal bank, holding, then collapsing as channel 3 converges to 0 without overshoot. The
hand-back happens aligned (|ch3| small) and nearly level (|ch4| < 10% of nominal). Channel 4
pegged at channel 6 × 100 indicates the command is saturated at the flyable ceiling — expected
briefly downwind, a problem if sustained. Channel 6 dropping below `max_angle_inclination_rll`
means the energy guard is trading bank for climb capability.
1 change: 1 addition & 0 deletions src/main/build/debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ typedef enum {
DEBUG_VTOL_MC_PROTECT,
DEBUG_TERRAIN_NAV,
DEBUG_ESC,
DEBUG_FW_TURN,
DEBUG_COUNT // also update debugModeNames in cli.c
} debugType_e;

Expand Down
2 changes: 1 addition & 1 deletion src/main/cms/cms_menu_navigation.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ static const OSD_Entry cmsx_menuMissionSettingsEntries[] =
OSD_SETTING_ENTRY("MULTI MISSION NUMBER", SETTING_NAV_WP_MULTI_MISSION_INDEX),
#endif
OSD_SETTING_ENTRY("MISSION RESTART", SETTING_NAV_WP_MISSION_RESTART),
OSD_SETTING_ENTRY("WP TURN SMOOTHING", SETTING_NAV_FW_WP_TURN_SMOOTHING),
OSD_SETTING_ENTRY("WP TURN MODE", SETTING_NAV_FW_WP_TURN_MODE),
OSD_SETTING_ENTRY("WP TRACKING ACCURACY", SETTING_NAV_FW_WP_TRACKING_ACCURACY),
OSD_BACK_AND_END_ENTRY,
};
Expand Down
3 changes: 2 additions & 1 deletion src/main/fc/cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,8 @@ static const char *debugModeNames[DEBUG_COUNT] = {
"VTOL_TRANSITION",
"VTOL_MC_PROTECT",
"TERRAIN_NAV",
"ESC"
"ESC",
"FW_TURN"
};

/* Sensor names (used in lookup tables for *_hardware settings and in status
Expand Down
27 changes: 17 additions & 10 deletions src/main/fc/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ tables:
"VIBE", "CRUISE", "REM_FLIGHT_TIME", "SMARTAUDIO", "ACC",
"NAV_YAW", "PCF8574", "DYN_GYRO_LPF", "AUTOLEVEL", "ALTITUDE",
"AUTOTRIM", "AUTOTUNE", "RATE_DYNAMICS", "LANDING", "POS_EST",
"ADAPTIVE_FILTER", "HEADTRACKER", "GPS", "LULU", "SBUS2", "OSD_REFRESH", "VTOL_TRANSITION", "VTOL_MC_PROTECT", "TERRAIN_NAV", "ESC"]
"ADAPTIVE_FILTER", "HEADTRACKER", "GPS", "LULU", "SBUS2", "OSD_REFRESH", "VTOL_TRANSITION", "VTOL_MC_PROTECT", "TERRAIN_NAV", "ESC",
"FW_TURN"]
- name: vtol_mc_protection_mode
values: ["OFF", "NAV", "NAV_AND_STABILIZED"]
- name: aux_operator
Expand Down Expand Up @@ -191,9 +192,9 @@ tables:
- name: dynamic_gyro_notch_mode
values: ["2D", "3D"]
enum: dynamicGyroNotchMode_e
- name: nav_fw_wp_turn_smoothing
values: ["OFF", "ON", "ON-CUT"]
enum: wpFwTurnSmoothing_e
- name: nav_fw_wp_turn_mode
values: ["DIRECT", "COORD_FLYBY", "COORD_FLYOVER", "COORD_FLYINTO"]
enum: navFwWpTurnMode_e
- name: gps_auto_baud_max
values: [ '115200', '57600', '38400', '19200', '9600', '230400', '460800', '921600']
enum: gpsBaudRate_e
Expand Down Expand Up @@ -2759,11 +2760,17 @@ groups:
field: fw.wp_tracking_max_angle
min: 30
max: 80
- name: nav_fw_wp_turn_smoothing
description: "Smooths turns during WP missions by switching to a loiter turn at waypoints. When set to ON the craft will reach the waypoint during the turn. When set to ON-CUT the craft will turn inside the waypoint without actually reaching it (cuts the corner)."
default_value: "OFF"
field: fw.wp_turn_smoothing
table: nav_fw_wp_turn_smoothing
- name: nav_fw_wp_turn_mode
description: "How the aircraft turns at waypoints during FW WP missions. DIRECT uses the legacy heading-PID turn. The COORD modes fly coordinated arcs of the real turn radius (from speed and nav_fw_bank_angle): COORD_FLYBY cuts the corner and passes the waypoint abeam, COORD_FLYOVER overflies the waypoint before turning onto the next leg, COORD_FLYINTO crosses the waypoint already aligned with the outbound leg (survey line entries)."
default_value: "COORD_FLYBY"
field: fw.wp_turn_mode
table: nav_fw_wp_turn_mode
- name: nav_fw_wp_turn_max_lead_time
description: "COORD_FLYBY only. Cap on how early a turn may start before the waypoint [ms]. The required lead time grows with speed and turn angle (up to ~10 s for fast models in sharp corners); a too-low cap forces late turn-ins and overshoot. Raise towards 12000 for sluggish models, lower towards 3000 to keep turns close to the waypoint."
default_value: 6000
field: fw.wp_turn_max_lead_time
min: 3000
max: 12000
- name: nav_auto_speed
description: "Speed in fully autonomous modes (RTH, WP) [cm/s]. Used for WP mode when no specific WP speed set. [Multirotor only]"
default_value: 500
Expand Down Expand Up @@ -3061,7 +3068,7 @@ groups:
field: mc.slowDownForTurning
type: bool
- name: nav_fw_bank_angle
description: "Max roll angle when rolling / turning in GPS assisted modes, is also restrained by global max_angle_inclination_rll"
description: "Maximum sustained roll angle when turning in GPS assisted modes: the target bank that turn and loiter radii are planned for. Corrections may exceed it temporarily; the absolute ceiling remains max_angle_inclination_rll"
default_value: 35
field: fw.max_bank_angle
min: 5
Expand Down
40 changes: 27 additions & 13 deletions src/main/navigation/navigation.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,12 @@ STATIC_ASSERT(NAV_MAX_WAYPOINTS < 254, NAV_MAX_WAYPOINTS_exceeded_allowable_rang
PG_REGISTER_ARRAY(navWaypoint_t, NAV_MAX_WAYPOINTS, nonVolatileWaypointList, PG_WAYPOINT_MISSION_STORAGE, 2);
#endif

// One above upstream's respective version in both variants: this branch adds unconditional
// Above upstream's respective version in both variants: this branch changes unconditional
// navConfig fields on top of either struct layout
#ifdef USE_AUTO_TRANSITION
PG_REGISTER_WITH_RESET_TEMPLATE(navConfig_t, navConfig, PG_NAV_CONFIG, 12);
PG_REGISTER_WITH_RESET_TEMPLATE(navConfig_t, navConfig, PG_NAV_CONFIG, 13);
#else
PG_REGISTER_WITH_RESET_TEMPLATE(navConfig_t, navConfig, PG_NAV_CONFIG, 9);
PG_REGISTER_WITH_RESET_TEMPLATE(navConfig_t, navConfig, PG_NAV_CONFIG, 10);
#endif

PG_RESET_TEMPLATE(navConfig_t, navConfig,
Expand Down Expand Up @@ -282,7 +282,8 @@ PG_RESET_TEMPLATE(navConfig_t, navConfig,
.soaring_pitch_deadband = SETTING_NAV_FW_SOARING_PITCH_DEADBAND_DEFAULT, // pitch angle mode deadband when Saoring mode enabled
.wp_tracking_accuracy = SETTING_NAV_FW_WP_TRACKING_ACCURACY_DEFAULT, // 0, improves course tracking accuracy during FW WP missions
.wp_tracking_max_angle = SETTING_NAV_FW_WP_TRACKING_MAX_ANGLE_DEFAULT, // 60 degs
.wp_turn_smoothing = SETTING_NAV_FW_WP_TURN_SMOOTHING_DEFAULT, // 0, smooths turns during FW WP mode missions
.wp_turn_mode = SETTING_NAV_FW_WP_TURN_MODE_DEFAULT, // COORD_FLYBY, WP mission turn mode
.wp_turn_max_lead_time = SETTING_NAV_FW_WP_TURN_MAX_LEAD_TIME_DEFAULT, // 3000 ms
}
);

Expand Down Expand Up @@ -4524,23 +4525,33 @@ bool isWaypointReached(const fpVector3_t *waypointPos, const int32_t *waypointBe
posControl.wpDistance = calculateDistanceToDestination(waypointPos);

// Check if waypoint was missed based on bearing to waypoint exceeding given angular limit relative to initial waypoint bearing.
// Default angular limit = 100 degs with a reduced limit of 60 degs used if fixed wing waypoint turn smoothing option active
// Angular limit = 100 degs.
uint16_t relativeBearingTargetAngle = 10000;

if (STATE(AIRPLANE) && posControl.flags.wpTurnSmoothingActive) {
// If WP mode turn smoothing CUT option used waypoint is reached when start of turn is initiated
if (navConfig()->fw.wp_turn_smoothing == WP_TURN_SMOOTHING_CUT) {
posControl.flags.wpTurnSmoothingActive = false;
return true;
}
relativeBearingTargetAngle = 6000;
// FLY_BY turn: the waypoint is reached when the anticipated corner-cut turn is initiated
posControl.flags.wpTurnSmoothingActive = false;
return true;
}


if (ABS(wrap_18000(calculateBearingToDestination(waypointPos) - *waypointBearing)) > relativeBearingTargetAngle) {
return true;
}

/* The bearing check above settles at (180 - turn angle) once the aircraft is established on the
* outbound leg, so beyond a ~80 deg turn it can only fire on the brief swing next to the WP.
* Miss that and the WP stays active behind the aircraft, which then turns back to it. Catch the
* pass geometrically: the WP is behind once the aircraft crosses the plane through it normal to
* the inbound leg. Cannot fire early - at WP activation the aircraft sits a leg length short. */
if (STATE(AIRPLANE) && FLIGHT_MODE(NAV_WP_MODE)) {
const fpVector3_t *pos = &navGetCurrentActualPositionAndVelocity()->pos;
const float legRad = CENTIDEGREES_TO_RADIANS((float)*waypointBearing);
if ((pos->x - waypointPos->x) * cos_approx(legRad) + (pos->y - waypointPos->y) * sin_approx(legRad) >= 0.0f) {
return true;
}
}

return posControl.wpDistance <= (navConfig()->general.waypoint_radius);
}

Expand Down Expand Up @@ -5781,7 +5792,8 @@ static void calculateAndSetActiveWaypoint(const navWaypoint_t * waypoint)
mapWaypointToLocalPosition(&localPos, waypoint, waypointMissionAltConvMode(waypoint->p3));
calculateAndSetActiveWaypointToLocalPosition(&localPos);

if (navConfig()->fw.wp_turn_smoothing) {
// Turn anticipation (nextTurnAngle) is needed for FLY_BY and FLY_INTO; FLY_OVER flies to the WP then turns.
if (navConfig()->fw.wp_turn_mode != NAV_FW_WP_TURN_COORD_FLY_OVER) {
fpVector3_t posNextWp;
if (getLocalPosNextWaypoint(&posNextWp)) {
int32_t bearingToNextWp = calculateBearingBetweenLocalPositions(&posControl.activeWaypoint.pos, &posNextWp);
Expand Down Expand Up @@ -7189,7 +7201,9 @@ static void setLandWaypoint(const fpVector3_t *pos, const fpVector3_t *nextWpPos
{
calculateAndSetActiveWaypointToLocalPosition(pos);

if (navConfig()->fw.wp_turn_smoothing && nextWpPos != NULL) {
// Landing approach always uses FLY_BY turns (clean cut onto the next approach leg),
// so the turn angle is set whenever a following approach waypoint exists.
if (nextWpPos != NULL) {
int32_t bearingToNextWp = calculateBearingBetweenLocalPositions(&posControl.activeWaypoint.pos, nextWpPos);
posControl.activeWaypoint.nextTurnAngle = wrap_18000(bearingToNextWp - posControl.activeWaypoint.bearing);
} else {
Expand Down
12 changes: 7 additions & 5 deletions src/main/navigation/navigation.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,10 +360,11 @@ typedef enum {
} rthTrackbackMode_e;

typedef enum {
WP_TURN_SMOOTHING_OFF,
WP_TURN_SMOOTHING_ON,
WP_TURN_SMOOTHING_CUT,
} wpFwTurnSmoothing_e;
NAV_FW_WP_TURN_DIRECT = 0, // legacy heading-PID turn (fallback)
NAV_FW_WP_TURN_COORD_FLY_BY = 1, // corner cut: turn anticipated so the arc joins the next leg, WP passed abeam
NAV_FW_WP_TURN_COORD_FLY_OVER = 2, // fly over the WP, then roll out on the tangent line to the next WP
NAV_FW_WP_TURN_COORD_FLY_INTO = 3, // ease away before the WP, then cross it already aligned on the outbound course
} navFwWpTurnMode_e;

typedef enum {
MC_ALT_HOLD_STICK,
Expand Down Expand Up @@ -538,7 +539,8 @@ typedef struct navConfig_s {
uint8_t soaring_pitch_deadband; // soaring mode pitch angle deadband (deg)
uint8_t wp_tracking_accuracy; // fixed wing tracking accuracy response factor
uint8_t wp_tracking_max_angle; // fixed wing tracking accuracy max alignment angle [degs]
uint8_t wp_turn_smoothing; // WP mission turn smoothing options
uint8_t wp_turn_mode; // WP mission turn mode (navFwWpTurnMode_e: DIRECT / COORD_FLYBY / COORD_FLYOVER / COORD_FLYINTO)
uint16_t wp_turn_max_lead_time; // FLY_BY: cap on how early the turn may start before the WP [ms] (dev tuning)
} fw;
} navConfig_t;

Expand Down
Loading
Loading