mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-17 13:25:27 +03:00
Waypoint hold time feature (#5398)
* Added support for waypoint hold time
This commit is contained in:
parent
8b54326d90
commit
6eda2af359
7 changed files with 75 additions and 11 deletions
|
@ -243,7 +243,7 @@ static void calculateVirtualPositionTarget_FW(float trackingPeriod)
|
|||
|
||||
// If angular visibility of a waypoint is less than 30deg, don't calculate circular loiter, go straight to the target
|
||||
#define TAN_15DEG 0.26795f
|
||||
bool needToCalculateCircularLoiter = isApproachingLastWaypoint()
|
||||
bool needToCalculateCircularLoiter = (isApproachingLastWaypoint() || isWaypointWait())
|
||||
&& (distanceToActualTarget <= (navConfig()->fw.loiter_radius / TAN_15DEG))
|
||||
&& (distanceToActualTarget > 50.0f)
|
||||
&& !FLIGHT_MODE(NAV_CRUISE_MODE);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue