lambertPlanner#
Executive Summary#
This module creates the lambertProblemMsgPayload message that is used as an input to the lambertSolver module. The message includes the required Lambert problem setup information, such as the two position vectors \(\mathbf{r}_{1}\) and \(\mathbf{r}_{2}\) as well as a requested time-of-flight. Given a targeted position vector \({}^N\mathbf{r}_{T/N}\) with respect to the celestial body at final time \(t_{final}\) expressed in the inertial frame \(N\), the final time \(t_{final}\), and the maneuver time \(t_{maneuver}\), the module uses a 4th order Runge-Kutta (RK4) to propagate the current state (obtained from the NavTransMsgPayload navigation input message) to obtain the estimated position at maneuver time. This estimated position corresponds to the first position vector \(\mathbf{r}_{1}\) of Lambert’s problem, while \({}^N\mathbf{r}_{T/N}\) corresponds to the second position vector \(\mathbf{r}_{2}\).
Message Connection Descriptions#
The following table lists all the module input and output messages. The module msg connection is set by the user from python. The msg type contains a link to the message structure definition, while the description provides information on what this message is used for.
Msg Variable Name |
Msg Type |
Description |
---|---|---|
navTransInMsg |
NavTransMsgPayload |
translational navigation input message |
lambertProblemOutMsg |
lambertProblemMsgPayload |
lambert problem setup output message |
Module Assumptions and Limitations#
The equations of motion used inside the module to propagate the state assume simple two body point mass gravity, and the motion is propagated using a 4th order Runge-Kutta (RK4). Additionally, this module assumes that \(t_{final} > t_{maneuver} \ge t\), with final time \(t_{final}\), maneuver time \(t_{maneuver}\) and current time \(t\).
Algorithm#
Equations of motion (two body point mass gravity) with gravitational parameter \(\mu\) and spacecraft position vector \(\mathbf{r}\):
User Guide#
The module is first initialized as follows:
module = lambertPlanner.LambertPlanner()
module.modelTag = "lambertPlanner"
module.r_TN_N = np.array([0., 8000. * 1000,0.])
module.finalTime = 2000.
module.maneuverTime = 1000.
module.mu = 3.986004418e14
module.numRevolutions = 0 # module defaults this value to 0 if not specified
module.useSolverIzzoMethod() # module uses Izzo by default if not specified
unitTestSim.AddModelToTask(unitTaskName, module)
The navigation translation message is then connected:
module.navTransInMsg.subscribeTo(navTransInMsg)
Class LambertPlanner#
-
class LambertPlanner : public SysModel#
This module creates the LambertProblemMsg to be used for the LambertSolver module.
Public Functions
-
LambertPlanner()#
This is the constructor for the module class. It sets default variable values and initializes the various parts of the model
-
~LambertPlanner()#
Module Destructor
-
void reset(uint64_t currentSimNanos) override#
This method is used to reset the module and checks that required input messages are connected.
- Parameters:
currentSimNanos – current simulation time in nano-seconds
- Returns:
void
-
void updateState(uint64_t currentSimNanos) override#
This is the main method that gets called every time the module is updated.
- Parameters:
currentSimNanos – current simulation time in nano-seconds
- Returns:
void
-
void useSolverIzzoMethod()#
This method sets the lambert solver algorithm that should be used to the method by Izzo.
- Returns:
void
-
void useSolverGoodingMethod()#
This method sets the lambert solver algorithm that should be used to the method by Gooding.
- Returns:
void
Public Members
translational navigation input message
-
Message<LambertProblemMsgPayload> lambertProblemOutMsg#
lambert problem output message
-
BSKLogger bskLogger#
— BSK Logging
-
Eigen::Vector3d r_TN_N#
[m] targeted position vector with respect to celestial body at finalTime, in N frame
-
double finalTime = {}#
[s] time at which target position should be reached
-
double maneuverTime = {}#
[s] time at which maneuver should be executed
-
double mu = {}#
[m^3 s^-2] gravitational parameter
-
int numRevolutions = 0#
[-] number of revolutions to be completed (completed orbits)
-
LambertPlanner()#