mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
Merge branch 'master' of github.com:PX4/Firmware into control_state
This commit is contained in:
@@ -104,13 +104,13 @@ endef
|
|||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
# Do not put any spaces between function arguments.
|
# Do not put any spaces between function arguments.
|
||||||
|
|
||||||
px4fmu-v1_default:
|
px4fmu-v1_default: git-init
|
||||||
$(call cmake-build,nuttx_px4fmu-v1_default)
|
$(call cmake-build,nuttx_px4fmu-v1_default)
|
||||||
|
|
||||||
px4fmu-v2_default:
|
px4fmu-v2_default: git-init
|
||||||
$(call cmake-build,nuttx_px4fmu-v2_default)
|
$(call cmake-build,nuttx_px4fmu-v2_default)
|
||||||
|
|
||||||
px4fmu-v2_simple:
|
px4fmu-v2_simple: git-init
|
||||||
$(call cmake-build,nuttx_px4fmu-v2_simple)
|
$(call cmake-build,nuttx_px4fmu-v2_simple)
|
||||||
|
|
||||||
nuttx_sim_simple:
|
nuttx_sim_simple:
|
||||||
@@ -181,6 +181,11 @@ distclean: clean
|
|||||||
@git clean -d -f -x
|
@git clean -d -f -x
|
||||||
@cd ../../../..
|
@cd ../../../..
|
||||||
|
|
||||||
|
# XXX this is not the right way to fix it, but we need a temporary solution
|
||||||
|
# for average joe
|
||||||
|
git-init:
|
||||||
|
@git submodule update --init --recursive
|
||||||
|
|
||||||
# targets handled by cmake
|
# targets handled by cmake
|
||||||
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak libuavcan
|
cmake_targets = test upload package package_source debug debug_tui debug_ddd debug_io debug_io_tui debug_io_ddd check_weak libuavcan
|
||||||
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
$(foreach targ,$(cmake_targets),$(eval $(call cmake-targ,$(targ))))
|
||||||
|
|||||||
@@ -180,6 +180,7 @@ private:
|
|||||||
hrt_abstime _last_accel;
|
hrt_abstime _last_accel;
|
||||||
hrt_abstime _last_mag;
|
hrt_abstime _last_mag;
|
||||||
unsigned _prediction_steps;
|
unsigned _prediction_steps;
|
||||||
|
uint64_t _prediction_last;
|
||||||
|
|
||||||
struct sensor_combined_s _sensor_combined;
|
struct sensor_combined_s _sensor_combined;
|
||||||
|
|
||||||
|
|||||||
@@ -159,6 +159,7 @@ AttitudePositionEstimatorEKF::AttitudePositionEstimatorEKF() :
|
|||||||
_last_accel(0),
|
_last_accel(0),
|
||||||
_last_mag(0),
|
_last_mag(0),
|
||||||
_prediction_steps(0),
|
_prediction_steps(0),
|
||||||
|
_prediction_last(0),
|
||||||
|
|
||||||
_sensor_combined{},
|
_sensor_combined{},
|
||||||
|
|
||||||
@@ -1069,11 +1070,12 @@ void AttitudePositionEstimatorEKF::updateSensorFusion(const bool fuseGPS, const
|
|||||||
_covariancePredictionDt += _ekf->dtIMU;
|
_covariancePredictionDt += _ekf->dtIMU;
|
||||||
|
|
||||||
// only fuse every few steps
|
// only fuse every few steps
|
||||||
if (_prediction_steps < MAX_PREDICITION_STEPS) {
|
if (_prediction_steps < MAX_PREDICITION_STEPS && ((hrt_absolute_time() - _prediction_last) < 20 * 1000)) {
|
||||||
_prediction_steps++;
|
_prediction_steps++;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
_prediction_steps = 0;
|
_prediction_steps = 0;
|
||||||
|
_prediction_last = hrt_absolute_time();
|
||||||
}
|
}
|
||||||
|
|
||||||
// perform a covariance prediction if the total delta angle has exceeded the limit
|
// perform a covariance prediction if the total delta angle has exceeded the limit
|
||||||
|
|||||||
Reference in New Issue
Block a user