SignalK-Orientation 1.0.0
Orientation output in Signal K format for ESP32
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Private Attributes | List of all members
OrientationValues Class Reference

OrientationValues reads and outputs orientation parameters. More...

#include <orientation_sensor.h>

Collaboration diagram for OrientationValues:
Collaboration graph
[legend]

Public Types

enum  OrientationValType {
  kCompassHeading , kYaw , kPitch , kRoll ,
  kAttitude , kAccelerationX , kAccelerationY , kAccelerationZ ,
  kRateOfTurn , kRateOfPitch , kRateOfRoll , kTemperature ,
  kMagCalFitInUse , kMagCalFitTrial , kMagCalAlgorithmSolver , kMagInclination ,
  kMagFieldMagnitude , kMagFieldMagnitudeTrial , kMagNoiseCovariance
}
 

Public Member Functions

 OrientationValues (OrientationSensor *orientation_sensor, OrientationValType value_type=kCompassHeading)
 
float ReportValue (void)
 fetches current orientation parameter
 

Public Attributes

OrientationSensororientation_sensor_
 Pointer to the orientation sensor.
 

Private Attributes

OrientationValType value_type_
 Particular type of orientation parameter supplied.
 
uint report_interval_ms_
 Interval between data outputs via Signal K.
 
int8_t save_mag_cal_
 Flag for saving current magnetic calibration.
 
int throttlePrint_
 

Detailed Description

OrientationValues reads and outputs orientation parameters.

One parameter is sent per instance of OrientationValues, selected from the list of OrientationValType. The one exception is the attitude (yaw,pitch,roll) which consists of three parameters and is provided by the AttitudeValues class instead of this one. Create new instances in main.cpp for each parameter desired.

Definition at line 57 of file orientation_sensor.h.

Member Enumeration Documentation

◆ OrientationValType

Enumerator
kCompassHeading 

compass heading, also called yaw

kYaw 

rotation about the vertical axis

kPitch 

rotation about the transverse axis

kRoll 

rotation about the longitudinal axis

kAttitude 

attitude combines heading, pitch, and roll

kAccelerationX 

acceleration in the stern-to-bow axis

kAccelerationY 

acceleration in the starboard-to-port axis

kAccelerationZ 

acceleration in the down-to-up axis

kRateOfTurn 

rate of change of compass heading

kRateOfPitch 

rate of change of pitch

kRateOfRoll 

rate of change of roll

kTemperature 

temperature as reported by sensor IC

kMagCalFitInUse 

fit of currently-used calibration. <3.5 is good.

kMagCalFitTrial 

fit of candidate calibration. <3.5 is good.

kMagCalAlgorithmSolver 

cal algorithm order used. [0,4,7,10] 10 is best

kMagInclination 

geomagnetic inclination based on current readings

kMagFieldMagnitude 

geomagnetic magnitude of current calibration

kMagFieldMagnitudeTrial 

geomagnetic magnitude based on current readings

kMagNoiseCovariance 

deviation of current reading from calibrated geomag sphere

Definition at line 59 of file orientation_sensor.h.

Constructor & Destructor Documentation

◆ OrientationValues()

OrientationValues::OrientationValues ( OrientationSensor orientation_sensor,
OrientationValType  value_type = kCompassHeading 
)

Definition at line 111 of file orientation_sensor.cpp.

Member Function Documentation

◆ ReportValue()

float OrientationValues::ReportValue ( void  )

fetches current orientation parameter

Definition at line 122 of file orientation_sensor.cpp.

Member Data Documentation

◆ orientation_sensor_

OrientationSensor* OrientationValues::orientation_sensor_

Pointer to the orientation sensor.

Definition at line 85 of file orientation_sensor.h.

◆ report_interval_ms_

uint OrientationValues::report_interval_ms_
private

Interval between data outputs via Signal K.

Definition at line 95 of file orientation_sensor.h.

◆ save_mag_cal_

int8_t OrientationValues::save_mag_cal_
private

Flag for saving current magnetic calibration.

Definition at line 96 of file orientation_sensor.h.

◆ throttlePrint_

int OrientationValues::throttlePrint_
private

Definition at line 97 of file orientation_sensor.h.

◆ value_type_

OrientationValType OrientationValues::value_type_
private

Particular type of orientation parameter supplied.

Definition at line 94 of file orientation_sensor.h.


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