mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-20 23:05:17 +03:00
first build
This commit is contained in:
parent
0d360be497
commit
d16fa16572
4 changed files with 18 additions and 39 deletions
|
@ -277,10 +277,9 @@ 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() || isWaypointWait())
|
||||
&& (distanceToActualTarget <= (navLoiterRadius / TAN_15DEG))
|
||||
&& (distanceToActualTarget > 50.0f)
|
||||
&& !FLIGHT_MODE(NAV_COURSE_HOLD_MODE);
|
||||
bool needToCalculateCircularLoiter = isApproachingHoldPosition() &&
|
||||
(distanceToActualTarget <= (navLoiterRadius / TAN_15DEG)) &&
|
||||
(distanceToActualTarget > 50.0f);
|
||||
|
||||
// Calculate virtual position for straight movement
|
||||
if (needToCalculateCircularLoiter) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue