- remove GPS failsafe mode
- for VTOL: transition to hover in Descend (unless NAV_FORCE_VT is not set)
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
Signed-off-by: RomanBapst <bapstroman@gmail.com>
commander: support orbit mode for fixed wings
Signed-off-by: RomanBapst <bapstroman@gmail.com>
FwPositionControl: publish orbit status
Signed-off-by: RomanBapst <bapstroman@gmail.com>
commander:reject orbit mode while doing a vtol transition
Signed-off-by: RomanBapst <bapstroman@gmail.com>
FixedWingPositionControl: explicitly cast waypoint for Orbit status
FixedwingPositionControl: fill missing orbit_status fields
navigator_main: handle reposition/orbit corner cases
- set orbit rotation direction correctly
- send mavlink message when orbit is rejected
FixedWingPositionControl: correctly report rotation direction in orbit_status
navigator: hack to not break orbit while doing altitude changes
Signed-off-by: RomanBapst <bapstroman@gmail.com>
navigator: set cruise throttle for orbit command
Signed-off-by: RomanBapst <bapstroman@gmail.com>
Publishes periodically (max every 1 min) a warning if the current wind estimate
is above COM_WIND_WARN.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This fixes the case where we sometimes switch to altitude control
instead of position control when RC is regained.
What happens is that we detect that the pilot wants to take over control
right when RC comes back. This means that we try to go in position
control in main_state_transition, however, we are already in position
control because we come back from the failsafe state. The result of
main_state_transition is then TRANSITION_NOT_CHANGED, and therefore we
"fall back" to altitude control even though being already in position
control would have been fine.
This fix checks the return result of main_state_transition correctly and
only reacts to TRANSITION_CHANGED and TRANSITION_DENIED but ignores
TRANSITION_NOT_CHANGED.
- no longer start sercon or mavlink usb by default
- on USB connection (VBUS) monitor serial USB at low rate and start Mavlink if there's a HEARTBEAT or nshterm on 3 consecutive carriage returns
- the mavlink USB instance is automatically stopped and serdis executed if USB is disconnected
- skipping Mavlink USB (and sercon) saves a considerable amount of memory on older boards
Using mixers on the IO side had a remote benefit of being able to
override all control surfaces with a radio remote on a fixed wing.
This ended up not being used that much and since the original design
10 years ago (2011) we have been able to convince ourselves that the
overall system stability is at a level where this marginal benefit,
which is not present on multicopters, is not worth the hazzle.
Co-authored-by: Beat Küng <beat-kueng@gmx.net>
Co-authored-by: Daniel Agar <daniel@agar.ca>
EKF2 has a grace period of 10 seconds after boot where it doesn't need
to warn the user while the sensors (especially GNSS) are still
converging.
A connection to a GCS shouldn't skip this grace period but
an arming request should.
* commander: send parachute command on termination
This sends the DO_PARACHUTE command to parachute component.
* commander: fix lying comments and printf
* commander: use one flag for termination triggered
This merges the duplicate flags _flight_termination_triggered and
_flight_flight_termination_printed.
* commander: correct variable name
* commander: always send tune with parachute
* commander: fix target_component for parachute cmd
The previous changes were wrong in that all commands were now sent to
the parachute component which doesn't make any sense. Of course only the
parachute command should be sent there.
When user override using the RC sticks is allowed, I would expect this
feature to also work in the case where GPS is lost and the vehicle goes
into a blind land/descent.
Without this commit, the vehicle would switch to Land mode and a pilot
could not take over control unless they switch to Altitude control in
a ground station.
With this commit, user override works as I would expect it and it will
switch to Altitude control allowing a pilot to recover in this
situation.