test_lambertSolver
- test_lambertSolver.test_lambertSolver(show_plots, p1_solver, p2_revs, p3_times, p4_eccs, p5_angles, p6_align, accuracy)[source]
Validation Test Description
This test checks if the Lambert solver module works correctly for different Lambert solver algorithms, number of revolutions, time of flight, transfer orbit eccentricities, transfer angles, and position vector alignment threshold. The Lambert solver module is tested using the orbitalMotion libraries (for zero revolution scenarios), and using an external python implementation of the Izzo algorithm (for multi-revolution scenarios).
Test Parameters
- Parameters:
show_plots – flag if plots should be shown
p1_solver – Lambert solver algorithm
p2_revs – number of revolutions to be completed
p3_times – time-of-flight (transfer time)
p4_eccs – eccentricity of transfer orbit
p5_angles – transfer angle
p6_align – threshold for transfer angle being considered too small
Description of Variables Being Tested
The computed velocity vectors at position 1 and position 2 are compared to the true velocity vectors. For the zero-revolution case, the eccentricity and transfer angle parameters are used to determine the time-of-flight input for the Lambert solver, and the corresponding orbit elements are used to determine the true velocity vectors for the given position vectors. For the multi-revolution case, the time-of-flight parameter is used as the input for the Lambert solver, and the true velocity vectors are computed using an external Python script that uses Izzo’s algorithm to solve Lambert’s problem.
For the multi-revolution case, the solution for the free variable x is also tested.