Halo orbit solver with modern Fortran
This application can be used to generate long-duration Earth-Moon halo orbits in the ephemeris model. A work in progress.
The application is built using the Fortran Package Manager (FPM). FPM will download all the required dependencies and compile the program, and can also be used to run the tests.
fpm build --profile release
To run an example:
fpm run halo_solver --profile release -- examples/example.json
OpenMP can also be employed to speed up the process. Another example, using the Intel Fortran Compiler with OpenMP:
fpm run halo_solver --profile release --compiler ifort --flag "-qopenmp" -- examples/example.json
Or with Gfortran:
fpm run halo_solver --profile release --flag "-fopenmp" -- examples/example.json
The qr_mumps solver can also be used, which will run much faster than the default LAPACK solver for very large problems. For this, the code must be compiled with the WITH_QRMUMPS
preprocessor directive. See the build.sh
and run.sh
scripts for details.
Work in progress....
Example:
"<intel install dir>\windows\bin\ifortvars.bat" intel64
"<intel install dir>\windows\mkl\bin\mklvars.bat" intel64
set OMP_NUM_THREADS=12
fpm run halo_solver --profile release --compiler ifort --flag "/fpp /Qmkl:parallel /Qopenmp" -- examples/example.json
Result is:
LINK : fatal error LNK1181: cannot open input file 'lapack.lib'
It's because fmin
and nlsolver-fortran
both have explicit lapack
and blas
dependencies specified in their fpm.toml
files (link = ["lapack", "blas"]
). If i delete those it compiles.
The latest API documentation can be found here. This was generated from the source code using FORD.
- J. Williams, Near Rectilinear Halo Orbits, July 31, 2022 [degenerateconic.com]
- qr_mumps -- a software package for the solution of sparse, linear systems on multicore computers.
- J. Williams, D. E. Lee, R. J. Whitley, K. A. Bokelmann, D. C. Davis, C. F. Berry, "Targeting Cislunar Near Rectilinear Halo Orbits for Human Space Exploration", 27th AAS/AIAA Space Flight Mechanics Meeting, Feb. 2017
- J. Williams, R. D. Falck, and I. B. Beekman, "Application of Modern Fortran to Spacecraft Trajectory Design and Optimization", 2018 Space Flight Mechanics Meeting, 8–12 January 2018, AIAA 2018-145.
- E. M. Z. Spreen, "Trajectory Design and Targeting For Applications to the Exploration Program in Cislunar Space", PhD Dissertation, Purdue University School of Aeronautics and Astronautics, May 2021