# APX4 3.3.21

{% hint style="info" %}
Please use Auterion Mission Control 1.38 or newer with this version of APX4.
{% endhint %}

## What's New

### General <a href="#gnss-denied-operational-enhancements" id="gnss-denied-operational-enhancements"></a>

* New [Altitude Cruise mode](https://docs.px4.io/main/en/flight_modes_mc/altitude_cruise).
* Added support for manual heading reset. Enables the operator to correct the vehicle heading in case of magnetometer distortion on the ground prior to launch.
* Allow prioritization of control inputs based on their instance number in ascending or descending order.
* [Fixed-wing autotuning](https://docs.px4.io/main/en/config/autotune_fw#auto-tuning-procedure): Added automatic maneuver amplitude detection to avoid over-excitation.&#x20;
* Failsafe logic: In parameters [COM\_RCL\_EXCEPT](https://docs.px4.io/main/en/advanced_config/parameter_reference#COM_RCL_EXCEPT), [COM\_DLL\_EXCEPT](https://docs.px4.io/main/en/advanced_config/parameter_reference#COM_DLL_EXCEPT) consider all guided modes in bit 1. Enables to by-pass link loss failsafe in all guided modes (e.g. also Land).
* Added support for 1-D gimbal control and asymmetric angle ranges.
* Report resilience information from GNSS receivers and use it in PX4-internal GNSS checks. Enables to detect spoofing and jamming events with capable GNSS receivers.
* Added autostart for PWM\_EXPANDER. Needed for Skynode S fixed-wing breakout board.
* Added PCA9685 driver to FMUv6s board. Needed for Skynode S fixed-wing breakout board.
* Added new return type option ([RTL\_TYPE](https://docs.px4.io/main/en/advanced_config/parameter_reference#RTL_TYPE)=5) to only allow returns to safe points or where thre was last a valid data link. Meant for applications that do not want to return to launch point.
* Added support for SmartAudio and IRC Tramp analog video transmitter workflow
  * CRSF/ELRS RSSI and vtx configuration parsing.
  * Channel map configuration through DDS.
  * VTX: Support Peak T67 protocol.
* Learn CAS airspeed scale faster at beginning of flight if the scale was not already learned or provided in the airframe file. Fixes: It may take a long time for the system to lear the correct airspeed scale. [Documentation](https://docs.px4.io/main/en/config_fw/airspeed_scale_handling#airspeed-scale-handling).
* Added servo center setting & asymmetric deflection. Feature: Allows to set servo center independently of MIN/MAX. [Documentation](https://docs.px4.io/main/en/config/actuators#pwm-control-surfaces-that-move-both-directions-about-a-neutral-point).
* FW rate control: Added [gain compression](https://docs.px4.io/main/en/features_fw/gain_compression#gain-compression). Feature: reduce rate controller gains when sustained oscillations are detected. Disabled by default.
* GNSS drivers: Added support for u-blox DAN-F10N and X20 devices.
* MAVLink parameters: Added option to control writing access to parameters in production builds. Enables to specify in the airframe config if parameter changes should be allowed in production builds.
* Skynode S: Disable debug console UART for production builds.
* Fixed-wing auto launch: Added option to lock selected surfaces before/during launch. New parameter [FW\_LAUN\_CS\_LK\_DY](https://docs.px4.io/main/en/advanced_config/parameter_reference#FW_LAUN_CS_LK_DY) and [CA\_CS\_LAUN\_LK](https://docs.px4.io/main/en/advanced_config/parameter_reference#CA_CS_LAUN_LK).

## What Improved

### General

* Boards: fix spurious UART read blocking boot after hardfault in production builds. Fixes: Vehicle not booting up after hardfault if using production release.
* MAVLink: update submodule to use upstream pymavlink again. Fixes: use same MAVLink as version as AMC and remove unnecessary tinkering.
* Only set Home position using GNSS if bit 0 in EKF2\_GPS\_CTRL is active. Fixes: Home position being set to spoofed location even though GNSS fusion is disabled.
* Failsafe state machine: Prevent failsafe from Offboard to Position without manual control. Fixes: Vehicle switching to Position mode even though no manual control is present.
* Failsafe state machine: Prevent Hold when no action is taken for flight time low action. Fixes: Vehicle entering Hold unexpectedly after flight time low warning with COM\_FLTT\_LOW\_ACT set to Warning or None.
* Failsafe state machine: Let user always take over from a degraded failsafe. Fixes: Unable to switch out of failsafe mode if the expected failsafe mode was not executable.
* Logger: Ensure msg buffer is large enough for all uORB message headers. Fixes: Data corruption in logger when logging large uORB messages.
* Return mode: Fix [RTL\_TYPE](https://docs.px4.io/main/en/advanced_config/parameter_reference#RTL_TYPE)=2 corner cases. Fixes: System falls back to Home when no mission is loaded. Fixes: Vehicle proceeding to land even though RTL\_LAND\_DELAY is configured to never land.
* Navigator: fix [RTL\_TYP](https://docs.px4.io/main/en/advanced_config/parameter_reference#RTL_TYPE)=2 with corridor scan.
* IO timer: Fix input capture on v6x.
* Airframe loading: Do not skip airframe loading if [SYS\_AUTOSTART](https://docs.px4.io/main/en/advanced_config/parameter_reference#SYS_AUTOSTART) is 0 such that (external) airframe scripts can handle the case [SYS\_AUTOSTART](https://docs.px4.io/main/en/advanced_config/parameter_reference#SYS_AUTOSTART) is 0 and load a default airframe for the corresponding product.
* UAVCAN: Battery: improve remaining time calculation.

### Sensors/ State Estimation

* Battery status reporting: Use correct number of connected ESCs. Fixes: when using the ESC telemetry as source for the battery estimation, the reported current and state of charge was wrong.
* Disable heading update in drag fusion. Fixes: heading estimation negatively affected by drag fusion, especially noticeable when flying without absolute heading source (i.e. flying without compass).
* Clear magnetometer fault when it is declared healthy again. Fixes: EKF not using the magnetometer after temporary failure (e.g. due to disturbance).
* AUAV airspeed sensor driver: Robustify I2C transfers and enforce minimum sample time. Fixes: Probing issues of the AUAV driver.
* Enable constant position fusion during engine warm-up. Fixes: Estimated position diverges due to vibrations from running IC engine while in Hold mode on the catapult. Needs the parameter [EKF2\_ENGINE\_WRM](https://docs.px4.io/main/en/advanced_config/parameter_reference#EKF2_ENGINE_WRM) to be enabled.
* INA2xx: Debounce battery connection on communication errors. Fixes: Removes "critical low battery" warnings due to short term I2C communication errors.
* Magnetometer Calibration: require enabled / available mag. Fixes: Previously, it was possible to trigger magnetometer calibration even when all available magnetometers were disabled via their priority parameter.
* GNSS driver: don't inject RTCM while configuring device, which greatly increases initialization robustness.

## Multicopter

* Prevent velocity integrator filling up from stale acceleration setpoints. Fixes: Unexpected climb or drop when switching out and back into position controlled mode.

### Fixed-wing/VTOL

* Failsafe logic: Consider minimum ground speed. Fixes: Overestimate of RTL time in case of strong headwind.
* Navigator: Correctly initialize RTL mode. Fixes: Short spike of zero throttle when entering RTL with fixed-wing vehicles.
* Airspeed: Change to throttle without battery scaling. Fixes: First principle airspeed check and synthetic airspeed estimation when battery scaling is enabled.
* Remove altitude acceptance requirement for VTOL landing in [RTL\_TYPE](https://docs.px4.io/main/en/advanced_config/parameter_reference#RTL_TYPE)=2. Fixes: Vehicle getting stuck in the landing process in hover due to altitude setpoint being higher than current.
* Publish flight phase correctly. Fixes: Remaining battery time estimate never updated in fixed-wing and synthetic airspeed always returning trim airspeed.
* Fix circular landing when global origin is not set. Fixes: circular landing in GNSS-denied environments and without initializing the global position through other means.
* Force to landed during runway takeoff. Fixes: Rate integrators filling up while still on the runway.
* Fix loiter altitude of Takeoff mode when not explicitly set. Fixes: Vehicle descending to wrong altitude when Takeoff mode is engaged without specifying a loiter altitude.
* Stabilize fixed-wing landing flare control. Fixes: Vehicle pitching down unexpectedly during flare.
* Improve manual position reset handling. Fixes: incorrect wind state after hard position resets.
* Airspeed fusion starting sequence fixes. Fixes: Wrong wind speed initialization in GNSS-denied environments.
* FW attitude Controller: zero initialize all member variables. Fixes: Possible NAN in the control loop that invalidates the controller outputs.
* VTOL: Ignore max HAGL failsafe in front transition. Fixes: Loss of navigation failsafe can kick in during front transition when transitioning over sloping down terrain.
* VTOL: Fuse airspeed only in front transition or fixed wing. Fixes: Vehicle switching between Land and Descend in hover mode when flying in high wind.
* Navigator: Fix RTL with Mission landing for fixed-wing vehicles by setting previous waypoint correctly. Fixes: planes steering off-course during approach to landing point when the landing is part of a Return to Land (RTL).

## What got removed

* Chore: Board v6s: remove rover to save flash. Necessary as otherwise the v6s target (Skynode S) exceeds the flash size.
* driver for end-of-life Teraranger distance sensor.
* driver for end-of-life Lanbao CM8JL65 distance sensor.
