MAV'RIC
Public Member Functions
Sonar_sim Class Reference

Simulation for sonars. More...

#include <sonar_sim.hpp>

Inheritance diagram for Sonar_sim:
Inheritance graph
[legend]
Collaboration diagram for Sonar_sim:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Sonar_sim (Dynamic_model &dynamic_model, sonar_sim_conf_t config=sonar_sim_default_config())
 Constructor.
bool init (void)
 Initialise the sensor.
bool update (void)
 Main update function Reads new values from sensor.
const float & last_update_us (void) const
 Get last update time in microseconds.
const std::array< float, 3 > & orientation_bf (void) const
 Get sensor orientation relative to the platform (in body frame)
const float & distance (void) const
 Get latest distance measure.
const float & velocity (void) const
 Get velocity estimate from consecutive measurements.
const bool & healthy (void) const
 Indicates whether the measurements can be trusted.

Detailed Description

Simulation for sonars.


Constructor & Destructor Documentation

Sonar_sim::Sonar_sim ( Dynamic_model dynamic_model,
sonar_sim_conf_t  config = sonar_sim_default_config() 
)

Constructor.

Parameters:
dynamic_modelReference to dynamic model
configConfiguration

Member Function Documentation

const float & Sonar_sim::distance ( void  ) const [virtual]

Get latest distance measure.

Returns:
Value

Implements Sonar.

const bool & Sonar_sim::healthy ( void  ) const [virtual]

Indicates whether the measurements can be trusted.

Returns:
Value

Implements Sonar.

bool Sonar_sim::init ( void  ) [virtual]

Initialise the sensor.

Returns:
Success

Implements Sonar.

const float & Sonar_sim::last_update_us ( void  ) const [virtual]

Get last update time in microseconds.

Returns:
Update time

Implements Sonar.

const std::array< float, 3 > & Sonar_sim::orientation_bf ( void  ) const [virtual]

Get sensor orientation relative to the platform (in body frame)

Returns:
3D orientation

Implements Sonar.

Here is the caller graph for this function:

bool Sonar_sim::update ( void  ) [virtual]

Main update function Reads new values from sensor.

Returns:
Success

H: scalar (altitude) D: scalar (measure) z: down vector ||z||=1 u: sensor vector ||u||=1

With Altitude = H.z Distance = D.u

We have D = H / (u.z)

Implements Sonar.

Here is the call graph for this function:

const float & Sonar_sim::velocity ( void  ) const [virtual]

Get velocity estimate from consecutive measurements.

Returns:
Value

Implements Sonar.


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines