with the goal to make it more clear and the error only appear when
armed but every time the running task doesn't actually match
the mapping inside the start_flight_task() function.
* Navigator: on_mission_landing() only can return true if currently in mission mode
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* RTL: reset RTL state when not in RTL nav_state
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Navigator: fix mission vs. normal RTL
- remove extra state _should_engange_mission_for_landing from rtl and have
this logic outside of RTL where Navigator decides on running mission RTL or normal RTL
- fix logic in Navigator to decide mission RTL vs normal RTL
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Mission: land_start(): fix decision if already on mission landing
Simply checking landing() is not enough, as that is not reset until
set_current_mission_index(get_land_start_index()) later in the function.
Instead ask Naviator about it (on_mission_landing()).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Navigator: only update _shouldEngangeMissionForLanding once, to not set it to false after VTOL backtansition
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Port of the PX4 Vision gazebo-classic model to Gazebo. With Gazebo Garden, everything seems functionnal.
* Port of the PX4 Vision gazebo-classic model to Gazebo.
With Gazebo Garden, everything seems functionnal.
* Added airframe for command make px4_sitl gz_px4vision
* revert author field
* Import model from Ignition Fuel instead of defining it directly in the .sdf
Tests showed that sideslip fusion often starts just before airspeed
fusion, resetting the wind states to 0 instead of using the airspeed
data. A quick look at the wind uncertainty allows to know if the current
wind estimate is meaningful or if we should rather reset it using the
airspeed data.
- if the height rate input into TECS is finite, use that one to
update a velocity reference generator
- if the velocity reference generator reports position locked or
height rate input is not finite, then run altidue reference generator
- run altitude controller only if altitue is controlled
if height_rate_setpoint is set, only use that one to update altitdue trajectory
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* FWPositionController: add linear airspeed-to-trim-throttle mapping
Scale trim throttle in a linear way with airspeed.
Different gradients above/below trim airspeed.
The airspeed- and airs density-corrected trim throttle is required for an accurate
throttle prediction in TECS, while the default trim throttle is still needed
as well, as the throttle delta from height rate setpoint delta is linked to it.
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* Navigator: change way of telling logic if RLT was started just now
* Navigator: change logic around when to engage Mission mode for RTL
To find out if we're currently on a mission landing, check if we either are
past the land start marker OR currently land start marker is current WP
and vehicle is already in LOITER mode.
* Navigator: do not engage RTL at all if already on mission landing
* Navigator: consider to be on mission landing if the LOITER_TO_ALT and dist small
To find out if we're currently on a mission landing, check if we either are
past the land start marker OR currently land start marker is current WP,
the type is LOITER_TO_ALT and the vehicle is inside loiter.
---------
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This fixes the case where the hardware detection fails on CubeBlack when
a CAN device is connected to CAN1 and talking, and therefore preventing
the check from getting a clear result.
Signed-off-by: Julian Oes <julian@oes.ch>
This consolidates the version/revision detection function.
This should allow for actual changes in a follow up commit.
Signed-off-by: Julian Oes <julian@oes.ch>