Skip to content

Class inertialsim::sensors::InertialSensor

ClassList > inertialsim > sensors > InertialSensor

Base class for inertial sensors (gyros and accelerometers). More...

  • #include <inertial_sensor.h>

Inherits the following classes: inertialsim::sensors::Sensor

Inherited by the following classes: inertialsim::sensors::Accelerometer, inertialsim::sensors::Gyro

Public Functions

Type Name
InertialSensor (const InertialSensorModel & model, const InertialSensorSpecification & specification, std::optional< uint64_t > seed=std::nullopt, SimulationMode mode=SimulationMode::BATCH, std::optional< double > max_duration=std::nullopt)
Construct an InertialSensor .
virtual const InertialSensorModel & model () override const
Get the inertial sensor model.
virtual const InertialSensorSpecification & specification () override const
Get the inertial sensor specification.
virtual InertialSensorState & state () override
Get the inertial sensor state.
virtual const InertialSensorState & state () override const
~InertialSensor () override

Public Functions inherited from inertialsim::sensors::Sensor

See inertialsim::sensors::Sensor

Type Name
Sensor (const SensorModel & model, const SensorSpecification & specification, std::optional< uint64_t > seed=std::nullopt, SimulationMode mode=SimulationMode::BATCH, std::optional< double > max_duration=std::nullopt)
Construct a Sensor .
virtual const SensorModel & model () const
Get the sensor model.
const std::mt19937_64 & rng () const
Get the rng generator.
virtual const SensorSpecification & specification () const
Get the sensor specification.
virtual SensorState & state ()
Get the sensor state.
virtual const SensorState & state () const
virtual ~Sensor () = default

Public Static Functions inherited from inertialsim::sensors::Sensor

See inertialsim::sensors::Sensor

Type Name
Array ApplyQuantization (const Array & signal, const SpecificationArray & quantization)
Apply quantization to a signal.

Detailed Description

Extends Sensor with additional noise sources and delta output support.

Public Functions Documentation

function InertialSensor

Construct an InertialSensor .

inertialsim::sensors::InertialSensor::InertialSensor (
    const  InertialSensorModel & model,
    const  InertialSensorSpecification & specification,
    std::optional< uint64_t > seed=std::nullopt,
    SimulationMode mode=SimulationMode::BATCH,
    std::optional< double > max_duration=std::nullopt
) 

Parameters:

  • model Model options.
  • specification Sensor specification.
  • seed Random number generator seed. If not provided (std::nullopt), the RNG is seeded with fresh randomness from std::random_device.
  • mode Simulation mode (batch or real-time).
  • max_duration Maximum simulation duration in seconds.

function model

Get the inertial sensor model.

inline virtual const  InertialSensorModel & inertialsim::sensors::InertialSensor::model () override const

Returns:

Inertial sensor model.

Implements inertialsim::sensors::Sensor::model


function specification

Get the inertial sensor specification.

inline virtual const  InertialSensorSpecification & inertialsim::sensors::InertialSensor::specification () override const

Returns:

Inertial sensor specification.

Implements inertialsim::sensors::Sensor::specification


function state [1/2]

Get the inertial sensor state.

inline virtual InertialSensorState & inertialsim::sensors::InertialSensor::state () override

Returns:

Inertial sensor state.

Implements inertialsim::sensors::Sensor::state


function state [2/2]

inline virtual const  InertialSensorState & inertialsim::sensors::InertialSensor::state () override const

Implements inertialsim::sensors::Sensor::state


function ~InertialSensor

inertialsim::sensors::InertialSensor::~InertialSensor () override


The documentation for this class was generated from the following file cpp/include/inertialsim/sensors/inertial_sensor.h