|
| VN300 (USART &usart, int userBaudRate, VN300Defs::SampleOptions sampleOption, CRCOptions crc, std::chrono::milliseconds timeout, VN300Defs::AntennaPosition antPosA={0.0, 0.0, 0.0, 0.0, 0.0, 0.0}, VN300Defs::AntennaPosition antPosB={1.0, 0.0, 0.0, 0.0, 0.0, 0.0}, Eigen::Matrix3f rotMat=Eigen::Matrix3f::Identity()) |
| Constructor.
|
|
bool | init () override |
| Initialize the sensor.
|
|
bool | selfTest () override |
| Check if the sensor is working.
|
|
| Sensor () |
|
| Sensor (Sensor &&other) |
|
virtual | ~Sensor () |
|
void | sample () override |
| Sample the sensor.
|
|
virtual VN300Data | getLastSample () |
|
virtual | ~AbstractSensor () |
|
SensorErrors | getLastError () |
| Get last error for debugging purposes. Avoid silent fails.
|
|
| VNCommonSerial (USART &usart, int baudrate, const char *sensorName, CRCOptions crc, const std::chrono::milliseconds timeout) |
| Constructor.
|
|
| ~VNCommonSerial () |
|
bool | closeAndReset () |
| Method to reset the sensor to default values and to close the connection. Used if you need to close and re initialize the sensor.
|
|
bool | startHSIEstimator (uint8_t convergeRate) |
| Start the real-time hard/soft iron calibration. The algorithm will continue until stopHSIEstimator() is called.
|
|
bool | stopHSIEstimator () |
| Real-time hard/soft iron calibration algorithm is turned off.
|
|
std::string | getHSIEstimatorValues () |
|
bool | setMagnetometerCompensation (const Eigen::Matrix3f &c, const Eigen::Vector3f &b) |
| Set custom compensation parameters for the magnetometer.
|
|
bool | setAccelerometerCompensation (const Eigen::Matrix3f &c, const Eigen::Vector3f &b) |
| Set custom compensation parameters for the accelerometer.
|
|
bool | setGyroscopeCompensation (const Eigen::Matrix3f &c, const Eigen::Vector3f &b) |
| Set custom compensation parameters for the gyroscope.
|
|
bool | saveConfiguration () |
| Write the current register settings into non-volatile memory. Once the settings are stored in non-volatile (Flash) memory, the VN module can be power cycled or reset, and the register will be reloaded from non-volatile memory.
|
|
bool | restoreFactorySettings () |
| Restore the VN module’s factory default settings and reset the module.
|
|
|
VN300Data | sampleImpl () override |
| Sample action implementation.
|
|
uint8_t | calculateChecksum8 (const uint8_t *message, int length) |
| Calculate the 8bit checksum on the given array.
|
|
uint16_t | calculateChecksum16 (const uint8_t *message, int length) |
| Calculate the 16bit array on the given array.
|
|
bool | verifyChecksum (char *command, int maxLength) |
| Method to verify the crc validity of a command.
|
|
bool | disableAsyncMessages (bool waitResponse) |
| Disables the async messages that the sensor is default configured to send at 40Hz on startup.
|
|
bool | setCrc (bool waitResponse=true) |
| Sets the user selected crc method.
|
|
void | configDefaultSerialPort () |
| Configures the default serial communication.
|
|
bool | configUserSerialPort () |
| Configures the user defined serial communication.
|
|
bool | verifyModelNumber (const char *expectedModelNumber) |
| Verify the model number of the sensor.
|
|
template<typename T > |
bool | getBinaryOutput (T &binaryData, const char *const sampleCommand) |
| Utility function used to retrieve the binary output from the sensor.
|
|
uint8_t | checkErrorVN (const char *message) |
| Check if the message received from the sensor contains an error.
|
|
bool | sendStringCommand (std::string command) |
| Sends the command to the sensor with the correct checksum added so '*' symbol is not needed at the end of the string as well as the '$' at the beginning of the command. This function takes into account the time needed for the command to reach the sensor. DO NOT USE THIS FUNCTION IF LOW EXECUTION TIME IS NEEDED (for example when sending the sample command).
|
|
bool | recvStringCommand (char *command, int maxLength) |
| Receives a command from the sensor but swaps the first
with a \0 to close the message.
|
|
bool | writeRegister (const std::string &command) |
| Utility function used to set a register on the sensor. This function relies on sendStringCommand: DO NOT USE THIS FUNCTION IF LOW EXECUTION TIME IS NEEDED.
|
|
Driver class for VN300 IMU.
Definition at line 37 of file VN300.h.