Also applies to Loiters that are started due to the previous mode being over (Takeoff,
VTOL_Takeoff, Mission).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
landing airspeed was previously defined by a scale factor multiplied by minimum airspeed. this commit changes this parameter to an explicit speed, and when unspecified, defaults to the minimum airspeed
Use kClearanceAltitudeBuffer for it, which is also used to ensure that during takeoff an
altitude setpoint above the clearance altitdue is set.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
MIS_LTRMIN_ALt was used to limit the go-to altitude of a LOITER_TO_ALT (not the exit altitude,
but the altitude that the vehicle went to to fly to WP), and during landing abort to climb to
at least this altitude. The min entry altitude of LOITER_TO_ALT I remove with this commit, while
for the min alt during abort I added the new parameter MIS_LND_ABRT_ALT.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
previously, the next position setpoint in the triplet was left unchanged during an abort, which meant that the abort loiter current point combined with land next point triggered the early landing config logic. this commit is only a hack to make things work temporarily.. this needs to be handled better.
- explicitly defined takeoff airspeed setpoint
- dont use climbout mode
- allow max climb on takeoff
- dont handle post clearance altitude case (navigator will switch anyway)
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>