When switching into Hold mode establish a Loiter around current position,
even if we were before already loitering (eg in Mission mode).
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
5s is a more reasobale time for tailsitters, which rely differently on this param
than other VTOL types. Tailsitters will ramp the pitch up withing this time,
while for other VTOLS types its only the max transitiont time.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This is now using the advanced lift drag plugin.
The important step was to enable airmode for yaw, otherwise yaw gets
saturated at low throttle and we can barely roll.
The other trick was to raise airspeed a little bit to avoid operating
too much at the lower end of throttle where control authority is low.
Signed-off-by: Julian Oes <julian@oes.ch>
* uavcan rtcm set max num injections
* Subscribe to all instances of gps_inject_data and mirror uavcan rtcm pub mirror gps driver
* Minor logic refactor in gps and uavcan gps inject data
Before this the ESC calibration aborts if battery detection doesn't work.
The problem is if the user still connects the battery as he gets instructed
and the calibration aborts then the ESCs are in calibration mode and
after abortion calibrate to the wrong value.
Also I realized there's no additional safety by aborting the calibration
if the battery cannot be detected during the timeout because a pixhawk
board without power module will report a battery status from the
ADC driverand in it that no battery is connected which is the best
it can do. In this situation the motors will still spin if the
ESCs are powered.
Some ESCs e.g. Gaui enter the menu relatively quickly if the
signal is high for too long. To solve that it's kept high shorter.
Also all tested ESCs detect the low signal within a shorter time
so no need to wait longer.
- Change timings for a more reliable calibration.
- Make sure there's an error message when battery measurement is not
available also when it gets disabled after system boot in the power
just above the calibration button.
- Safety check if measured electrical current goes up after issuing the
high calibration value for the case the user did not unplug power
and the detection either fails or is not enforced.
This adds support for the TI LP5562 RGB LED driver.
Things to note:
- The driver is initialized in simple PWM mode using its internal clock,
for R,G,B, but not for W(hite).
- The chip doesn't have a WHO_AM_I or DEVICE_ID register to check.
Instead we read the W_CURRENT register that we're generally not using
and therefore doesn't get changed.
- The current is left at the default 17.5 mA but could be changed using
the command line argument.
Datasheet:
https://www.ti.com/lit/ds/symlink/lp5562.pdf
Signed-off-by: Julian Oes <julian@oes.ch>
The entire logic did not work for the case when the throttle channel is
reversed because then QGC sets trim = max for that channel and
the result is only half the throttle range.
set_vtol_transition_item sets the params of the mission item directly
to values that make sense for NAV_CMD_DO_VTOL_TRANSITION, but don't
for other NAV_CMDs. So make sure that whenever we use it, we then in
the next step reset the touched mission_item fields.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
* refactored uncommanded descend quadchute
- use fixed altitude error threshold
- compute error relative to higest altitude the vehicle has achieved
since it has flown below the altitude reference (setpoint)
* disabled altitude loss quadchute by default
* altitude loss quadchute: added protection against invalid local z
---------
Signed-off-by: RomanBapst <bapstroman@gmail.com>
- re-enable once the estimator selector respects configured mag
priority (at least initially) or is otherwise able to automatically
prefer an external mag over internal
- for SITL disabled because the full matrix of esitmator instances
(IMUs X mags) was too many topics for logger currently
- sitl_gazebo-classic in PX4/Firmware (599a66c8a5): 3f2b9678af
- sitl_gazebo-classic current upstream: 2e3ed9bfb0
- Changes: 3f2b9678af...2e3ed9bfb0
2e3ed9b 2023-05-14 JaeyoungLim - Add Quadtailsitter model based on the swan K1 (#982)
670d4d2 2023-05-12 Julian Oes - airspeed: rotate tube so it faces forward (#981)
803254d 2023-05-11 Julian Oes - tailsitter: add valid inertia, fix CG (#980)
6fd1d17 2023-05-09 JaeyoungLim - Fix advanced plane model (#979)
506f10c 2023-05-05 Julian Oes - iris: move IMU and GPS where they are (#978)
Transitions in Stabilized mode are done manually, the pilot controls the pitch angle
and if it's above the threshold the transition is declared finished (plus airspeed
check for front transition). Thus we can't have fixed thresholds but need to link
them to the actual max pitch angle in Stabilized mode.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
We currently fuse 0 as airspeed rate measurement, and thus simply low-pass
filter the airspeed measurements. Testing has shown that the current default
on the airspeed rate measurement noise is set to low, and thus the airspeed
mesurement is filtered too much.
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
A VTOL plane in MC mode has no yaw setpoint during takeoff because of
weather-vane. To align for the front transition, the yaw target jumps
and caused a step in the controller, making it reach saturation.
With this commit, the previous yaw setpoint is set to the current yaw
when no yaw setpoint is sent in order to create a smooth yaw trajectory
starting at the current orientation when yaw target is suddenly finite.
The yawspeed filter also now contains the yaw speed instead of dyaw in
order to prevent chattering due to dt jitter.