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. |
Protected Attributes¶
| Type | Name |
|---|---|
| std::optional< Array > | bias_instability_buffer_ |
| InertialSensorState | inertial_state_ |
| std::optional< Array > | quantization_noise_buffer_ |
| std::vector< Measurement > | rate_buffer_ |
| std::optional< Array > | rate_ramp_buffer_ |
| std::optional< Array > | rate_random_walk_buffer_ |
Protected Attributes inherited from inertialsim::sensors::Sensor¶
See inertialsim::sensors::Sensor
| Type | Name |
|---|---|
| bool | initialized_ |
| std::optional< double > | max_duration_ |
| SimulationMode | mode_ |
| const SensorModel & | model_ |
| int | noise_index_ |
| std::mt19937_64 | rng_ |
| double | sample_rate_ |
| const SensorSpecification & | specification_ |
| SensorState | state_ |
| std::optional< Array > | wgn_buffer_ |
Protected Functions¶
| Type | Name |
|---|---|
| virtual void | Initialize (int samples, double sample_rate) override Initialize the sensor for simulation. |
Protected Functions inherited from inertialsim::sensors::Sensor¶
See inertialsim::sensors::Sensor
| Type | Name |
|---|---|
| virtual void | Initialize (int samples, double sample_rate) Initialize the sensor for simulation. |
| void | SetBias () Set bias parameters. |
| void | SetInputLimits () Set input limit parameters. |
| void | SetMisalignment () Set misalignment parameters. |
| virtual void | SetNoise (Eigen::Index samples, double sample_rate) Set noise parameters. |
| virtual void | SetQuantization () Set quantization parameters. |
| void | SetScaleFactor () Set scale factor parameters. |
| void | SimulateBias (Array & signal, const std::optional< Scalar1D > & temperature=std::nullopt) Simulate bias. |
| Measurement | SimulateFromRate (const geometry::Vector & signal, const std::optional< Scalar1D > & temperature=std::nullopt) Simulate sensor errors on a rate signal. |
| void | SimulateInputLimits (Array & signal) Simulate input limits. |
| Array | SimulateMisalignment (const Vector3D & signal) Simulate axis misalignment. |
| virtual void | SimulateNoise (Array & signal) Simulate noise. |
| void | SimulateScaleFactor (Array & signal) Simulate scale factor. |
| geometry::Vector | ValidateInput (const geometry::Vector & signal) Validate and potentially interpolate input 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:
modelModel options.specificationSensor specification.seedRandom number generator seed. If not provided (std::nullopt), the RNG is seeded with fresh randomness from std::random_device.modeSimulation mode (batch or real-time).max_durationMaximum 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 [½]¶
Get the inertial sensor state.
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¶
Protected Attributes Documentation¶
variable bias_instability_buffer_¶
variable inertial_state_¶
variable quantization_noise_buffer_¶
variable rate_buffer_¶
variable rate_ramp_buffer_¶
variable rate_random_walk_buffer_¶
Protected Functions Documentation¶
function Initialize¶
Initialize the sensor for simulation.
virtual void inertialsim::sensors::InertialSensor::Initialize (
int samples,
double sample_rate
) override
Parameters:
samplesNumber of samples to simulate.sample_rateSample rate in Hz.
Implements inertialsim::sensors::Sensor::Initialize
The documentation for this class was generated from the following file cpp/include/inertialsim/sensors/inertial_sensor.h