102
edits
Line 17: | Line 17: | ||
The RidgeRun Integrator Interface, known as IIntegrator, is an extensible class design to support various types of integrators. To add a new integrator to it, the user must implement a new integrator class that derives from the IIntegrator class. This class must implement the following methods: | The RidgeRun Integrator Interface, known as IIntegrator, is an extensible class design to support various types of integrators. To add a new integrator to it, the user must implement a new integrator class that derives from the IIntegrator class. This class must implement the following methods: | ||
* Apply: applies the integrator algorithm to the entry orientation data. | * Apply: applies the integrator algorithm to the entry orientation data. | ||
* Reset: | * Reset: resets the initial orientation and its initial base on a desired value. | ||
==== Defining the Apply method ==== | ==== Defining the Apply method ==== | ||
This method receives two parameters: | This method receives two parameters: | ||
* | * softgyro: This parameter contains the result of integrating the initial orientation data. It includes a vector of orientation values represented as Quaternions with their corresponding timestamps. | ||
* rawgyro: This parameter contains | * rawgyro: This parameter contains raw sensor data, which may include measurements from the gyroscope, accelerometer, and magnetometer. | ||
<syntaxhighlight lang=c++> | <syntaxhighlight lang=c++> | ||
Line 38: | Line 38: | ||
==== Defining the Reset method ==== | ==== Defining the Reset method ==== | ||
This method receives an orientation value as parameter and a time value (in microseconds) as parameter and | This method receives an orientation value as parameter and a time value (in microseconds) as parameter and resets integration based on them. | ||
<syntaxhighlight lang=c++> | <syntaxhighlight lang=c++> | ||
Line 46: | Line 46: | ||
/* Reset initial orientation and initial time logic */ | /* Reset initial orientation and initial time logic */ | ||
return ret; | return ret; |
edits