41 #include <px4_platform_common/defines.h> 43 #define DISTANCE_TIMEOUT 100000 // time in usec after which laser is considered dead 47 _terrain_valid(false),
48 _time_last_distance(0),
58 return (distance < 40.0f && distance > 0.00001
f);
92 dx(1) += B(1, 0) *
_u_z *
dt;
120 y(0) = d * cosf(euler.
phi()) * cosf(euler.
theta());
125 S_I = matrix::inv<float, 1> (S_I);
161 S_I = matrix::inv<float, 1>(S_I);
174 for (
int i = 0; i <
n_x; i++) {
175 if (!PX4_ISFINITE(
_x(i))) {
180 for (
int i = 0; i <
n_x; i++) {
181 for (
int j = 0; j <
n_x; j++) {
182 if (!PX4_ISFINITE(
_P(i, j))) {
191 _P(0, 0) =
_P(1, 1) =
_P(2, 2) = 0.1f;
bool is_distance_valid(float distance)
matrix::Vector< float, n_x > _x
Definition of geo / math functions to perform geodesic calculations.
float accelerometer_m_s2[3]
Matrix< Type, N, M > transpose() const
static constexpr float CONSTANTS_ONE_G
uint64_t _time_last_distance
matrix::Matrix< float, 3, 3 > _P
void measurement_update(uint64_t time_ref, const struct vehicle_gps_position_s *gps, const struct distance_sensor_s *distance, const struct vehicle_attitude_s *attitude)
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
Quaternion< float > Quatf
void predict(float dt, const struct vehicle_attitude_s *attitude, const struct sensor_combined_s *sensor, const struct distance_sensor_s *distance)