mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 03:21:35 +08:00
Merge remote-tracking branch 'upstream/master' into fw_autoland_att_tecs
Conflicts: src/lib/ecl/attitude_fw/ecl_pitch_controller.cpp src/lib/ecl/attitude_fw/ecl_roll_controller.cpp src/modules/fw_att_control/fw_att_control_main.cpp
This commit is contained in:
@@ -34,7 +34,7 @@
|
|||||||
/**
|
/**
|
||||||
* @file KalmanNav.cpp
|
* @file KalmanNav.cpp
|
||||||
*
|
*
|
||||||
* kalman filter navigation code
|
* Kalman filter navigation code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <poll.h>
|
#include <poll.h>
|
||||||
@@ -228,10 +228,7 @@ void KalmanNav::update()
|
|||||||
updateSubscriptions();
|
updateSubscriptions();
|
||||||
|
|
||||||
// initialize attitude when sensors online
|
// initialize attitude when sensors online
|
||||||
if (!_attitudeInitialized && sensorsUpdate &&
|
if (!_attitudeInitialized && sensorsUpdate) {
|
||||||
_sensors.accelerometer_counter > 10 &&
|
|
||||||
_sensors.gyro_counter > 10 &&
|
|
||||||
_sensors.magnetometer_counter > 10) {
|
|
||||||
if (correctAtt() == ret_ok) _attitudeInitCounter++;
|
if (correctAtt() == ret_ok) _attitudeInitCounter++;
|
||||||
|
|
||||||
if (_attitudeInitCounter > 100) {
|
if (_attitudeInitCounter > 100) {
|
||||||
@@ -643,7 +640,7 @@ int KalmanNav::correctAtt()
|
|||||||
|
|
||||||
if (beta > _faultAtt.get()) {
|
if (beta > _faultAtt.get()) {
|
||||||
warnx("fault in attitude: beta = %8.4f", (double)beta);
|
warnx("fault in attitude: beta = %8.4f", (double)beta);
|
||||||
warnx("y:\n"); y.print();
|
warnx("y:"); y.print();
|
||||||
}
|
}
|
||||||
|
|
||||||
// update quaternions from euler
|
// update quaternions from euler
|
||||||
|
|||||||
Reference in New Issue
Block a user