mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
ekf2-pos bias estimator: use enum
This commit is contained in:
parent
a3515a2474
commit
5ca22df55c
@ -1140,11 +1140,11 @@ private:
|
||||
void resetQuatStateYaw(float yaw, float yaw_variance);
|
||||
|
||||
HeightSensor _height_sensor_ref{HeightSensor::UNKNOWN};
|
||||
uint8_t _position_sensor_ref{static_cast<uint8_t>(PositionSensor::GNSS)};
|
||||
PositionSensor _position_sensor_ref{PositionSensor::GNSS};
|
||||
|
||||
#if defined(CONFIG_EKF2_EXTERNAL_VISION)
|
||||
HeightBiasEstimator _ev_hgt_b_est{HeightSensor::EV, _height_sensor_ref};
|
||||
PositionBiasEstimator _ev_pos_b_est{static_cast<uint8_t>(PositionSensor::EV), _position_sensor_ref};
|
||||
PositionBiasEstimator _ev_pos_b_est{PositionSensor::EV, _position_sensor_ref};
|
||||
AlphaFilter<Quatf> _ev_q_error_filt{0.001f};
|
||||
bool _ev_q_error_initialized{false};
|
||||
#endif // CONFIG_EKF2_EXTERNAL_VISION
|
||||
|
||||
@ -39,11 +39,12 @@
|
||||
#define EKF_POSITION_BIAS_ESTIMATOR_HPP
|
||||
|
||||
#include "bias_estimator.hpp"
|
||||
#include "common.h"
|
||||
|
||||
class PositionBiasEstimator
|
||||
{
|
||||
public:
|
||||
PositionBiasEstimator(uint8_t sensor, const uint8_t &sensor_ref):
|
||||
PositionBiasEstimator(PositionSensor sensor, const PositionSensor &sensor_ref):
|
||||
_sensor(sensor),
|
||||
_sensor_ref(sensor_ref)
|
||||
{}
|
||||
@ -107,8 +108,8 @@ public:
|
||||
private:
|
||||
BiasEstimator _bias[2] {};
|
||||
|
||||
const uint8_t _sensor;
|
||||
const uint8_t &_sensor_ref;
|
||||
const PositionSensor _sensor;
|
||||
const PositionSensor &_sensor_ref;
|
||||
|
||||
bool _is_sensor_fusion_active{false}; // TODO: replace by const ref and remove setter when migrating _control_status.flags from union to bool
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user