Skip to main content
Orbit control modules translate a desired trajectory into executable delta-V commands. The main subsystem is the Lambert pipeline, which chains four modules — lambertPlanner, lambertSolver, lambertValidator, and lambertSecondDV — to compute, validate, and command two-impulse orbit transfers.

Lambert pipeline overview

The four Lambert modules form a data pipeline:
navTransMsg


lambertPlanner  ──►  lambertProblemMsg


                    lambertSolver  ──►  lambertSolutionMsg

                          ┌──────────────────┘

                    lambertValidator  ──►  dvBurnCmdMsg  (first ΔV)

                    lambertSecondDV  ──►  dvBurnCmdMsg  (second ΔV)

Lambert planner (lambertPlanner)

Propagates the current spacecraft state to a specified maneuver time using a 4th-order Runge-Kutta (RK4) integrator and two-body point-mass gravity, then packages the result as a LambertProblemMsgPayload for the solver. You specify the target position, final arrival time, and maneuver execution time.

Messages

VariableTypeDirectionDescription
navTransInMsgNavTransMsgPayloadInputCurrent spacecraft translational state
lambertProblemOutMsglambertProblemMsgPayloadOutputLambert problem parameters

Configuration example

from Basilisk.fswAlgorithms import lambertPlanner
import numpy as np

planner = lambertPlanner.LambertPlanner()
planner.ModelTag = "lambertPlanner"
planner.setR_TN_N(np.array([0.0, 8000.0e3, 0.0]))   # [m]  target position
planner.setFinalTime(2000.0)                           # [s]  arrival epoch
planner.setManeuverTime(1000.0)                        # [s]  burn epoch
planner.setMu(3.986004418e14)                          # [m^3/s^2]  gravitational parameter
planner.setNumRevolutions(0)
planner.useSolverIzzoMethod()                          # Izzo algorithm (default)

planner.navTransInMsg.subscribeTo(navTransMsg)
scSim.AddModelToTask(taskName, planner)

Lambert solver (lambertSolver)

Solves Lambert’s problem: given two position vectors and a time-of-flight, it finds the two velocity vectors of the connecting conic arc. You can choose between the Gooding algorithm and the Izzo algorithm. Both support elliptic, parabolic, and hyperbolic transfers, and multi-revolution solutions. In the zero-revolution case there is exactly one solution. In the multi-revolution case (one or more complete orbits around the central body), either two solutions or none exist depending on whether the requested time of flight exceeds the minimum for that number of revolutions. The output message always contains two solution slots; invalid slots have zero velocity vectors and validity = 0.

Messages

VariableTypeDirectionDescription
lambertProblemInMsglambertProblemMsgPayloadInputProblem setup (positions, time-of-flight, μ)
lambertSolutionOutMsgLambertSolutionMsgPayloadOutputTwo velocity-vector solutions and validity flags
lambertPerformanceOutMsgLambertPerformanceMsgPayloadOutputSolver convergence information

Configuration example

from Basilisk.fswAlgorithms import lambertSolver
from Basilisk.architecture import messaging
import numpy as np

solver = lambertSolver.LambertSolver()
solver.ModelTag = "lambertSolver"
solver.setAlignmentThreshold(1.0)   # [deg] threshold for colinear-vector edge case

solver.lambertProblemInMsg.subscribeTo(planner.lambertProblemOutMsg)
scSim.AddModelToTask(taskName, solver)

# or supply the problem via a standalone message:
probMsgData = messaging.LambertProblemMsgPayload()
probMsgData.solverMethod = messaging.IZZO
probMsgData.r1_N = np.array([10000.0e3, 0.0, 0.0])   # [m]
probMsgData.r2_N = np.array([0.0, 8000.0e3, 0.0])    # [m]
probMsgData.transferTime = 10000.0                    # [s]
probMsgData.mu = 3.986004418e14                       # [m^3/s^2]
probMsgData.numRevolutions = 0
probMsg = messaging.LambertProblemMsg().write(probMsgData)
solver.lambertProblemInMsg.subscribeTo(probMsg)

Lambert validator (lambertValidator)

Verifies that the delta-V computed from the Lambert solution keeps the spacecraft away from the central body and within a maximum distance of the target at arrival. It propagates 27 perturbed initial states (accounting for state and delta-V uncertainty) to the final time and checks each trajectory against the constraints. Only when all trajectories pass does it write a non-zero DvBurnCmdMsgPayload.

Messages

VariableTypeDirectionDescription
navTransInMsgNavTransMsgPayloadInputCurrent spacecraft state
lambertProblemInMsglambertProblemMsgPayloadInputProblem parameters
lambertSolutionInMsgLambertSolutionMsgPayloadInputSolver output
lambertPerformanceInMsgLambertPerformanceMsgPayloadInputSolver convergence data
dvBurnCmdOutMsgDvBurnCmdMsgPayloadOutputValidated first delta-V command

Configuration example

from Basilisk.fswAlgorithms import lambertValidator
import numpy as np

validator = lambertValidator.LambertValidator()
validator.ModelTag = "lambertValidator"
validator.setFinalTime(2000.0)                          # [s]
validator.setManeuverTime(1000.0)                       # [s]
validator.setMaxDistanceTarget(3000.0)                  # [m]
validator.setMinOrbitRadius(6378.0e3)                   # [m]  Earth surface
validator.setUncertaintyStates(                         # [m, m/s] Hill-frame 1-sigma
    np.diag([5.0, 5.0, 5.0, 0.01, 0.01, 0.001]))
validator.setUncertaintyDV(0.1)                         # [m/s]
validator.setDvConvergenceTolerance(0.01)               # [m/s]

validator.navTransInMsg.subscribeTo(navTransMsg)
validator.lambertProblemInMsg.subscribeTo(planner.lambertProblemOutMsg)
validator.lambertSolutionInMsg.subscribeTo(solver.lambertSolutionOutMsg)
validator.lambertPerformanceInMsg.subscribeTo(solver.lambertPerformanceOutMsg)
scSim.AddModelToTask(taskName, validator)

Lambert second delta-V (lambertSecondDV)

Computes the delta-V required at the end of the Lambert arc to match a desired target velocity. It reads the second velocity vector from LambertSolutionMsgPayload and subtracts the expected velocity from DesiredVelocityMsgPayload. The output is zeroed when the Lambert solution is invalid.

Messages

VariableTypeDirectionDescription
lambertSolutionInMsgLambertSolutionMsgPayloadInputLambert arc solution
desiredVelocityInMsgDesiredVelocityMsgPayloadInputTarget velocity at arrival
dvBurnCmdOutMsgDvBurnCmdMsgPayloadOutputSecond delta-V command
from Basilisk.fswAlgorithms import lambertSecondDV

secondDV = lambertSecondDV.LambertSecondDV()
secondDV.ModelTag = "lambertSecondDV"
secondDV.lambertSolutionInMsg.subscribeTo(solver.lambertSolutionOutMsg)
secondDV.desiredVelocityInMsg.subscribeTo(desiredVelMsg)
scSim.AddModelToTask(taskName, secondDV)

Orbital element offset (orbElemOffset)

Computes a reference position that is offset from a chief spacecraft by specified differences in classical orbital elements. Use this module for formation-flying missions where you want to maintain a fixed relative orbit expressed in orbital element differences.

Small-body waypoint feedback (smallBodyWaypointFeedback)

A proportional feedback controller for proximity operations around a small body. You specify a series of position waypoints in the small body’s Hill frame; the module computes the required thrust force to drive the spacecraft through the sequence.
The Lambert pipeline assumes two-body point-mass gravity and a Keplerian coasting arc between the current state and the maneuver time. For high-fidelity trajectories with perturbations, propagate the reference externally and supply the corrected maneuver position directly.

Build docs developers (and LLMs) love