FOUND Coverage Report


src/
File: distance/vectorize.hpp
Date: 2025-11-20 21:57:26
Lines:
7/7
100.0%
Functions:
5/5
100.0%
Branches:
1/1
100.0%

Line Branch Exec Source
1 #ifndef SRC_DISTANCE_VECTORIZE_HPP_
2 #define SRC_DISTANCE_VECTORIZE_HPP_
3
4 #include "common/spatial/attitude-utils.hpp"
5 #include "common/style.hpp"
6 #include "common/pipeline/stages.hpp"
7
8 namespace found {
9
10 /**
11 * The VectorGenerationAlgorithm class houses the Vector Assembly Algorithm. This algorithm
12 * finds the position from Earth with respect to its center with a 3D Vector (Vec3).
13 *
14 */
15 class VectorGenerationAlgorithm : public FunctionStage<PositionVector, PositionVector> {
16 public:
17 // Constructs this
18 20 VectorGenerationAlgorithm() = default;
19 // Destroys this
20 40 virtual ~VectorGenerationAlgorithm() {}
21 };
22
23 /**
24 * The LOSTVectorGenerationAlgorithm class houses the a Vector Assembly Algorithm that calculates the
25 * position of the satellite using orientation information determined from LOST.
26 *
27 */
28 class LOSTVectorGenerationAlgorithm : public VectorGenerationAlgorithm {
29 public:
30 /**
31 * Creates a LOSTVectorGenerationAlgorithm object
32 *
33 * @param relativeOrientation The orientation of the FOUND camera with respect to the reference Orientation
34 * @param referenceOrientation The orientation of the reference orientation
35 *
36 * @pre You must use a backwards rotation quaternion here. Remember that
37 * forwards and backwards quaternions are conjugates.
38 */
39 9 explicit LOSTVectorGenerationAlgorithm(Quaternion relativeOrientation, Quaternion referenceOrientation)
40
1/1
✓ Branch 2 taken 9 times.
9 : orientation(relativeOrientation * referenceOrientation) {}
41
42 /**
43 * Creates a LOSTVectorGenerationAlgorithm object
44 *
45 * @param orientation The absolute orientation of the FOUND camera
46 *
47 * @pre You must use a backwards rotation quaternion here. Remember that
48 * forwards and backwards quaternions are conjugates.
49 */
50 6 explicit LOSTVectorGenerationAlgorithm(Quaternion orientation)
51 6 : orientation(orientation) {}
52
53 // Destroys this
54 46 ~LOSTVectorGenerationAlgorithm() = default;
55
56 /**
57 * Runs the Vector Assembly Algorithm, which finds the vector of the satellite with respect
58 * to Earth's center using information from LOST
59 *
60 * @pre This class was initialized by backwards quaternion(s)
61 *
62 * @param x_E The distance from Earth
63 *
64 * @return A PositionVector that represents the 3D Vector of the satellite relative to
65 * Earth's center
66 */
67 PositionVector Run(const PositionVector &x_E) override;
68
69 private:
70 // Fields specific to this algorithm go here, and helper methods
71
72 /// Orientation from LOST
73 Quaternion orientation;
74 };
75
76 /**
77 * FeatureDetectionVectorGenerationAlgorithm figures out
78 * the distance vector of the satellite relative to earth
79 * by identifying features on earth.
80 */
81 class FeatureDetectionVectorGenerationAlgorithm : public VectorGenerationAlgorithm {
82 public:
83 /**
84 * Place documentation here. Press enter to automatically make a new line
85 * */
86 FeatureDetectionVectorGenerationAlgorithm(/*Params to initialze fields for this object*/);
87
88 /**
89 * Place documentation here. Press enter to automatically make a new line
90 * */
91 ~FeatureDetectionVectorGenerationAlgorithm();
92
93 /**
94 * Place documentation here. Press enter to automatically make a new line
95 *
96 * @param x_E The position vector of the satellite with respect to the
97 * camera coordiinate system
98 *
99 * @return The position vector of the satellite with respect to the
100 * planet's inertial reference frame
101 * */
102 PositionVector Run(const PositionVector &x_E) override;
103 private:
104 // Fields specific to this algorithm go here, and helper methods
105 };
106
107 } // namespace found
108
109 #endif // SRC_DISTANCE_VECTORIZE_HPP_
110