Orbital Mechanics with Fortran


Welcome

This web site describes a comprehensive collection of Fortran programs, subroutines and functions that can be used to solve a variety of practical problems in orbital mechanics, mission design and aerospace trajectory optimization.  The Orbital Mechanics with Fortran software is based on 30 years of aerospace mission analysis experience and consists of both classic and state-of-the-art astrodynamic algorithms.  The software was created using Compaq Visual Fortran, version 6.6c and Intel Visual Fortran, version 11.1.  However, the code is written in “generic” Fortran 77 style and should work with other Fortran compilers.

 

The complete collection of Fortran source code functions and subroutines for the Orbital Mechanics with Fortran library can be purchased for $179.  The software can be ordered using the secure and flexible e-commerce services provided by PayPal (www.paypal.com).  PayPal accepts online payments by credit card and a PayPal account is not required to make a purchase.  Before placing an order, please read the license agreement.  After placing your order, you will receive an email within 24 hours with a password that will permit you to extract the source code and any support data files.  This zipped file can be downloaded here.  To place an order for this software, please click here.

Last updated   March 3, 2010

Thanks for visiting.


 

The following are stand-alone executable programs and Fortran source code that use routines in the Orbital Mechanics with Fortran library.  These programs should be downloaded from this web site; they are not included in the library distribution.  These programs should be run from a DOS command line.

 

For users unfamiliar with DOS, a DOS window can be created within Windows by selecting Start, then Programs, then Accessories, and finally Command Prompt.  Type cd \ to move to the root directory on your C drive.  Then type cd subdirectory where subdirectory is the name of the subdirectory that contains these programs.  Finally, type the name of the program you want to run and press the Enter key.  You may also want to create a Command Prompt shortcut on your desktop.

 

Several of these programs include graphics created with the DISLIN object code graphics library (www.dislin.de).  Several programs also use the JPL Spice object code libraries which can be found at http://naif.jpl.nasa.gov/naif/.  The JPL web site includes Spice support libraries for several Fortran compilers and computer platforms along with comprehensive documentation.

 

Utility

 

A computer program for plotting tabular data – xyplot.zip

A computer program for Hermite cubic spline interpolation of tabular data – csinterp.zip

A computer program for coordinate calculations – csystems.zip

Geodetic and geocentric coordinate conversions – demo_geodetic.zip

A routine that computes geodetic altitude relative to a triaxial ellipsoid – demo_triaxial.zip

A program that demonstrates how to interact with the U.S. 1976 standard atmosphere subroutine – demo_atmos76.zip

Subroutines for the numerical solution of Kepler’s equation – demo_kepler.zip

Subroutines for orbit propagation using Kozai’s method – demo_kozai1.zip – demo_kozai2.zip

Subroutines for two-body orbit propagation – demo_twobody.zip

Subroutines that compute the two-body state transition matrix – demo_stm.zip

Subroutines for time-of-flight calculations – demo_tof.zip

A routine that computes orbital periods – demo_period.zip

A routine that computes topocentric coordinates and rates – demo_topo.zip

A subroutine for converting to and from mean and osculating orbital elements – demo_oeconvrt.zip

A routine that demonstrates how to use flight path equations of motion – demo_fpeqm.zip

A computer program for converting between true-of-date and EME2000 state vectors – eme_tod.zip – eme_tod.pdf

A computer program for computing lunar libration angles – libration.zip – (requires de405.bin)

A computer program for converting an ECI state vector to a two line element set (TLE) – demo_rv2tle.zip

 

Mission Analysis

 

Rise and Set of Earth Satellites

Rise and set of Earth satellites – Kozai J2 orbit propagation – riseset1.zip – riseset.pdf

Rise and set of Earth satellites – SGP4 orbit propagation – riseset2.zip

Rise and set of Earth satellites – numerical integration – riseset3.zip

Graphics display of rise-set conditions – griseset.zip

 

Shadow Conditions of Earth Satellites

Shadow conditions of Earth satellites in circular orbits – shadow1.zip – shadow1.pdf

Shadow conditions of Earth satellites in elliptical orbits – shadow2.zip

Shadow conditions of Earth satellites – numerical integration solution – shadow3.zip

 

Predicting Orbital Events

Closest approach between two Earth satellites – ca2sats.zip

Closest approach between a ground site and an Earth satellite – rts2sat.zip

Mutual visibility between two Earth satellites – sat2sat.zip

Cowell’s method for geocentric orbit propagation – cowell1.zip

Coverage characteristics of Earth satellites – coverage1.zip

Coordinates and energy of the CRTBP libration points – crtbp1.zip

Graphics display of circular-restricted three-body problem (CRTBP) trajectories – g3body.zip

Graphics display of relative motion between two Earth satellites – grmotion.zip

 

Orbit Design (odesign.pdf)

 

Repeating Ground Track Orbits

Estimate time to repeat a ground track – repeat1.zip

Predict the osculating semimajor axis for a repeating ground track orbit – repeat2.zip

Predict the mean semimajor axis for a repeating ground track orbit – repeat3.zip

Predict the osculating semimajor axis for a repeating ground track orbit – repeat4.zip

 

Sun-synchronous Orbits

Predict the mean orbital inclination for sun-synchronous orbits – j2 solution – sunsync1.zip

Predict the mean orbital inclination for sun-synchronous orbits – j2 + j4 solution – sunsync2.zip

Predict the osculating orbital inclination for sun-synchronous orbits – sunsync3.zip

Sun-synchronous, repeating ground track orbit design – ssrepeat.zip

A computer program for composite orbit design – composite.zip

 

Frozen Orbits

Predict the mean orbital eccentricity for frozen orbits – frozen1.zip

Long-term evolution of frozen orbits – frozen2.zip

 

Geosynchronous Orbits

Equilibrium longitudes and radii of geosynchronous satellites – geosync1.zip

Osculating semimajor axis for geosynchronous satellites – geosync2.zip

Repositioning maneuvers for geosynchronous satellites – geosync3.zip

East-west stationkeeping of geosynchronous satellites – geosync4.zip

North-south stationkeeping of geosynchronous satellites – geosync5.zip

 

Lambert’s Problem (lambert.pdf)

 

Solution of the Earth orbit Lambert problem using Gedeon’s method – elambert1.zip

Solution of the J2-perturbed Earth orbit Lambert problem – state transition matrix method – elambert2.zip

Solution of the J2-perturbed Earth orbit Lambert problem – nonlinear equations method – elambert3.zip

Solution of the Earth orbit Lambert problem using Gooding’s method – elambert4.zip

Solution of the interplanetary Lambert problem – ilambert.zip

 

Orbital Maneuvers (maneuvers.pdf)

 

Hohmann orbit transfer – hohmann.zip

One impulse transfer between intersecting circular orbits – maneuver1.zip

One impulse transfer between intersecting orbits – maneuver2.zip

Finite-burn transfer between coplanar orbits – maneuver3.zip

Impulsive de-orbit from circular Earth orbits – cdeorbit.zip - deorbit.pdf

Impulsive de-orbit from elliptical Earth orbits – edeorbit.zip

Aero-assisted orbital transfer between coplanar, circular Earth orbits – assist.zip

Low-thrust orbit transfer – ltot.zip

Low-thrust orbit transfer using solar-electric propulsion – sep_ltot.zip

Primer Vector Analysis of Coplanar Hohmann Transfer – primer.zip

Phasing Analysis of Coplanar Hohmann Transfer – phasing.zip

Optimal orbital transfer between inclined Earth orbits – oota.zip

 

Lunar Trajectory Analysis

 

Closest approach between a spacecraft and the moon – ca_sc2moon.zip – ca_sc2moon.pdf – (requires de405.bin)

An initial guess generator for lunar mission analysis – lguess.zip – lguess.pdf – (requires de405.bin; requires IMSL library to re-compile)

Rise and set of the moon with respect to an Earth observer – riseset4.zip

 

Interplanetary Trajectory Analysis

 

Converting a state vector to hyperbolic coordinates – hyperbola.zip – hyperbola.pdf

Impulsive hyperbolic injection from a circular park orbit – demo_hyper1.zip – demo_hyper1.pdf

Cowell’s method for heliocentric objects – cowell2.zip – (requires de405.bin)

Ballistic interplanetary trajectory optimization – ipto.zip

Patched-conic gravity-assist trajectory design – flyby.zip

Closest approach between the Earth and heliocentric objects – cae2ho.zip – (requires de405.bin)

Closest approach between a spacecraft and celestial body – ca_sc2body.zip – ca_sc2body.pdf – (requires de405.bin)

Interplanetary trajectory correction maneuver (TCM) trajectory design – tcm.zip – (requires de405.bin)

 

Ephemerides

 

Creating a JPL binary ephemeris file – ephemeris.html

A program that demonstrates how to interact with the JPL ephemeris – demo_de405.zip – (requires de405.bin)

A program that demonstrates how to interact with the SLP96 ephemeris – demo_slp96.zip – (requires slp96.bin)

A program that demonstrates how to interact with the INPOP ephemeris – demo_inpop.zip – (requires inpop06c.bin)

A binary ephemeris file based on DE405 (valid from 1/2/1980 to 1/7/2040; ~ 10 MB) – de405.bin

A binary ephemeris file based on SLP96 (valid from 12/24/1999 to 01/02/2050; ~12 MB) – slp96.bin

A binary ephemeris file based on DE421 (valid from 1/1/1900 to 12/31/2049; ~ 14 MB) – de421.bin

A binary ephemeris file based on INPOP06c (valid from J2000 +/- 100 years; ~ 17 MB) – inpop06c.bin

A binary ephemeris file based on INPOP08a (valid from J2000 +/- 100 years; ~ 17 MB) – inpop08a.bin

Link to JPL ephemeris web site – ftp://ssd.jpl.nasa.gov/pub/eph/export/

 


The following are brief descriptions of the Orbital Mechanics with Fortran library contents:

Coordinate calculations                                           coordinates.txt

Ephemeris routines                                                  ephemeris.txt

Numerical methods and utility routines                 nm_util.txt

Programmer’s toolbox                                              toolbox.txt

The library also includes several Earth gravity model data files (EGM96, WGS84, JGM2, etc.).  Binary ephemeris files for Windows computers can also be downloaded from this web site.


LIBRARY STRUCTURE

The Orbital Mechanics with Fortran source code is organized on the development hard drive as follows:

c:\omfort-web

coordinates                 coordinate calculation subroutines

data                             gravity model data files

de405                          DE405 binary data file and support subroutines

demo                           demonstration programs

ephemeris                   ephemeris, date and time subroutines

nm_util                        numerical methods and utility subroutines

toolbox                        programmer’s toolbox subroutines

 

The contents of a batch file that creates a Compaq Visual Fortran version of the library called omlib.lib is as follows:

df c:\omfort-web\ephemeris\*.for /obj:ephemeris.obj

df c:\omfort-web\coordinates\*.for /obj:coordinates.obj

df c:\omfort-web\nm_util\*.for /obj:nm_util.obj

df c:\omfort-web\toolbox\*.for /obj:toolbox.obj

lib /out:omlib.lib *.obj

del *.obj

The following is a typical batch file that creates a Compaq Visual Fortran version of an executable demonstration program:

df riseset1.for c:\omfort-web\omlib.lib

 

The contents of a batch file that creates a Salford FTN95 version of the library called omlib.lib is as follows:

ftn95 c:\omfort-web\ephemeris\*.for

copy /b c:\omfort-web\ephemeris\*.obj ephemeris.obj

ftn95 c:\omfort-web\coordinates\*.for

copy /b c:\omfort-web\coordinates\*.obj coordinates.obj

ftn95 c:\omfort-web\nm_util\*.for

copy /b c:\omfort-web\nm_util\*.obj nm_util.obj

ftn95 c:\omfort-web\toolbox\*.for

copy /b c:\omfort-web\toolbox\*.obj toolbox.obj

slim *.obj /file:omlib.lib

The following is a typical a batch file that creates a Salford FTN95 version of an executable demonstration program:

ftn95 cdeorbit.for

slink cdeorbit.obj c:\omfort-web\ftn95\omlib.lib

 

The contents of a batch file that creates an Intel Visual Fortran version of the library called omlib.lib is as follows:

ifort /c c:\omfort_intel\ephemeris\*.for

ifort /c c:\omfort_intel\coordinates\*.for

ifort /c c:\omfort_intel\nm_util\*.for

ifort /c c:\omfort_intel\toolbox\*.for

lib /out:omlib.lib *.obj

del *.obj

The following is a typical batch file that creates an Intel Visual Fortran version of an executable demonstration program:

ifort riseset1.for c:\omfort-intel\omlib.lib /Qsave


FORTRAN RESOURCES

Compilers

www.g95.org

www.lahey.com

www.absoft.com

www.intel.com/cd/software/products/asmo-na/eng/compilers/index.htm

www.geocities.com/Athens/Olympus/5564/g77.htm

A Fortran compiler free for personal use or evaluation can be found at

http://www.silverfrost.com/11/ftn95/ftn95_fortran_95_for_windows.asp

Documentation

http://www.star.le.ac.uk/~cgp/prof77.html

http://tc5.chem.uu.nl/~jeroen/fortran/f77book.pdf

http://www.lrsm.upenn.edu/~vitek/courses/f77intro/f77intro.pdf

Links

www.fortran.com

www.fortranplus.co.uk

www.fortranlib.com

www.dislin.de

http://software.basnet.by/Fortr/freelibr.html

www.personal.psu.edu/faculty/h/d/hdk/fortran.html


Web site contents copyright © 2006-2010 by C. David Eagle.  All rights reserved.

cdeaglejr@yahoo.com          www.cdeagle.com