Completely detach the steering wheel logic from the yaw controller (beside using the
same manual stick input in a manual flight mode).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- also put flaring internal states into a struct to organize a bit
- one concern with blending the throttle setpoint like this with the flare time param is that folding prop belly landing airframes may want to have a separate param for shorter throttle kill and still use the flare time ramps for everything else
abruptly changing to a heading setpoint on flare can cause the aircraft to roll and deviate from the runway, this commit
- maintains path following control during the flare not to disrupt the tracking just before touchdown
- (unfortunately for crosswind landing) removes the body axis alignment for runway bearing - this is a compromise
to achieve both runway bearing body axis alignment AND a specific touchdown point, either
1. the wind would need to be considered, and an appropriate diagonal approach (obstructions allowing) defined to the runway
2. slip control added, keeping path following outputs only commanding roll (controlling airspeed vector) and using yaw-rate command (only actuated by e.g. rudder) to align body axis with the runway
- consolidate takeoff rotation transition times for pitch constraints and throttle setpoint with a single param
- consolidate pitch takeoff constraint parameters (remove rwto_max_pitch, use nominal max)
- input correct units to rwto pitch constraint getters
- encapsulate absolute time interpolator method for transitions
- start runway ops from idle throttle
TECS climbout mode was used for takeoff climbout, which puts throttle to full and does not regulate a specific airspeed.
This commit sets the desired takeoff airspeed explicitly and allows max climb rate to track the ascent.
previously a scale factor param on min airspeed was used to define the climbout airspeed for runway takeoff
additionally, the rotation speed was defined by another hardcoded scale on top of the previously scaled min airspeed
this commit explicitly defines a takeoff speed and rotation speed for runway takeoff in params, with option to disable
Before, the logic to update disarm and rate values also triggered during
bootup on the px4io, because the output functions are only set in
updateSubscriptions().
Therefore change the check to prevent updating during the first cycle.
When using ignition SITL simulation with NO_LOCKSTEP, the SITL PX4 fails to update the IMU data from Ignition Gazebo.
The timestamp for the IMU data is taken from the ignition message:
- In LOCKSTEP mode the clock from the ignition simulation and the one from PX4 SITL are synchronized, hence everything works fine
- In NO_LOCKSTEP mode, those clocks are not synchronized anymore, so the timestamp for the IMU data should not be the one from Ignition but the current time in PX4 SITL when receiving the message.
The update function of InputMavlinkGimbalV2 returns UpdatedNotActive when receiving control commands from a system or component that doesn't match the primary control. This can happen if a component just sends commands without being in control or when transitioning to a different primary control.
If the input is marked as already_active, it will reset last_input_active which in turn resets the primary control in the next iteration. According to the MAVLink gimbal protocol v2, a component needs to send MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE to start controlling the gimbal and to remove control. However, with the current implementation there are several other commands that would reset the primary control.
With this PR, the primary control remains with the component that requested it last if updates from a not active component are received.
* Log position setpoint reference of npfg
This commit logs the local position setpoint reference when using NPFG
* Address review comments
This commit address review comments from @tstastny
Replace the existing check for the availability of a takeoff mission item with a combined
check for takeoff and landing item (or landing pattern). New param MIS_TKO_LAND_REQ
can be set to require only a takeoff, only a landing, both takeoff and landing, and
both or none. The latter is meant to be set if is e.g. deemed unsafe to start a flight
through a Takeoff WP without though defining a Landing - as then in case of a RTL the
vehicle doesn't follow a pre-defined path but instead only can do default RTL that especially
for FW and VTOL isn't always safe.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Peter van der Perk <peter.vanderperk@nxp.com>
Co-authored-by: David Sidrane <David.Sidrane@NscDg.com>
Co-authored-by: alexklimaj <alex@arkelectron.com>
Previously the minimum airspeed setpoint was adjusted to the load_factor compensated
stall speed, which, when the stall speed was set without margin, gave the controller
no room for error (the vehicle would stall if the controller has even a small airspeed
error).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- Include board_config.h for BOARD_GET_EXTERNAL_LOCKOUT_STATE etc. macros
- Include fcntl.h for "open"
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
* LandDetectorMC: enforce that LNDMC_Z_VEL_MAX * 1.2 is below *MPC_LAND_CRWL/MPC_LAND_SPEED
Otherwise the _in_descend flag doesn't get set correctly during the last part
of the landing, where the descend speed is at MPC_LAND_CRWL or LAND_SPEED.
The _in_descend flag is set it the velocity setpoint is >1.1*LNDMC_Z_VEL_MAX.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>