Auto Speed Mode - iNavFlight/inav GitHub Wiki

Available in INAV 10.0

Introduction

Fixedwing Auto Speed is a mode that allows your airplane to hold the flight speed you choose, in place of the throttle based cruise speed.

General Setup

  • Speed targets can be either Airspeed. Or GPS/Baro based 3Dspeed, which will require a GNSS satellite fix.
  • Auto Speed is enable in the Modes Tab

The default Auto Speed target is Airspeed. This can be derived from either a Pitot tube sensor or Virtual Pitot.

If you want the ability to have both Airspeed and 3Dspeed on the same channel/switch. You must make the mode slider bar wide enough to cover the mid switch position as well.
Using 3Dspeed in this way will require a 3 position switch. And can be enabled by using the Disable Auto Speed Airspeed boolean function in the Programming Tab.

In the above example. The channel mid point will disable the Airspeed target, and enable the 3Dspeed target in the middle switch position.
And in the high switch position [2000us] you will have the Airspeed target.

The speed target adjustment is placed on the THROTTLE channel (Ch 4) by default. But you could also place it on any other spare Aux RC channel, and mix it to a Pot or Slider in your radio.

fw_auto_speed_channel is the setting used to select the channel you require. It is also found in the Advanced Tuning tab.

Default Min Max
4 4 MAX_SUPPORTED_RC_CHANNEL_COUNT

If you need to exit Auto Speed mode. You can either move the mode switch to the OFF position.
Or if you have fw_auto_speed_channel set to the throttle channel for speed target adjustment. You can lower the throttle stick to zero, then raise it again for manual throttle control. But make sure you cycle the Auto Speed mode switch to OFF, so you can reactivate it again.

OSD

  • An OSD field can also be selected in the OSD Tab.
    It will display the target speed with a the letter A (Airspeed) or G (Ground/3Dspeed) next to it, depending on the speed source you select.
    This OSD field is only displayed when Auto Speed mode is active.
    "OFF" will be displayed if the mode is selected but not active, due to certain flight conditions not being met for safe operation.

Speed Range Setup

  • The minimum and maximum speeds which Auto Speed mode can operate within, is selected via 2 settings. Which can also be found in the Advanced Tuning tab.

Available speed range :
fw_auto_speed_min_speed - MIN 5m/s (18km/h) - DEFAULT 14m/s (50.4km/h)
fw_auto_speed_max_speed - MAX 50 m/s (180km/h) - DEFAULT 22m/s (79.2km/h)

[!Caution] It is highly recommended that you DO NOT reduce the fw_auto_speed_min_speed below its default value of 14m/s (50km/h). Doing so may cause a typical fixedwing airframe to tip stall under certain flight conditions.
Only adjust this value lower if you have an airplane that has a low wing loading and good slow speed stall characteristics.

When using the 3Dspeed target. If you are flying downwind and the planes airspeed reduces 5% below the fw_auto_speed_min_speed value. The 3Dspeed will be boosted by the equivalent airspeed it has fallen below that value. This is to prevent a downwind stall if the model is commanded to turn or climb in a Navigation mode, during unfavorable wind conditions.
If the above condition occurs. The speed target letter on the OSD will alternate on a 1s cycle between "G" (3D Ground speed) and "A" (Airspeed), to inform you of the situation.
Please ensure fw_auto_speed_min_speed is adjusted according to your planes minimum safe airspeed for flight. NOT the actual stall speed!

Sensor or speed source failure

[!Note] If the airspeed source fails or is unavailable. Ground speed reverts to using fw_auto_speed_level_min_thr for stall protection. Which effectively falls back to using the conventional pitch2thr method.

fw_auto_speed_level_min_thr Is the minimum throttle that is applied for LEVEL flight in auto speed mode when using 3Dground as the speed target reference [us].
Although the actual auto throttle can go lower than this when pitching downwards to reach the setting in nav_fw_min_thr.
This should be set to provide just enough margin to avoid stalling.
The default of 1300us is general safe enough for most airplanes, provide the model DOES NOT have a high wing loading or is under powered.

Functions of operation

  • The minimum and maximum amount of throttle which the PID control can call for, to achieve the target speed, is set by -
    nav_fw_min_thr
    nav_fw_max_thr
    Both of these can also be found in the Advanced Tuning tab under Fixed Wing Navigation Settings.

[!Warning] Adjusting these setting will also influence the navigation pitch2thr function. So make sure you understand the operation of pitch2thr.

  • Motor stop is disabled when using Auto speed regardless of other Nav settings.
    In light of this, for safety reasons, Auto speed mode is included in the Nav arming blocker so it MUST be disabled before arming.
    It also will not activate until the plane has detected it is airborne.

  • Fixedwing Auto Speed mode can be activated in all flight modes except MANUAL.
    It also will NOT function during FAILSAFE or an Emergency Landing. And certain phases of navigation, where it's not sensible to use it.

PID tuning Auto Speed mode throttle response

  • The target speed is held by the fixedwing Auto Speed throttle PID controller. And the setting fw_auto_speed_thr_smoothing which is used to dampen rapid throttle changes under certain flight conditions.
    The PID settings can be found in the Tuning Tab > Additional PID gains > GPS Navigation > Auto Speed.
  • When it comes to tuning the Auto Speed mode throttle PIDs. You will likely find it’s only the Proportional and Integral that require tuning.

  • If you feel the airplane is reacting too slowly to acquiring the target speed. You can start increasing the nav_fw_auto_speed_p by 5 at a time, to allow it to work faster.

  • If the flight speed consistency wanders above or below the target speed, by more than a few km/h. You can increase nav_fw_auto_speed_i by 5 at a time, until it more closely holds the target speed.

  • If you are using Auto Speed mode for aerobatics in Acro mode. And you feel the auto throttle is not reacting fast enough, when you command the plane to pull a rapid loop. You can slightly reduce fw_auto_speed_thr_smoothing.
    Or conversely, if the auto throttle seems to be responding too rapidly while in level flight. You can increase fw_auto_speed_thr_smoothing slightly for greater smoothing.

The default gains should be sufficient for most airplanes. But this will depend on the specific thrust, drag and weight of your airplane.
e.g. If your airplane is light and has a lot of thrust with a low drag coefficient, the default PIDs will likely be fine. But if your plane has a lower power output and is heavier. Then you will likely need to increase the Auto Speed gains.

The way to tell if you have over-tuned the gains. Is you may hear the throttle oscillating while holding the target speed.
However for the sake of efficiency. You don’t want to tune these gains any tighter than is required. Otherwise it will just waste power when a climb is commanded.
But if you want your airplane to meet a navigation altitude target at any cost. Then tuning the gains to their usable limit will certain help to achieve this, beyond what nav pitch2thr is capable of.

Other information

  • Note that fixewing Auto Speed mode can assist in providing a more accurate AutoTune.
    As well as significantly increasing fixedwing WP turning and tracking accuracy.

  • INAV 10.0 also allows a fixed wing speed target to be set for each WayPoint. This is useful in cases when you require the speed target to change on different legs of the mission. This was previously only possible on multicopter platforms.

Blackbox Logging.

Blackbox speed demand uses target velocity that is otherwise unused for FW: X used for airspeed, Y for ground speed