| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | #ifndef SRC_CALIBRATE_CALIBRATE_HPP_ | ||
| 2 | #define SRC_CALIBRATE_CALIBRATE_HPP_ | ||
| 3 | |||
| 4 | #include <utility> | ||
| 5 | |||
| 6 | #include "common/pipeline/stages.hpp" | ||
| 7 | #include "common/spatial/attitude-utils.hpp" | ||
| 8 | |||
| 9 | namespace found { | ||
| 10 | |||
| 11 | /** | ||
| 12 | * The CalibrationAlgorithm is an interface for | ||
| 13 | * algorithms that calibrate our orientation to the | ||
| 14 | * reference orientation | ||
| 15 | */ | ||
| 16 | class CalibrationAlgorithm : public FunctionStage<std::pair<EulerAngles, EulerAngles>, Quaternion> { | ||
| 17 | public: | ||
| 18 | // Constructs this | ||
| 19 | 12 | CalibrationAlgorithm() = default; | |
| 20 | // Destroys this | ||
| 21 | 56 | virtual ~CalibrationAlgorithm() = default; | |
| 22 | }; | ||
| 23 | |||
| 24 | /** | ||
| 25 | * The LostCalibrationAlgorithm class houses the calibration algorithm that uses | ||
| 26 | * the orientation information from LOST to calibrate the camera's | ||
| 27 | * local orientation with the reference orientation (i.e. LOST's camera) | ||
| 28 | */ | ||
| 29 | class LOSTCalibrationAlgorithm : public CalibrationAlgorithm { | ||
| 30 | public: | ||
| 31 | // Constructs this | ||
| 32 | 12 | LOSTCalibrationAlgorithm() = default; | |
| 33 | /** | ||
| 34 | * Runs the calibration algorithm | ||
| 35 | * | ||
| 36 | * @param orientations The pair of orientations to use | ||
| 37 | * | ||
| 38 | * @return The quaternion that represents the calibration | ||
| 39 | * | ||
| 40 | * @note Set the reference orientation to 0 to make this absolute (i.e., | ||
| 41 | * the orientation of this camera becomes the relative rotation) | ||
| 42 | * | ||
| 43 | * @post The resulting quaternion is a backwards quaternion | ||
| 44 | */ | ||
| 45 | Quaternion Run(const std::pair<EulerAngles, EulerAngles> &orientations) override; | ||
| 46 | }; | ||
| 47 | |||
| 48 | } // namespace found | ||
| 49 | |||
| 50 | #endif // SRC_CALIBRATE_CALIBRATE_HPP_ | ||
| 51 |