siderust-cpp 0.8.0
Header-only C++ wrapper for siderust
Loading...
Searching...
No Matches
siderust::lambert Namespace Reference

Namespaces

namespace  detail
 

Classes

struct  Diagnostics
 Householder-iteration diagnostics accompanying a Lambert solution. More...
 
struct  Solution
 Complete solution to a Lambert boundary-value problem. More...
 

Enumerations

enum class  Branch : int { Prograde = 0 , Retrograde = 1 }
 Branch selector for the Lambert solver. More...
 

Functions

Solution solve (const double(&r1_km)[3], const double(&r2_km)[3], double tof_s, double mu_km3_s2, Branch branch=Branch::Prograde)
 Solve Lambert's single-revolution two-point boundary-value problem.
 
Solution solve (const std::array< double, 3 > &r1_km, const std::array< double, 3 > &r2_km, double tof_s, double mu_km3_s2, Branch branch=Branch::Prograde)
 Overload accepting std::array<double,3> positions.
 
std::ostream & operator<< (std::ostream &os, const Solution &sol)
 Stream a Lambert solution (velocities in km/s).
 

Enumeration Type Documentation

◆ Branch

enum class siderust::lambert::Branch : int
strong

Branch selector for the Lambert solver.

Enumerator
Prograde 

Direct (prograde) single-revolution transfer.

Retrograde 

Retrograde single-revolution transfer.

Definition at line 36 of file lambert.hpp.

Function Documentation

◆ operator<<()

std::ostream & siderust::lambert::operator<< ( std::ostream &  os,
const Solution sol 
)
inline

◆ solve() [1/2]

Solution siderust::lambert::solve ( const double(&)  r1_km[3],
const double(&)  r2_km[3],
double  tof_s,
double  mu_km3_s2,
Branch  branch = Branch::Prograde 
)
inline

Solve Lambert's single-revolution two-point boundary-value problem.

Parameters
r1_kmDeparture position [x, y, z] in km (3 elements).
r2_kmArrival position [x, y, z] in km (3 elements).
tof_sTime of flight in seconds.
mu_km3_s2Gravitational parameter of the central body, km³·s⁻².
branchPrograde (default) or retrograde transfer.
Returns
Solution Departure/arrival velocities and solver diagnostics.
Exceptions
siderust::InvalidArgumentErrorif the solver fails to converge or the input geometry is degenerate.
Examples
16_lambert_earth_to_mars.cpp.

Definition at line 84 of file lambert.hpp.

References siderust::lambert::detail::solve_impl().

◆ solve() [2/2]

Solution siderust::lambert::solve ( const std::array< double, 3 > &  r1_km,
const std::array< double, 3 > &  r2_km,
double  tof_s,
double  mu_km3_s2,
Branch  branch = Branch::Prograde 
)
inline

Overload accepting std::array<double,3> positions.

Definition at line 90 of file lambert.hpp.

References siderust::lambert::detail::solve_impl().