27 #include "IVMXTimestampedAHRSDataSubscriber.h" 30 class ContinuousAngleTrackerVMX;
61 friend class ::VMXZero;
63 AHRS(SPIClient& client, PIGPIOClient& pigpio, uint8_t update_rate_hz);
79 friend class AHRSInternal;
80 AHRSInternal * ahrs_internal;
85 volatile float compass_heading;
86 volatile float world_linear_accel_x;
87 volatile float world_linear_accel_y;
88 volatile float world_linear_accel_z;
89 volatile float mpu_temp_c;
90 volatile float fused_heading;
91 volatile float altitude;
92 volatile float baro_pressure;
93 volatile bool is_moving;
94 volatile bool is_rotating;
95 volatile float baro_sensor_temp_c;
96 volatile bool altitude_valid;
97 volatile bool is_magnetometer_calibrated;
98 volatile bool magnetic_disturbance;
99 volatile float quaternionW;
100 volatile float quaternionX;
101 volatile float quaternionY;
102 volatile float quaternionZ;
106 float displacement[3];
110 volatile int16_t raw_gyro_x;
111 volatile int16_t raw_gyro_y;
112 volatile int16_t raw_gyro_z;
113 volatile int16_t raw_accel_x;
114 volatile int16_t raw_accel_y;
115 volatile int16_t raw_accel_z;
116 volatile int16_t cal_mag_x;
117 volatile int16_t cal_mag_y;
118 volatile int16_t cal_mag_z;
121 volatile uint8_t update_rate_hz;
122 volatile int16_t accel_fsr_g;
123 volatile int16_t gyro_fsr_dps;
124 volatile int16_t capability_flags;
125 volatile uint8_t op_status;
126 volatile int16_t sensor_status;
127 volatile uint8_t cal_status;
128 volatile uint8_t selftest_status;
131 volatile uint8_t board_type;
132 volatile uint8_t hw_rev;
133 volatile uint8_t fw_ver_major;
134 volatile uint8_t fw_ver_minor;
136 long last_sensor_timestamp;
137 double last_update_time;
139 ContinuousAngleTrackerVMX *yaw_angle_tracker;
144 #define MAX_NUM_CALLBACKS 3 146 void *callback_contexts[MAX_NUM_CALLBACKS];
153 float GetCompassHeading();
155 bool IsCalibrating();
157 double GetByteCount();
158 double GetUpdateCount();
159 long GetLastSensorTimestamp();
160 float GetWorldLinearAccelX();
161 float GetWorldLinearAccelY();
162 float GetWorldLinearAccelZ();
165 float GetBarometricPressure();
167 bool IsAltitudeValid();
168 float GetFusedHeading();
169 bool IsMagneticDisturbance();
170 bool IsMagnetometerCalibrated();
171 float GetQuaternionW();
172 float GetQuaternionX();
173 float GetQuaternionY();
174 float GetQuaternionZ();
175 void ResetDisplacement();
176 void UpdateDisplacement(
float accel_x_g,
float accel_y_g,
177 int update_rate_hz,
bool is_moving );
178 float GetVelocityX();
179 float GetVelocityY();
180 float GetVelocityZ();
181 float GetDisplacementX();
182 float GetDisplacementY();
183 float GetDisplacementZ();
190 float GetRawAccelX();
191 float GetRawAccelY();
192 float GetRawAccelZ();
199 std::string GetFirmwareVersion();
203 bool BlockOnNewCurrentRegisterData(uint32_t timeout_ms, uint8_t *first_reg_addr_out, uint8_t *p_data_out, uint8_t requested_len, uint8_t *p_len_out);
204 bool ReadConfigurationData(uint8_t first_reg_addr, uint8_t *p_data_out, uint8_t requested_len);
206 int GetActualUpdateRate();
207 int GetRequestedUpdateRate();
212 void commonInit( uint8_t update_rate_hz );
213 static int ThreadFunc(IIOProviderRpi *io_provider);
215 uint8_t GetActualUpdateRateInternal(uint8_t update_rate);
Top-level Library Class providing access to all VMX-pi functionality.
Definition: VMXPi.h:40
Describes the currently-configured Omnimount IMU configuration.
Definition: AHRS.h:46
The AHRS class provides accesst to the VMX-pi IMU and Attitude/Heading Reference System functionality...
Definition: AHRS.h:59
SerialDataType
Definition: AHRS.h:67
Top-level Library Class providing access to all VMXzero functionality.
Definition: VMXZero.h:40
The IVMXTimestampedAHRSDataSubscriber interface provides a method for consumers of navX-Model device ...
Definition: IVMXTimestampedAHRSDataSubscriber.h:50