https://github.com/yuricst/lambert.jl
Lambert problem solver in Julia
https://github.com/yuricst/lambert.jl
Last synced: 4 months ago
JSON representation
Lambert problem solver in Julia
- Host: GitHub
- URL: https://github.com/yuricst/lambert.jl
- Owner: Yuricst
- Created: 2021-12-18T18:42:37.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2025-01-31T04:28:30.000Z (over 1 year ago)
- Last Synced: 2025-11-30T03:34:36.631Z (7 months ago)
- Language: Julia
- Size: 69.3 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Lambert.jl
Fast Lambert problem solver in Julia and associated optimization problem formulation.
## Quick start
1. `git clone` this repository
2. start julia-repl
3. activate & instantiate package (first time)
```julia-repl
pkg> activate .
julia> using Pkg # first time only
julia> Pkg.instantiate() # first time only
```
4. run tests
```julia-repl
(Lambert) pkg> test
```
### Basic Lambert solver
```julia
push!(LOAD_PATH, pwd()) # push load path if necessary
using Lambert
# initial and final condition
r1 = [0.79, 0.0, 0.0] # initial position vector
r2 = [-0.6, -0.17, 0.005] # final position vector
mu = 1.0 # gravitational parameter
m = 0 # number of revolution(s), >=0
# call Lambert routine
res = lambert_fast(r1vec, r2vec, tof, m, mu)
```
The function returns an `AbstractLambertOut` type, which contains:
```
res.r1 # initial position vector
res.r2 # final position vector
res.v1 # initial velocity vector
res.v2 # final velocity vector
res.exitflag # success (1) or fail (0)
```
To display the summary, a practical method is to use
```julia
display(res)
```