FOUND Coverage Report


src/
File: orbit/orbit.hpp
Date: 2025-11-20 21:57:26
Lines:
2/2
100.0%
Functions:
2/2
100.0%
Branches:
0/0
-%

Line Branch Exec Source
1 #ifndef SRC_ORBIT_ORBIT_HPP_
2 #define SRC_ORBIT_ORBIT_HPP_
3
4 #include <vector>
5 #include <utility>
6
7 #include "common/spatial/attitude-utils.hpp"
8 #include "common/pipeline/stages.hpp"
9 #include "common/style.hpp"
10
11 namespace found {
12
13 /**
14 * The OrbitPropagationAlgorithm is an algorithm that propagates an orbit
15 * over a specified time period.
16 */
17 class OrbitPropagationAlgorithm : public FunctionStage<LocationRecords, LocationRecords> {
18 public:
19 /// Constructs this
20 4 OrbitPropagationAlgorithm() = default;
21 /// Destroys this
22 8 virtual ~OrbitPropagationAlgorithm() {}
23 };
24
25 /**
26 * OrbitPropagationAlgorithm is a stage that propagates an orbit over a specified time period.
27 * It integrates the equations of motion to predict the satellite's trajectory using Runge-Kutta
28 * 4 (RK4).
29 */
30 class ApproximateOrbitPropagationAlgorithm : public OrbitPropagationAlgorithm {
31 public:
32 /**
33 * @brief Constructs this OrbitPropagationAlgorithm.
34 *
35 * @param totalTime The total time to predict over
36 * @param dt The time step for integration (seconds)
37 * @param radius The radius of the celestial body (default is for Earth, in km)
38 * @param mu The gravitational parameter (default is for Earth in km^3/s^2)
39 */
40 explicit ApproximateOrbitPropagationAlgorithm(decimal totalTime, decimal dt, decimal radius, decimal mu)
41 : totalTime_(totalTime), dt_(dt), radius_(radius), mu_(mu) {}
42
43 /// Destroys this
44 ~ApproximateOrbitPropagationAlgorithm();
45
46 /**
47 * Projects an orbit
48 *
49 * @param data The past data to use
50 *
51 * @return Predicted positions in the future
52 */
53 LocationRecords Run(const LocationRecords &data) override;
54
55 private:
56 /// The total time to predict over
57 decimal totalTime_;
58 /// The time step for integration (seconds)
59 decimal dt_;
60 /// The radius of the celestial body (default is for Earth, in km)
61 decimal radius_;
62 /// The gravitational parameter (default is for Earth in km^3/s^2)
63 decimal mu_;
64 };
65
66 } // namespace found
67
68 #endif // SRC_ORBIT_ORBIT_HPP_
69