PX4 Firmware
PX4 Autopilot Software http://px4.io
|
#include <terrain_estimator.h>
Public Member Functions | |
TerrainEstimator () | |
~TerrainEstimator ()=default | |
bool | is_valid () |
float | get_distance_to_ground () |
float | get_velocity () |
void | predict (float dt, const struct vehicle_attitude_s *attitude, const struct sensor_combined_s *sensor, const struct distance_sensor_s *distance) |
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) |
Private Types | |
enum | { n_x = 3 } |
Private Member Functions | |
bool | is_distance_valid (float distance) |
Private Attributes | |
float | _distance_last |
bool | _terrain_valid |
matrix::Vector< float, n_x > | _x |
float | _u_z |
matrix::Matrix< float, 3, 3 > | _P |
uint64_t | _time_last_distance |
uint64_t | _time_last_gps |
Definition at line 59 of file terrain_estimator.h.
|
private |
Enumerator | |
---|---|
n_x |
Definition at line 76 of file terrain_estimator.h.
TerrainEstimator::TerrainEstimator | ( | ) |
Definition at line 45 of file terrain_estimator.cpp.
References _P, _u_z, _x, matrix::Matrix< Type, M, N >::setIdentity(), and matrix::Matrix< Type, M, N >::zero().
|
default |
|
inline |
Definition at line 66 of file terrain_estimator.h.
|
inline |
Definition at line 67 of file terrain_estimator.h.
|
private |
Definition at line 56 of file terrain_estimator.cpp.
References f().
Referenced by measurement_update().
|
inline |
Definition at line 65 of file terrain_estimator.h.
void TerrainEstimator::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 | ||
) |
Definition at line 100 of file terrain_estimator.cpp.
References _distance_last, _P, _terrain_valid, _time_last_distance, _time_last_gps, _x, distance_sensor_s::current_distance, DISTANCE_TIMEOUT, vehicle_gps_position_s::fix_type, is_distance_valid(), n_x, matrix::Euler< Type >::phi(), vehicle_attitude_s::q, matrix::Matrix< Type, M, N >::setZero(), matrix::Euler< Type >::theta(), vehicle_gps_position_s::timestamp, distance_sensor_s::timestamp, matrix::Matrix< Type, M, N >::transpose(), vehicle_gps_position_s::vel_d_m_s, and matrix::Matrix< Type, M, N >::zero().
void TerrainEstimator::predict | ( | float | dt, |
const struct vehicle_attitude_s * | attitude, | ||
const struct sensor_combined_s * | sensor, | ||
const struct distance_sensor_s * | distance | ||
) |
Definition at line 61 of file terrain_estimator.cpp.
References _P, _u_z, _x, sensor_combined_s::accelerometer_m_s2, CONSTANTS_ONE_G, dt, vehicle_attitude_s::q, matrix::Matrix< Type, M, N >::setZero(), and matrix::Matrix< Type, M, N >::transpose().
|
private |
Definition at line 78 of file terrain_estimator.h.
Referenced by measurement_update().
|
private |
Definition at line 84 of file terrain_estimator.h.
Referenced by measurement_update(), predict(), and TerrainEstimator().
|
private |
Definition at line 79 of file terrain_estimator.h.
Referenced by measurement_update().
|
private |
Definition at line 87 of file terrain_estimator.h.
Referenced by measurement_update().
|
private |
Definition at line 88 of file terrain_estimator.h.
Referenced by measurement_update().
|
private |
Definition at line 83 of file terrain_estimator.h.
Referenced by predict(), and TerrainEstimator().
|
private |
Definition at line 82 of file terrain_estimator.h.
Referenced by measurement_update(), predict(), and TerrainEstimator().