mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-19 22:35:19 +03:00
no loiter waypoint for vtol
This commit is contained in:
parent
1188ff79fe
commit
258a88ce15
2 changed files with 6 additions and 22 deletions
|
@ -39,6 +39,7 @@
|
|||
#include "flight/pid.h"
|
||||
#include "flight/imu.h"
|
||||
#include "flight/mixer.h"
|
||||
#include "flight/mixer_profile.h"
|
||||
|
||||
#include "fc/config.h"
|
||||
#include "fc/controlrate_profile.h"
|
||||
|
@ -289,6 +290,10 @@ static void calculateVirtualPositionTarget_FW(float trackingPeriod)
|
|||
needToCalculateCircularLoiter = isNavHoldPositionActive() &&
|
||||
(distanceToActualTarget <= (navLoiterRadius / TAN_15DEG)) &&
|
||||
(distanceToActualTarget > 50.0f);
|
||||
//if vtol landing is required, fly straight to homepoint
|
||||
if ((posControl.navState == NAV_STATE_RTH_HEAD_HOME) && navigationRTHAllowsLanding() && checkMixerATRequired(MIXERAT_REQUEST_LAND)){
|
||||
needToCalculateCircularLoiter = false;
|
||||
}
|
||||
|
||||
/* WP turn smoothing with 2 options, 1: pass through WP, 2: cut inside turn missing WP
|
||||
* Works for turns > 30 degs and < 160 degs.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue