compute_sun_noaa#
-
namespace saltro
-
namespace orbits
Functions
-
bool compute_sun_noaa(Eigen::Matrix<double, 3, saltro::limits::MAX_LENGTH_TRAJ> &R, const Eigen::Matrix<double, 1, saltro::limits::MAX_LENGTH_TRAJ> &jtime, const int jtime_length, Eigen::Matrix<double, 3, saltro::limits::MAX_LENGTH_TRAJ> &S)#
Compute Sun position vectors using the NOAA solar position model.
Evaluates the Sun direction and distance relative to the spacecraft for each trajectory sample using the NOAA solar position algorithm. The model provides the heliocentric direction from Earth based on Julian centuries and converts it to a spacecraft-relative Sun vector.
For each trajectory sample \(k\), the Sun vector is computed as:
\[ \mathbf{S}_k = \mathbf{r}_{\odot}(t_k) - \mathbf{R}_k \]where:
\(\mathbf{r}_{\odot}(t_k)\) is the Sun position in an Earth-centered inertial frame at time \(t_k\),
\(\mathbf{R}_k\) is the spacecraft position vector (meters),
\(\mathbf{S}_k\) is the resulting spacecraft-to-Sun vector (meters).
The NOAA model computes the apparent solar longitude, right ascension, and declination from Julian centuries \(T\), then constructs the Sun position vector in the inertial frame. The resulting vectors include the Sun–Earth distance (approximately 1 AU).
The output Sun vector matrix is written column-wise:
\[ \mathbf{S} = \begin{bmatrix} \mathbf{S}_0 & \mathbf{S}_1 & \cdots & \mathbf{S}_{N-1} \end{bmatrix} \]- Parameters:
R – Spacecraft position vectors (meters). Each column corresponds to one trajectory sample.
jtime – Julian centuries associated with each trajectory sample.
jtime_length – Number of valid trajectory samples.
S – Output spacecraft-to-Sun vectors (meters), column-wise.
- Returns:
True if the computation succeeds for all samples, false otherwise.
-
bool compute_sun_noaa(Eigen::Matrix<double, 3, saltro::limits::MAX_LENGTH_TRAJ> &R, const Eigen::Matrix<double, 1, saltro::limits::MAX_LENGTH_TRAJ> &jtime, const int jtime_length, Eigen::Matrix<double, 3, saltro::limits::MAX_LENGTH_TRAJ> &S)#
-
namespace orbits