1
0
Fork 0
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:
Jacky2k 2020-03-09 15:21:26 +01:00 committed by GitHub
parent 8b54326d90
commit 6eda2af359
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 75 additions and 11 deletions

View file

@ -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);