* Remove euler angles from attitude setpoint message
* Remove usage of euler angles in attitude setpoint messages
This commit removes the usage of euler angles in the vehicle_attitude_setpoint messages
* Fix standard vtol
Remove option to track from previous wp to reduce complexity and fix
case where prev=current point and the line following broke down.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Position Control: some cosmetical changes
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Position Control: disable roll constraining warning in VTOL transition
In transitions it is expected that the roll is constrained, and
instead of defining an aribitrary threshold let's rather disable
the user warning in that case.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Pos C: define magic numbers for roll constraining warning as constants
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* battery: make time remaining estimation dependent on level flight characteristis for FW
* battery: fix that FW flight is also correctly detected when vehicle_status is not updated
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FixedwingPositionControl: Move constant to header file
* flight phase estimation: use tecs height rate reference to check for level flight
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
* avoid waypoint following during backtransition
- if vehicle overshoots transition, make controller track the prev/current
waypoint line, this avoids large banking maneuvers that delay the transition further
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* navigator: use SETPOINT_TYPE_LAND as setpoint type for VTOL_LAND waypoints
such that fixed wing position controller can distinguish from other types
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* FixedWingPositionControl: split vtol backtransition logic into separate method
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* review changes
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* prevent loiter when approaching vtol backtransition and invalidate previous waypoint during mission landing
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* removed unused parameter
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* small renaming of transition mode
Signed-off-by: RomanBapst <bapstroman@gmail.com>
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
* TECS: reduce default of FW_T_I_GAIN_THR
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* TECS: reduce default of FW_T_THR_DAMP
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* TECS: improve param descriptions and meta data of some params
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Pos C: rename FW_T_THR_DAMP to FW_T_THR_DAMPING
Rename wihtout param translation as the interpretation of this param has changed
recently (a bug was fixed that caused the damping to have a much lower effect than
it should). We want to avoid that users keep the previously tuned value (with the bug)
and do not update the tuning when using the fixed version (v1.14.0 and later).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Pos C: rename FW_T_I_GAIN_THR to FW_T_THR_INTEG
Rename wihtout param translation as the interpretation of this param has changed
recently (a bug was fixed that caused the damping to have a much lower effect than
it should). We want to avoid that users keep the previously tuned value (with the bug)
and do not update the tuning when using the fixed version (v1.14.0 and later).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Separate offboard path setpoints as fixedwing pos control state
This commit separates offboard path following as a separate state inside the FW Poscontrol module.
This is a cleanup on clearly defining fw pos control behaviors
* Update src/modules/fw_pos_control/FixedwingPositionControl.cpp
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
* Fix format
---------
Co-authored-by: Silvan Fuhrer <silvan@auterion.com>
-remove dedicated vtol transition airspeed init logic
-init airspeed setpoint on first usage of tecs
-init to max of current airspeed and min airspeed
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
The _control_mode_current wasn't updated otherwise, and only done so by luck
because we already set the current type to SETPOINT_TYPE_POSITION.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
-remove external init, and instead always (but only) init when dt is too large
-init the controller params correctly
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* created a Performance Model for fixed wing vehicle
- added compensation for maximum climbrate, minimum sinkrate, minimum airspeed and trim airspeed based on weight ratio and air density
- added atmosphere lib to standard atmosphere calculations
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Co-authored-by: Thomas Stastny <thomas.stastny@auterion.com>
The command is sent by a dedicated mavlink command and forwarded to the fixed wing position controller.
The pattern is defined by the radius of the major axis, the radius of the minor axis and the orientation. The pattern is then defined by:
The upper part of the pattern consist of a clockwise circle with radius defined by the minor axis. The center of the circle is defined by the major axis minus the minor axis away from the pattern center.
The lower part of the pattern consist of a counter-clockwise circle with the same definitions as above.
In between, the circles are connected with straight lines in a cross configuration. The lines are always tangetial to the circles.
The orientation rotates the major axis around the NED down axis.
The loitering logic is defined inside its own class used by the fixed wing position control module. It defines which segment (one of the circles or lines) is active and uses the path controller (npfg or l1-control) to determine the desired roll angle.
A feedback mavlink message is send with the executed pattern parameters.
A setpoint of type IDLE can be published by Navigator without a valid position,
and should be handled in the auto function in FW_POSCTRL_MODE_AUTO. If it wouldn't be
handled there the controller would switch to mode FW_POSCTRL_MODE_OTHER, in which case
no attitude setpoint is published and the lower controllers would be stuck with the
last published value (incl. thrust).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Positon Controller: set altitude_ref to 0 if not provided by GPS
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FW Positon Controller: set lat/lon reference to 0 if not provided in local_position
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
- force initialize takeoff airspeed setpoint at start of takeoff modes
- force set airspeed constraints if slewed value is out of bounds
- always slew airspeed setpoints as long as inside constraints
- move target airspeed setpoint calculation into mode specific logic regions (hand vs runway)
when we're in a takeoff situation, we only want to adapt the airspeed to
avoid accelerated stall due to load factor changes. Disable othre logic
like minimum ground speed, wind based adaption and airspeed slew rating.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>