Baro data arriving too soon after the last measurement due to a high sampling rate or timing jitter is rejected inside the ecl EKF to prevent the data buffer overflowing.
This patch checks the timestamp difference from the last measurement, and if to small, the data is accumulated and the average sent to the EKF when the time delta
is acceptable.
Fixes:
1) Invalid data with a zero time stamp could be the EKF ends up in the data buffers and result in loss of 'good' data from the buffers
2) Magnetometer data was arriving at a rate faster than the data buffers could handle resulting in loss of data.
If the replay data for the baro or mag data has a zero time stamp, then the corresponding relative timestamp published over the combined sensor topic must be se to RELATIVE_TIMESTAMP_INVALID so that the ekf2 module does not try to use this data.
* Fix jmavsim HITL simulation of MAV_CMD_DO_REPOSITION in the case where you have no radio attached to the PX4 and so you have disabled RC link loss for that reason (set NAV_RCL_ACT = 0) but you still want the jmavsimulation to work. The line of code changed here causes failsafe RTL to kick in without this fix.
* Add altitude hold option using Z position control, while doing velocity control on vx and vy.
* Fix style and rebase issues
This saves ~1.1KB of RAM for systems with only 1 sensor of each type.
If there are more sensors, they will be dynamically added, such that
failover still works.
Current implementation checks against geofence only if it is in polygon form.
When it's created via params, it accepts all the waypoints as the number of vertices = 0.
Thus, changed the function to the one that is used to check whether geofence is breached in flight.
Update the comment, to explain how to achive a different perescale
value.
Added PX4_IO_TIMER_ALTERNATE_RATE one board agnostic ifdef
PX4_IO_TIMER_ALTERNATE_RATE that is non board specific.
N.B. I would like to eliminate PX4_IO_TIMER_ALTERNATE_RATE
as well, but I need crazyflie HW to validate that the startup
script can just set the rate on the PWM to 3921 fast enough to
not effect the motors.
1) Remove uneeded spi and reset code
2) Use the Board commin for providing the BOARD_NAME
3) Add PX4_PWM_ALTERNATE_RANGES in suport of a board agnostic
way to override the PWM_.*_{MIN|MAX} values
4) Remove #ifdefs from the IO timers*. Drive the config deltas
from the crazyflie_timer_config.c and one board agnostic
ifdef PX4_IO_TIMER_ALTERNATE_RATE that is non board specific
*I would like to eliminate PX4_IO_TIMER_ALTERNATE_RATE
as well, but I need HW to validate that the startup
script can just set the rate on the PWM to 3921 fast
enough to not effect the motors.