ModelSpace
All Classes Namespaces Functions Variables Enumerations Pages
Lambert.h
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/*
17Lambert Solver header file
18---------------------------
19This file contains the ATTX Lambert Solver utility and associated
20functions which build upon it.
21
22Author: Alex Reynolds
23*/
24#ifndef GNC_GUIDANCE_LAMBERT_H
25#define GNC_GUIDANCE_LAMBERT_H
26
27#include "core/CartesianVector.hpp"
28#include "core/macros.h"
29
30namespace clockwerk {
31 /// @brief Function to implement Battin's solution to solve Lambert's problem
32 /// @param x1 The initial position vector in Lambert's problem
33 /// @param x2 The final position vector in Lambert's problem
34 /// @param tof The time of flight, in seconds
35 /// @param mu The grativational parameter
36 /// @param cfl The number of "continued fraction levels". A higher number generates a more accurate solution. 10 is a good default.
37 /// @param tol The solution tolerance -- once met, solution is considered "converged" and returns
38 /// @param max_iter The maximum allowable iterations
39 /// @param a The semimajor axis of the defined orbit
40 /// @param p The semi-latus rectum of the defined orbit
41 /// @param v1 The velocity vector at x1 to meet the x2 and TOF constraints
42 /// @param v2 The velocity vector at x2
43 /// @return Error code corresponding to success/failure
44 /// @note Function is implemented from MATLAB code provided by Dr. Pernicka of Missouri S&T
45 int lambertSolver(const CartesianVector3D &x1, const CartesianVector3D &x2, double tof,
46 double mu, int cfl, double tol, int max_iter, double &a, double &p,
48}
49
50#endif
#define CartesianVector3D
Definition macros.h:54