* 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>
* PositionSetpoint: remove yaw_valid field
* Navigator: set yaw setpoint to NAN for Takeoff
Don't set a yaw setpoint for takeoff, as Navigator doesn't handle the yaw reset.
The yaw setpoint generation is handled by FlightTaskAuto.
* PositionSetpoint.msg: remove disable_weather_vane and instead only use the yaw field
Strictly follow the concept that if the position_setpoint.yaw is set, then
follow it the controller, and otherwise let the controller set it as it
thinks it's best.
* Navigator: remove logic that sets yaw to be accepted in TAKEOFF
No longer needed as during Takeoff we anyway don't set a yaw setpoint.
* PositionSetpoint.msg: remove yawspeed_valid
* PositionSetpoint.msg: remove yawspeed
* Navigator: set yaw setpoint to NAN instead of current
In set_takeoff and set_land_item, as well as for VTOL transition.
The flight tasks then set the yaw corresponding to the current yaw.
* Navigator: change get_yaw_acceptance into a bool
* PositionSetpoint.msg: improve comment for yaw
* MissionBlock: remove unnecessary code from set_vtol_transition_item
* Navigator: clean up calculate_breaking_stop(), set yaw to NAN
* Navigator: set yaw to NAN in variouls places where not specifc setpoint is desired
* Navigator: set yaw to NAN in reset_position_setpoint()
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Co-authored-by: Matthias Grob <maetugr@gmail.com>
New thrust and torque control mode added which replaces the previous
actuator mode,
in this mode the rate controllers are disables, the control allocator
is enabled and the used externally provices
vehicle_thrust_setpoints and vehicle_torque_setpoints.
New direct_actuator mode
In direct_actuator mode the control allocator module does not publish
actuator_motors and actuator_servos messages which must instead be
provided extrernally by the user.
Removed old direct mode.
Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
- do reporting of breaching in-air only in geofenceCheck
- remove geofence_violation_reason_t
- replace geofence_breached field in GeofenceResult.msg with 3 fields
(one for each GF type: max dist, max alt, custom geofence)
- the warning message after breaching a GF is only done by Commander,
and it's specific to the GF type failure
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Use flow rates instead of integrals in backend. This allows us to delay
the data to the mitpoint integration time and simplifies the code in
general.
Gyro compensation can still be done in EKF2 if needed, but the
flow module normally already appends the correct gyro data to the flow
message.
* 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>
Reduces flash usage by ~16KB.
- compress formats at build-time into a single string with all formats
- then at runtime iteratively decompress using
https://github.com/atomicobject/heatshrink
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.