PX4 Firmware
PX4 Autopilot Software http://px4.io
TerrainEstimator Class Reference

#include <terrain_estimator.h>

Collaboration diagram for TerrainEstimator:

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
 

Detailed Description

Definition at line 59 of file terrain_estimator.h.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
private
Enumerator
n_x 

Definition at line 76 of file terrain_estimator.h.

Constructor & Destructor Documentation

◆ TerrainEstimator()

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().

Here is the call graph for this function:

◆ ~TerrainEstimator()

TerrainEstimator::~TerrainEstimator ( )
default

Member Function Documentation

◆ get_distance_to_ground()

float TerrainEstimator::get_distance_to_ground ( )
inline

Definition at line 66 of file terrain_estimator.h.

◆ get_velocity()

float TerrainEstimator::get_velocity ( )
inline

Definition at line 67 of file terrain_estimator.h.

References attitude, dt, and gps.

◆ is_distance_valid()

bool TerrainEstimator::is_distance_valid ( float  distance)
private

Definition at line 56 of file terrain_estimator.cpp.

References f().

Referenced by measurement_update().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ is_valid()

bool TerrainEstimator::is_valid ( )
inline

Definition at line 65 of file terrain_estimator.h.

◆ measurement_update()

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 
)

◆ predict()

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().

Here is the call graph for this function:

Member Data Documentation

◆ _distance_last

float TerrainEstimator::_distance_last
private

Definition at line 78 of file terrain_estimator.h.

Referenced by measurement_update().

◆ _P

matrix::Matrix<float, 3, 3> TerrainEstimator::_P
private

Definition at line 84 of file terrain_estimator.h.

Referenced by measurement_update(), predict(), and TerrainEstimator().

◆ _terrain_valid

bool TerrainEstimator::_terrain_valid
private

Definition at line 79 of file terrain_estimator.h.

Referenced by measurement_update().

◆ _time_last_distance

uint64_t TerrainEstimator::_time_last_distance
private

Definition at line 87 of file terrain_estimator.h.

Referenced by measurement_update().

◆ _time_last_gps

uint64_t TerrainEstimator::_time_last_gps
private

Definition at line 88 of file terrain_estimator.h.

Referenced by measurement_update().

◆ _u_z

float TerrainEstimator::_u_z
private

Definition at line 83 of file terrain_estimator.h.

Referenced by predict(), and TerrainEstimator().

◆ _x

matrix::Vector<float, n_x> TerrainEstimator::_x
private

Definition at line 82 of file terrain_estimator.h.

Referenced by measurement_update(), predict(), and TerrainEstimator().


The documentation for this class was generated from the following files: