• Stars
    star
    170
  • Rank 223,357 (Top 5 %)
  • Language
    Fortran
  • License
    Other
  • Created over 10 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A Modern Fortran Library for Astrodynamics πŸš€

Fortran Astrodynamics Toolkit

GitHub release Build Status codecov DOI

Image

Overview

The goal of the Fortran Astrodynamics Toolkit is to produce a comprehensive library, written in modern Fortran (Fortran 2008+), of all the standard orbital mechanics algorithms. This is a work in progress. Currently-implemented and proposed capabilities include:

  • Lambert solvers
    • Gooding
    • Izzo
    • Arora
  • Kepler propagators
    • Gooding
    • Shepperd
    • Goodyear
  • ODE solvers (with event-finding)
    • Runge-Kutta
    • Nystrom
    • Adams
  • Force models
    • point mass gravity field
    • geopotential gravity
    • solar radiation pressure
    • atmospheric drag
    • relativistic effects
  • Reference frames
    • IAU_EARTH
    • IAU_MOON
  • Celestial Body Ephemerides
    • JPLEPH
    • SPICE
    • Analytical Moon w.r.t Earth
    • Analytical solar system primary bodies
  • Alternate equations of motion
    • Circular restricted three-body problem
    • Clohessy-Wiltshire
    • Modified equinoctial elements
  • Misc
    • orbital element conversions
    • halo orbits
    • targeting and optimization
    • spacecraft engine models

Examples

Building

The Fortran Astrodynamics Toolkit and the test programs will build with any modern Fortran compiler. A Fortran Package Manager manifest file (fmp.toml) is included, so that the library and tests cases can be compiled with FPM. For example:

fpm build --profile release
fpm test --profile release

To use Fortran-Astrodynamics-Toolkit within your fpm project, add the following to your fpm.toml file:

[dependencies]
fortran-astrodynamics-toolkit = { git="https://github.com/jacobwilliams/Fortran-Astrodynamics-Toolkit.git" }

or, to use a specific version:

[dependencies]
fortran-astrodynamics-toolkit = { git="https://github.com/jacobwilliams/Fortran-Astrodynamics-Toolkit.git", tag = "0.3" }

To generate the documentation using ford, run: ford fortran-astrodynamics-toolkit.md

Third-Party Requirements

A script get_third_party.sh is included to download and build the third-party dependencies on unix-like operating systems.

Pyplot-Fortran

The plots generated by the examples are done using the pyplot-fortran module. When compiling with FPM, this will automatically be downloaded and compiled.

Ephemeris files

To use the ephemeris_module, a copy of one of the JPL binary ephemeris files must be present in the eph directory. This can be built from the instructions at: ftp://ssd.jpl.nasa.gov/pub/eph/planets/fortran/userguide.txt. For example (on Linux):

wget ftp://ssd.jpl.nasa.gov/pub/eph/planets/fortran/*
wget ftp://ssd.jpl.nasa.gov/pub/eph/planets/ascii/de405/*
#edit asc2eph.f file to set NRECL = 4:
sed -i '_original' '/^C.*PARAMETER ( NRECL = 4 )/s/^C//' asc2eph.f
gfortran asc2eph.f -o asc2eph
cat header.405 ascp*.405 | ./asc2eph
mkdir Fortran-Astrodynamics-Toolkit/eph
mv JPLEPH Fortran-Astrodynamics-Toolkit/eph/JPLEPH.405

Geopotential files

To use the geopotential_module, you need a geopotential model file (for example GGM03C.GEO from ftp://ftp.csr.utexas.edu/pub/grace/GGM03/GGM03_Archive.zip). This should be placed in the grav directory. For example:

wget http://download.csr.utexas.edu/pub/grace/GGM03/GGM03_Archive.zip
unzip GGM03_Archive.zip
mkdir Fortran-Astrodynamics-Toolkit/grav
cp GGM03_Archive/GGM03C.GEO Fortran-Astrodynamics-Toolkit/grav

Documentation

The documentation for the latest code in master can be found here.

See also

More Repositories

1

json-fortran

A Modern Fortran JSON API
Fortran
331
star
2

pyplot-fortran

For generating plots from Fortran using Python's matplotlib.pyplot πŸ“ˆ
Fortran
191
star
3

bspline-fortran

Multidimensional B-Spline Interpolation of Data on a Regular Grid
Fortran
165
star
4

csv-fortran

Read and Write CSV Files Using Modern Fortran
Fortran
94
star
5

slsqp

Modern Fortran Edition of the SLSQP Optimizer
Fortran
87
star
6

rklib

Fixed and variable-step Runge-Kutta solvers in Modern Fortran
Fortran
71
star
7

NumDiff

Modern Fortran Numerical Differentiation Library
Fortran
65
star
8

quadpack

Modern Fortran QUADPACK Library for 1D numerical quadrature
Fortran
61
star
9

finterp

Multidimensional (1D-6D) Linear and Nearest-Neighbor Interpolation with Modern Fortran
Fortran
54
star
10

dop853

Modern Fortran Edition of Hairer's DOP853 ODE Solver. An explicit Runge-Kutta method of order 8(5,3) for problems y'=f(x,y); with dense output of order 7
Fortran
47
star
11

odepack

Work in Progress to refactor and modernize the ODEPACK Library
Fortran
44
star
12

nlesolver-fortran

Nonlinear Equation Solver with Modern Fortran
Fortran
37
star
13

pikaia

Modern Fortran Edition of the Pikaia Genetic Algorithm
Fortran
35
star
14

PowellOpt

Optimization algorithms by M.J.D. Powell
Fortran
35
star
15

roots-fortran

A modern Fortran library for finding the roots of continuous scalar functions of a single real variable, using derivative-free methods.
Fortran
34
star
16

quadrature-fortran

1D-6D Adaptive Gaussian Quadrature with Modern Fortran
Fortran
34
star
17

ddeabm

Modern Fortran implementation of the DDEABM Adams-Bashforth algorithm
Fortran
33
star
18

fortran_function_parser

Modern Fortran function parser. An update of "fparser" by Roland Schmehl
Fortran
32
star
19

flist

Modern Fortran Linked List
Fortran
31
star
20

PCHIP

Modern Fortran Piecewise Cubic Hermite Interpolation Package
Fortran
25
star
21

nswc

NSWC Mathematics Subroutine Library
Fortran
24
star
22

daglib

Directed Acyclic Graphs With Modern Fortran
Fortran
24
star
23

fortran-search-and-sort

Searching and sorting with modern Fortran
C++
24
star
24

LSQR

Modern Fortran sparse linear systems solver
Fortran
23
star
25

stl-fortran

Fortran STL File I/O
Fortran
22
star
26

simulated-annealing

Simulated Annealing with Modern Fortran
Fortran
22
star
27

polyroots-fortran

Modern Fortran library for finding the roots of real and complex polynomial equations
Fortran
22
star
28

matlab

Fortran
20
star
29

stringsort

Modern Fortran sorting routines for strings
Fortran
18
star
30

FGIF

Create Animated GIFs with Fortran
Fortran
16
star
31

astro-fortran

Modern Fortran implementations of standard models used in fundamental astronomy
Fortran
16
star
32

carlson-elliptic-integrals

Carlson symmetric forms of elliptic integrals
Fortran
14
star
33

regridpack

Modern Fortran Edition of REGRIDPACK
Fortran
13
star
34

CMLIB

NBS Core Math Library (CMLIB) Unofficial Mirror
Fortran
13
star
35

namelist2json

Converting a Fortran namelist to JSON
Fortran
12
star
36

halo

Halo orbit solver with modern Fortran
Fortran
10
star
37

uuid-fortran

Fortran module for generating UUIDs
Fortran
9
star
38

splpak

Modernized SPLPAK library for multidimensional least-squares cubic spline fitting
Fortran
8
star
39

fortran-json-python

Interfacing Fortran and Python via JSON
Fortran
8
star
40

math77

Unofficial Mirror of the JPL MATH77 Library
Fortran
8
star
41

LOM

Low Lunar Orbit Maintenance
Fortran
7
star
42

lbfgsb

Modern Fortran Refactoring of L-BFGS-B Nonlinear Optimization Code
Fortran
7
star
43

specfun

Special functions with Modern Fortran
Fortran
7
star
44

HOMPACK90

Unofficial mirror of HOMPACK90 from http://people.cs.vt.edu/~ltw/hompack/hompack90.html
Fortran
7
star
45

geodesic-fortran

Geodesic routines for Modern Fortran
Fortran
6
star
46

argv-fortran

A better get_command_argument for Fortran
Fortran
6
star
47

fastnml

Python module for reading and writing Fortran namelists
Python
6
star
48

mersenne-twister-fortran

Mersenne Twister pseudorandom number generator for Fortran
Fortran
5
star
49

fmin

Derivative free 1D function minimizer in modern Fortran
Fortran
5
star
50

LSMR

Fortran Package Manager version of LSMR: Sparse Equations and Least Squares
Fortran
5
star
51

kronrod

Program for generating Gauss-Kronrod Coefficients
Fortran
5
star
52

INPE-atmosphere-models

Fortran code for various atmosphere modes from http://www.dem.inpe.br/~val/atmod/default.html
Fortran
5
star
53

rksuite

Unofficial mirror of RKSUITE http://www.netlib.org/ode/rksuite/
Fortran
5
star
54

dvode

Modern Fortran Edition of the DVODE ODE Solver
Fortran
4
star
55

AoC-2023

Advent of Code 2023 with Modern Fortran
Fortran
4
star
56

FMLIB

Unofficial mirror of FMLIB for Multiple Precision Computations
Fortran
4
star
57

FilterSD

Unofficial mirror of FilterSD https://github.com/coin-or/filterSD
Fortran
3
star
58

conmax

Modern Fortran CONMAX Optimization Method for general nonlinearly constrained function minimization
Fortran
3
star
59

radbelt

AE-8/AP-8 Van Allen belt model in modern Fortran
Fortran
3
star
60

1976-standard-atmosphere

1976 Standard Atmosphere in Modern Fortran
Fortran
3
star
61

AoC-2021

Advent of Code 2021 with Fortran.
Fortran
3
star
62

MPFUN2015

Unofficial Mirror of MPFUN2015 from https://www.davidhbailey.com/dhbsoftware/
Fortran
3
star
63

popen-fortran

Simple Fortran module for popen
Fortran
3
star
64

IAU_SOFA

Unofficial Mirror of the IAU SOFA Fortran Library
Fortran
2
star
65

divalib

DIVA integrator from MATH77
Fortran
2
star
66

diff

Numerical Differentiation of a User Defined Function
Fortran
2
star
67

StatLib

Unofficial mirror of StatLib http://lib.stat.cmu.edu/apstat/
Fortran
2
star
68

dfo

Unofficial mirror of DFO: https://projects.coin-or.org/Dfo
Fortran
2
star
69

mpfun2020-var1

FPM Package for MPFUN2020 (var1) https://www.davidhbailey.com/dhbsoftware/
Fortran
2
star
70

fortran-mach

Modern Fortran Machine Constants Module (r1mach, d1mach, i1mach)
Fortran
1
star
71

MPFUN2020

Unofficial Mirror of MPFUN2020 from https://www.davidhbailey.com/dhbsoftware/
Fortran
1
star
72

NOVAS

Refactoring of NOVAS: Naval Observatory Vector Astrometry Subroutines
Fortran
1
star
73

SofaMerge

A simple script to make one module from all the SOFA files
Python
1
star
74

AoC-2022

Advent of Code 2022 in Fortran
Fortran
1
star
75

ffp

Unofficial mirror of Fortran Function Parser from http://www.labfit.net/functionparser.htm
Fortran
1
star
76

NRLMSIS2.1

Unofficial Mirror of NRLMSIS2.1 https://map.nrl.navy.mil/map/pub/nrl/NRLMSIS/NRLMSIS2.1/
Fortran
1
star