Class inertialsim::sensors::Gyro¶
ClassList > inertialsim > sensors > Gyro
Simulate gyroscope (gyro) sensors. More...
#include <gyro.h>
Inherits the following classes: inertialsim::sensors::GyroImuComponents, inertialsim::sensors::InertialSensor
Public Attributes inherited from inertialsim::sensors::GyroImuComponents¶
See inertialsim::sensors::GyroImuComponents
| Type | Name |
|---|---|
| std::optional< GyroModel > | owned_model_ |
| std::optional< GyroSpecification > | owned_spec_ |
Public Functions¶
| Type | Name |
|---|---|
| Gyro (const GyroModel & model, const GyroSpecification & specification, std::optional< uint64_t > seed=std::nullopt, SimulationMode mode=SimulationMode::BATCH, std::optional< double > max_duration=std::nullopt) Construct a Gyro from a gyro model and specification. |
|
| Gyro (const IMUModel & model, const IMUSpecification & specification, std::optional< uint64_t > seed=std::nullopt, SimulationMode mode=SimulationMode::BATCH, std::optional< double > max_duration=std::nullopt) Construct a Gyro from anIMU model and specification. |
|
| GyroData | Simulate (const geometry::Vector & angular_rate, const std::optional< Scalar1D > & temperature=std::nullopt) Simulate gyro measurements from angular rate Vector. |
| GyroData | Simulate (const geometry::Vector & angular_rate, const geodesy::GlobalPose & global_pose, const std::optional< Scalar1D > & temperature=std::nullopt) Simulate gyro measurements from angular rate and global pose. |
| GyroData | Simulate (const geometry::Rotation & attitude, const std::optional< Scalar1D > & temperature=std::nullopt) Simulate gyro measurements from attitude. |
| GyroData | Simulate (const geodesy::GlobalPose & global_pose, const std::optional< Scalar1D > & temperature=std::nullopt) Simulate gyro measurements from global pose. |
| virtual const GyroSpecification & | specification () override const Get the gyro specification (covariant override). |
| ~Gyro () override |
Public Functions inherited from inertialsim::sensors::GyroImuComponents¶
See inertialsim::sensors::GyroImuComponents
| Type | Name |
|---|---|
| GyroImuComponents () = default |
|
| GyroImuComponents (const IMUModel & model, const IMUSpecification & specification) |
Public Functions inherited from inertialsim::sensors::InertialSensor¶
See inertialsim::sensors::InertialSensor
| 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 inherited from inertialsim::sensors::InertialSensor¶
See inertialsim::sensors::InertialSensor
| 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 inherited from inertialsim::sensors::InertialSensor¶
See inertialsim::sensors::InertialSensor
| 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. |
Protected Static Functions¶
| Type | Name |
|---|---|
| std::optional< Measurement > | Preintegrate (const Measurement & angular_rate, int stride) Pre-integrate angular rates to delta angles (batch mode). |
Detailed Description¶
A gyro is "an inertial sensor that measures angular rotation with respect to inertial space about its input axis(es)." [Standard 03].
Public Functions Documentation¶
function Gyro [½]¶
Construct a Gyro from a gyro model and specification.
inertialsim::sensors::Gyro::Gyro (
const GyroModel & model,
const GyroSpecification & specification,
std::optional< uint64_t > seed=std::nullopt,
SimulationMode mode=SimulationMode::BATCH,
std::optional< double > max_duration=std::nullopt
)
Parameters:
modelGyro model options.specificationGyro specification.seedRandom number generator seed (0 for random).modeSimulation mode (batch or real-time).max_durationMaximum simulation duration in seconds (required for real-time mode).
function Gyro [2/2]¶
Construct a Gyro from anIMU model and specification.
inertialsim::sensors::Gyro::Gyro (
const IMUModel & model,
const IMUSpecification & specification,
std::optional< uint64_t > seed=std::nullopt,
SimulationMode mode=SimulationMode::BATCH,
std::optional< double > max_duration=std::nullopt
)
Parameters:
modelIMU model options.specificationIMU specification.seedRandom number generator seed (0 for random).modeSimulation mode (batch or real-time).max_durationMaximum simulation duration in seconds.
function Simulate [¼]¶
Simulate gyro measurements from angular rate Vector.
GyroData inertialsim::sensors::Gyro::Simulate (
const geometry::Vector & angular_rate,
const std::optional< Scalar1D > & temperature=std::nullopt
)
Parameters:
angular_rateAngular rate Vector with time.temperatureOptional temperature array.
Returns:
GyroData with simulated measurements.
function Simulate [2/4]¶
Simulate gyro measurements from angular rate and global pose.
GyroData inertialsim::sensors::Gyro::Simulate (
const geometry::Vector & angular_rate,
const geodesy::GlobalPose & global_pose,
const std::optional< Scalar1D > & temperature=std::nullopt
)
The input angular rate must be relative to an Earth-fixed navigation frame. Earth's rotation rate will be added based on the global_pose to produce angular rate relative to inertial space.
Parameters:
angular_rateAngular rate Vector with time (relative to Earth frame).global_poseGlobalPose for Earth rate compensation.temperatureOptional temperature array.
Returns:
GyroData with simulated measurements.
function Simulate [¾]¶
Simulate gyro measurements from attitude.
GyroData inertialsim::sensors::Gyro::Simulate (
const geometry::Rotation & attitude,
const std::optional< Scalar1D > & temperature=std::nullopt
)
Angular rate is numerically calculated from the attitude time series.
Parameters:
attitudeRotation sequence with time.temperatureOptional temperature array.
Returns:
GyroData with simulated measurements.
function Simulate [4/4]¶
Simulate gyro measurements from global pose.
GyroData inertialsim::sensors::Gyro::Simulate (
const geodesy::GlobalPose & global_pose,
const std::optional< Scalar1D > & temperature=std::nullopt
)
Angular rate is computed from the pose's inertial angular rate, which includes the earth rate contribution.
Parameters:
global_poseGlobalPose with attitude and time information.temperatureOptional temperature array.
Returns:
GyroData with simulated measurements.
function specification¶
Get the gyro specification (covariant override).
inline virtual const GyroSpecification & inertialsim::sensors::Gyro::specification () override const
Returns:
Gyro specification.
Implements inertialsim::sensors::Sensor::specification
function ~Gyro¶
Protected Static Functions Documentation¶
function Preintegrate¶
Pre-integrate angular rates to delta angles (batch mode).
static std::optional< Measurement > inertialsim::sensors::Gyro::Preintegrate (
const Measurement & angular_rate,
int stride
)
Static method for batch pre-integration.
Parameters:
angular_rateAngular rate measurement.strideIntegration stride.
Returns:
Delta angle measurement, or nullopt if insufficient samples.
The documentation for this class was generated from the following file cpp/include/inertialsim/sensors/gyro.h