Instead check if system has previously switched into LOITER to acheive the current
WP of type POSITION, and in that case stay in LOITER until altitude is reached.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Fixedwing rate control into a separate module
* Start fw_rate_control for vtol
* Move over airspeed related parameters to fw_rate_control
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
In review it was requested to have a different name for
manual_control_setpoint.z because of the adjusted range.
I started to investigate what naming is most intuitive and found
that most people recognize the stick axes as roll, pitch, yaw, throttle.
It comes at no surprise because other autopilots
and APIs seem to share this convention.
While changing the code I realized that even within the code base
the axes are usually assigned to a variable with that name or
have comments next to the assignment clarifying the axes
using these names.
To be consistent with all other axes of stick input and avoid future
rescaling confusion.
Note: for the MAVLink message 69 MANUAL_CONTROL it's using the full range
according to the message specs now [-1000,1000].
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>
- explicitly defined takeoff airspeed setpoint
- dont use climbout mode
- allow max climb on takeoff
- dont handle post clearance altitude case (navigator will switch anyway)
- 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
* 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
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>