18#if !__APPLE__ && !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32)
19 #include "Navio/Common/InertialSensor.h"
48 [[nodiscard]] std::string
type()
const override;
51 [[nodiscard]]
static std::string
category();
58 [[nodiscard]]
json save()
const override;
85#if !__APPLE__ && !defined(WIN32) && !defined(_WIN32) && !defined(__WIN32)
99 std::chrono::time_point<std::chrono::steady_clock>
_startTime;
nlohmann::json json
json namespace
Manages a thread which calls a specified function at a specified interval.
Imu(const Imu &)=delete
Copy constructor.
CallbackTimer _timer
Timer object to handle async data requests.
bool initialize() override
Initialize the node.
float _ay
Accelerometer Y data, which are read into by the sensor.
float _az
Accelerometer Z data, which are read into by the sensor.
static void readImuThread(void *userData)
Function which performs the async data reading.
std::string type() const override
String representation of the Class Type.
static std::string typeStatic()
String representation of the Class Type.
Navio2Sensor()
Default constructor.
float _ax
Accelerometer X data, which are read into by the sensor.
void guiConfig() override
ImGui config window which is shown on double click.
bool resetNode() override
Resets the node. It is guaranteed that the node is initialized when this is called.
json save() const override
Saves the node into a json object.
ImuType
Enumeration of IMUs on the Navio2.
float _mx
Magnetometer X data, which are read into by the sensor.
~Navio2Sensor() override
Destructor.
static constexpr size_t OUTPUT_PORT_INDEX_IMU_OBS
Flow (ImuObs)
void restore(const json &j) override
Restores the node from a json object.
float _my
Magnetometer Y data, which are read into by the sensor.
int _outputFrequency
OutputFrequency to calculate rateDivisor field.
Navio2Sensor(Navio2Sensor &&)=delete
Move constructor.
float _gy
Gyroscope Y data, which are read into by the sensor.
float _gz
Gyroscope Z data, which are read into by the sensor.
std::chrono::time_point< std::chrono::steady_clock > _startTime
Start Time to calculate the TimeSinceStartup.
static std::string category()
String representation of the Class Category.
Navio2Sensor & operator=(Navio2Sensor &&)=delete
Move assignment operator.
ImuType _imuType
The Imu type.
Navio2Sensor & operator=(const Navio2Sensor &)=delete
Copy assignment operator.
Navio2Sensor(const Navio2Sensor &)=delete
Copy constructor.
void deinitialize() override
Deinitialize the node.
std::unique_ptr< InertialSensor > _sensor
Sensor object.
float _gx
Gyroscope X data, which are read into by the sensor.
float _mz
Magnetometer Z data, which are read into by the sensor.