176 return imuCapability;
235 bool processNumber(
const std::string &dev,
const std::string &name,
double values[],
char *names[],
int n);
238 bool processSwitch(
const std::string &dev,
const std::string &name,
ISState *states,
char *names[],
int n);
241 bool processText(
const std::string &dev,
const std::string &name,
char *texts[],
char *names[],
int n);
258 virtual bool SetOrientationData(
double roll,
double pitch,
double yaw,
double w = 0.0);
363 virtual bool SetDeviceInfo(
const std::string &chipID,
const std::string &firmwareVersion,
const std::string &sensorStatus);
406 uint32_t imuCapability = 0;
Class to provide extended functionality for devices in addition to the functionality provided by INDI...
virtual bool ResetCalibration()
ResetCalibration Reset calibration data.
bool processSwitch(const std::string &dev, const std::string &name, ISState *states, char *names[], int n)
Process IMU switch properties.
CalibrationControlProperty
@ CALIBRATION_CONTROL_START
@ CALIBRATION_CONTROL_SAVE
@ CALIBRATION_CONTROL_LOAD
@ CALIBRATION_CONTROL_RESET
@ CALIBRATION_CONTROL_PROPERTY_COUNT
virtual bool SetOrientationData(double roll, double pitch, double yaw, double w=0.0)
SetOrientationData Set the orientation data (Roll, Pitch, Yaw, Quaternion W)
const std::string IMU_TAB
@ TEMPERATURE_PROPERTY_COUNT
virtual bool SetStabilityMonitoring(double vibrationLevel, double stabilityThreshold)
SetStabilityMonitoring Set vibration level and alert threshold.
virtual bool SaveCalibrationData()
SaveCalibrationData Save the current calibration data.
INDI::PropertyNumber TemperatureNP
bool saveConfigItems(FILE *fp)
saveConfigItems Save IMU properties in config file
CalibrationStatusProperty
@ CALIBRATION_STATUS_PROPERTY_COUNT
@ CALIBRATION_STATUS_ACCEL
@ CALIBRATION_STATUS_GYRO
virtual bool SetGyroscopeData(double x, double y, double z)
SetGyroscopeData Set the angular velocity data.
bool processText(const std::string &dev, const std::string &name, char *texts[], char *names[], int n)
Process IMU text properties.
INDI::PropertyNumber OrientationNP
INDI::PropertySwitch AngularUnitsSP
virtual bool SetAccelerationData(double x, double y, double z)
SetAccelerationData Set the linear acceleration data.
@ DISTANCE_UNITS_IMPERIAL
@ DISTANCE_UNITS_PROPERTY_COUNT
@ ANGULAR_UNITS_PROPERTY_COUNT
INDI::PropertyNumber StabilityMonitoringNP
@ ACCELERATION_PROPERTY_COUNT
uint32_t GetCapability() const
GetIMUCapability returns the capability of the IMU device.
@ ORIENTATION_PROPERTY_COUNT
@ ORIENTATION_QUATERNION_W
virtual bool LoadCalibrationData()
LoadCalibrationData Load previously saved calibration data.
virtual bool SetAngularUnits(bool degrees)
SetAngularUnits Set the angular units for sensor data.
@ GYROSCOPE_PROPERTY_COUNT
@ OPERATION_MODE_PROPERTY_COUNT
INDI::PropertyNumber UpdateRateNP
virtual bool SetTemperature(double temperature)
SetTemperature Set the internal chip temperature.
virtual bool SetMagnetometerData(double x, double y, double z)
SetMagnetometerData Set the magnetic field strength data.
INDI::PropertyText DeviceInfoTP
INDI::PropertyNumber AccelerationNP
INDI::PropertySwitch CalibrationControlSP
INDI::PropertyLight CalibrationStatusLP
virtual bool StartCalibration()
StartCalibration Initiate the calibration sequence.
virtual bool SetDeviceInfo(const std::string &chipID, const std::string &firmwareVersion, const std::string &sensorStatus)
SetDeviceInfo Set chip ID, firmware version, and sensor status.
INDI::PropertyNumber GyroscopeNP
const std::string COORDINATES_TAB
StabilityMonitoringProperty
@ STABILITY_MONITORING_STABILITY_THRESHOLD
@ STABILITY_MONITORING_PROPERTY_COUNT
@ STABILITY_MONITORING_VIBRATION_LEVEL
virtual bool SetCalibrationStatus(int sys, int gyro, int accel, int mag)
SetCalibrationStatus Set the calibration status for each sensor.
virtual bool SetDistanceUnits(bool metric)
SetUnits Set the units for sensor data.
@ DEVICE_INFO_SENSOR_STATUS
@ DEVICE_INFO_FIRMWARE_VERSION
@ DEVICE_INFO_PROPERTY_COUNT
bool HasStabilityMonitoring()
bool updateProperties()
updateProperties Define or Delete IMU properties based on the connection status of the base device
bool processNumber(const std::string &dev, const std::string &name, double values[], char *names[], int n)
Process IMU number properties.
virtual bool SetPowerMode(const std::string &mode)
SetPowerMode Set the power mode of the IMU sensor.
virtual ~IMUInterface()=default
virtual bool SetUpdateRate(double rate)
SetUpdateRate Set the sensor polling frequency.
const std::string STATUS_TAB
@ UPDATE_RATE_PROPERTY_COUNT
@ MAGNETOMETER_PROPERTY_COUNT
INDI::PropertyNumber DataThresholdNP
INDI::PropertyNumber MagnetometerNP
@ POWER_MODE_PROPERTY_COUNT
INDI::PropertySwitch OperationModeSP
INDI::PropertySwitch DistanceUnitsSP
INDI::PropertySwitch PowerModeSP
void SetCapability(uint32_t cap)
SetIMUCapability sets the IMU capabilities. All capabilities must be initialized.
const std::string CALIBRATION_TAB
void initProperties(const std::string &groupName)
Initialize IMU properties. It is recommended to call this function within initProperties() of your pr...
virtual bool SetOperationMode(const std::string &mode)
SetOperationMode Set the operation mode of the IMU sensor.
Namespace to encapsulate INDI client, drivers, and mediator classes.
Holds the capabilities of an IMU device.