GithubHelp home page GithubHelp logo

jacobwilliams / fortran-astrodynamics-toolkit Goto Github PK

View Code? Open in Web Editor NEW
170.0 26.0 48.0 22.95 MB

A Modern Fortran Library for Astrodynamics 🚀

License: Other

Shell 0.08% Fortran 98.26% Python 1.66%
fortran astrodynamics orbital-mechanics orbital-simulation ephemeris runge-kutta runge-kutta-adaptive-step-size gravity-field fortran-package-manager

fortran-astrodynamics-toolkit's Introduction

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 (fpm.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 ford.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

fortran-astrodynamics-toolkit's People

Contributors

jacobwilliams avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fortran-astrodynamics-toolkit's Issues

Getting the pork chop test to run under Python 3.7.3 and Matplotlib 3.1.1

I am attempting to run the pork_chop.py test. I'm running Python 3.7.3 and Matplotlib 3.1.1 in the current Anaconda distribution.

Now the first issue encountered had to do with the removal of get_axes() from Matplolib. Commit 9288ba8 referenced in cphyc/matplotlib-label-lines#1 showed me that replacing line.get_axes() with line.axes would solve that problem, and it did. A copy of the modified code has been attached to this note. Now I have a different problem.

Presently, when I run pork_chop.py I get the following error message.

(base) Samuels-Mac-Pro:pork_chop user$ python3 pork_chop.py
Traceback (most recent call last):
  File "pork_chop.py", line 229, in <module>
    draw_all_flight_time_lines()
  File "pork_chop.py", line 155, in draw_all_flight_time_lines
    draw_flight_time_line(t0[:,np.size(t0,1)/4],tf[:,np.size(t0,1)/4],'r')
IndexError: only integers, slices (`:`), ellipsis (`...`), numpy.newaxis (`None`) and integer or boolean arrays are valid indices
(base) Samuels-Mac-Pro:pork_chop user$ python3

Any suggestions?

Please advise.

Sam Dupree.

pork_chop.py.txt

Standish Method Accuracy Check

You currently use the DExxx (ie DE430) ephemeris in the JAT. It may be possible in future you will find it useful to incorporate an approximation method such as the Standish approach as in my Standish_Module (https://github.com/CumuloEpsilon/Standish-Ephemeris). The comparable SOFA iau-plan94 licensing is ... ah, blek, unfortunate, but Standish has a BSD! Be advised that I have no objection, even if you must recode to the horror known as oop. (just not too many levels of abstraction please, sigh). Certainly I think that would be a proper addition to the fat. Happy to cooperate, just say so.

As you are following I note I found a programming error in Standish affecting results outside the 1800-2050 AD range, a one character change detailed as Bug 20180219-1. Also I did an accuracy check against DE430 which might interest you, in the project as standish_accuracy.pdf. Enjoy.
-CumuloEpsilon

Tests finish with errors

After what seems like a successful set of tests (fpm test), it finishes with

<ERROR> Execution failed for object " crtbp_test "
<ERROR> Execution failed for object " dro_test "
<ERROR> Execution failed for object " halo_test "
<ERROR>*cmd_run*:stopping due to failed executions
STOP 1

Version 9ac7bf7

Compilation failure in flang

When compiling 9ac7bf7 with AOCC flang 4.0.0,

fpm build --compiler flang
string_module.f90                      done.
kind_module.f90                        done.
base_class_module.f90                  done.
complex_step.f90                       done.
numbers_module.f90                     done.
drag_module.f90                        done.
random_module.f90                      done.
geodesy_module.f90                     done.
matrix_module.f90                      done.
eispack_module.f90                     done.
gravity_module.f90                     done.
gooding_module.f90                     done.
celestial_body_module.f90              failed.
[ 30%] Compiling...
F90-F-0155-No default initialization in structure constructor- member ==$4 (./src/celestial_body_module.f90: 23)
F90/x86-64 Linux Flang - 1.5 2017-05-01: compilation aborted
<ERROR> Compilation failed for object " src_celestial_body_module.f90.o "
<ERROR>stopping due to failed compilation
STOP 1

lambert_module.f90

Hello jacob,

I would like to ask you about this program for Gooding, Izzo and Arora. I have translated the programs to C because I don´t know Fortran. I have some doubts:

  1. If I understand, nrev=0 (Arora) or multi_rev=0 (Gooding or Izzo) means that the orbit can be not only elliptic but hyperbolic or parabolic too. If they have value larger tan 0: 1, 2, ..we are considering elliptic orbits. How do you play with the parameters: long_way (defined in the 3 methods) and shortperiod (in Arora)? If for example the approach is defined by default for prograde orbits, in principle the time of flight (a priori data) defines the orbit we are looking for and the radiovectors the transfer angle (smaller or larger than pi). In these programs ''long_way'' defines directly if the transfer is larger than pi. How do you identify prograde or retrograde transfer? What do you mean with shortperiod in Arora? You write ''for multirev I think...'' but it is not very clear for me.

  2. I run in the 3 approaches the same example: r1=(20000,20000,0)km ; r2=(-20000,10000;0)km ; tof=86400sec ; longway=1; and then I change multi_revs or nrev from 0 to 2. Could you tell me what do you obtain when you select multi_revs=0 (or nrev=0)? I obtain close values but not the same for the 3 methods and I'm not sure if I have done something wrong. I also check the effect to change from shortperiod=true to shortperiod=false. The values are the same when nrev=0, but they change when nrev>0.

  3. In the case of Gooding and Izzo when I select multi_revs=1 I obtain 3 results for v1 and v2 and when I select multi_revs=2 I obtain 5 results...but we cannot obtain more results tan the number of revolutions (one per #revolutions ) isn't it? In the case of Arora I obtain just one refers to the value provided by nrev.

Thank you in advance and thank you for providing all these programs to the community.

Problems compiling with ifort

I tried compiling with the latest ifort, but it didn't work. These are my modified build script and the compilation log with -verbose:

#!/bin/bash

#
#  Build the Fortran Astrodynamics Toolkit library and example programs
#
#  Requirements:
#  
#  * FoBiS - https://github.com/szaghi/FoBiS
#    Install using: sudo pip install FoBiS.py
#
#  * FORD - https://github.com/cmacmackin/ford
#    Install using: sudo pip install ford
#

DOCDIR='./doc/'                             # build directory for documentation
SRCDIR='./src/'                             # library source directory
TESTDIR='./tests/'                          # tests source directory
BINDIR='./bin/'                             # build directory for example
LIBDIR='./lib/'                             # build directory for library
MODCODE='fortran_astrodynamics_toolkit.f90' # FAT module file name
LIBOUT='libfat.a'                           # name of FAT library
FORDMD='fortran-astrodynamics-toolkit.md'   # FORD MD config file
FCOMPILER='intel'                             # Fortran compiler flag for FoBiS
FCOMPILERFLAGS='-c -O2'                     # Fortran compiler settings

#build source using FoBiS:

if hash FoBiS.py 2>/dev/null; then

    echo "build library..."
    FoBiS.py build -compiler ${FCOMPILER} -fc /home/juanlu/INTEL/bin/ifort -cflags "${FCOMPILERFLAGS}" -dbld ${LIBDIR} -s ${SRCDIR} -dmod ./ -dobj ./ -t ${MODCODE} -o ${LIBOUT} -mklib static -colors -verbose

    echo "build test programs"
    FoBiS.py build -compiler ${FCOMPILER} -fc /home/juanlu/INTEL/bin/ifort -cflags "${FCOMPILERFLAGS}" -dbld ${BINDIR} -s ${TESTDIR} -i ${LIBDIR} -dmod ./ -dobj ./ -libs ${LIBDIR}${LIBOUT} -colors -verbose

else
    echo "FoBiS.py not found! Cannot build library. Install using: sudo pip install FoBiS.py"
fi

# build the documentation using FORD:

if hash ford 2>/dev/null; then

    echo "Building documentation..."
    ford ${FORDMD}

else
    echo "Ford not found! Cannot build documentation. Install using: sudo pip install ford"
fiFind attached 

build library...
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
----------------------------------------^
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
-----------------------------------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
compilation aborted for src/geopotential_module.f90 (code 1)
Module 'pygooglechart' not found: Gcov graphs disabled
�[1mBuilder options
  Directories
    Building directory: "lib"
    Compiled-objects .o   directory: "lib"
    Compiled-objects .mod directory: "lib"
  Compiler options
    Vendor: "intel"
    Compiler command: "/home/juanlu/INTEL/bin/ifort"
    Module directory switch: "-module"
    Compiling flags: "-c -O2"
    Linking flags: ""
    Preprocessing flags: ""
    Coverage: False
    Profile: False
  PreForM.py used: False
  PreForM.py output directory: None
  PreForM.py extensions processed: []
�[0m
�[1mBuilding src/fortran_astrodynamics_toolkit.f90�[0m
�[1mCompiling src/kind_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/kind_module.f90 -o lib/kind_module.o�[0m
�[1mCompiling src/numbers_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/numbers_module.f90 -o lib/numbers_module.o�[0m
�[1mCompiling src/vector_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/vector_module.f90 -o lib/vector_module.o�[0m
�[1mCompiling src/conversion_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/conversion_module.f90 -o lib/conversion_module.o�[0m
�[1mCompiling src/random_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/random_module.f90 -o lib/random_module.o�[0m
�[1mCompiling src/brent_module.f90 src/math_module.f90 src/gooding_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/brent_module.f90 -o lib/brent_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/math_module.f90 -o lib/math_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/gooding_module.f90 -o lib/gooding_module.o�[0m
�[1mCompiling src/bplane_module.f90 src/complex_step.f90 src/crtbp_module.f90 src/ephemeris_module.f90 src/geodesy_module.f90 src/geometry_module.f90 src/geopotential_module.f90 src/iau_orientation_module.f90 src/lambert_module.f90 src/minpack_module.f90 src/modified_equinoctial_module.f90 src/relative_motion_module.f90 src/rk_module.f90 src/string_module.f90 src/time_module.f90 serially�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/bplane_module.f90 -o lib/bplane_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/complex_step.f90 -o lib/complex_step.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/crtbp_module.f90 -o lib/crtbp_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/ephemeris_module.f90 -o lib/ephemeris_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/geodesy_module.f90 -o lib/geodesy_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/geometry_module.f90 -o lib/geometry_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/geopotential_module.f90 -o lib/geopotential_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/iau_orientation_module.f90 -o lib/iau_orientation_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/lambert_module.f90 -o lib/lambert_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/minpack_module.f90 -o lib/minpack_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/modified_equinoctial_module.f90 -o lib/modified_equinoctial_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/relative_motion_module.f90 -o lib/relative_motion_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/rk_module.f90 -o lib/rk_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/string_module.f90 -o lib/string_module.o�[0m
�[1mExecuting: /home/juanlu/INTEL/bin/ifort -c -O2 -module lib src/time_module.f90 -o lib/time_module.o�[0m
�[1;31msrc/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
----------------------------------------^
src/geopotential_module.f90(376): error #6460: This is not a field name that is defined in the encompassing structure.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
-----------------------------------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [CNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
src/geopotential_module.f90(376): error #8284: If the actual argument is scalar, the dummy argument shall be scalar unless the actual argument is of type character or is an element of an array that is not assumed shape, pointer, or polymorphic.   [SNM]
                call convert(me%nmax,me%cnm,me%snm)
---------------------^
compilation aborted for src/geopotential_module.f90 (code 1)
�[0m
build test programs
Module 'pygooglechart' not found: Gcov graphs disabled
Ford not found! Cannot build documentation. Install using: sudo pip install ford

Support for Absoft Fortran Compiler

Absoft's Fortran Compiler is my compiler of choice. I'm running on a Mac Pro (2019) under Mac OSX Catalina (ver. 10.15.6). At present, compilation errors prevent me from installing the toolkit using Absoft Fortran.

Can some consideration be given to providing a version of the Fortran-Astrodynamics-Toolkit (FAT), and FoBis as well, that is compatible with Absoft Fortran?

Thank you.

Sam Dupree.

Orbital Elements Module

Love your new orbital_mechanics_module! Nice programming.
Elegant and excellent. As usual.

Building tests on Mac Pro (2019) under Mac OS X Big Sur

Having issues building the current toolkit on a Mac Pro (2019) running Mac OSX Big Sur (ver. 11.1). I'm using GNU Fortran (MacPorts gcc10 10.2.0_4) 10.2.0.

Able to successfully build the static library. My problem at present is building the examples. I got several warnings (as I did in building the static library). However, the linking failed with the following messages:

Compiling ./src/fortran_astrodynamics_toolkit.f90 serially
Compiling ./tests/lambert/lambert_test.f90 serially
Linking bin/lambert_test
ld: library not found for -lSystem
collect2: error: ld returned 1 exit status

ld: library not found for -lSystem
collect2: error: ld returned 1 exit status

How and where is -lSystem being set? How can I correct this problem?

The attached file contains the build log.

Please advise.

Sam Dupree

Fortran-AStrodynamics-Toolkit-build-log.txt

Issue Re get_third_party.sh and RPi3 Stretch

Thank you for the excellent project Jacob. I am installing FAT on the Raspberry Pi 3, debian STRETCH (current Raspbian Nov 2017). Several issues arise, one with making the .405 and .421 ephemeris file via your script get_third_party.sh as noted here. I mention that for Raspbian the gfortran must be installed via 'sudo apt-get install gfortran' and gives gfortran v6.3.0-18+rpi1. Raspbian python 2 and 3 are both installed.

ISSUE: The script get_third_party.sh works beautifully except for the sed command which fails (sed: -e expression #1, char 1:unknown command: '_'), and by consequence this does not uncomment the NRECL=4 line in asc2eph.f file, and by consequence the cat commands for producing the binary .405 and . 421 ephemeris files fails, and so on failure for these files. I am not skilled enough suggest a revision to the sed command, but leave that to your perview. {I ran the script, noted the error, manually fixed the asc2eph.f file and manually ran the commands from gfortran ...to the last... mv . }

COMMENT: I think it would also be helpful to us linux newbies, and seems correct to me, that we make clear in instruction that (for Raspbian) the python-matplotlib (sudo apt-get install python-matplotlib -note this is for python 2) must be installed, then fobis and ford installed (sudo pip install ford FoBiS -note again for python 2), THEN the pyplot-fortran module downloaded and built using its ./build command (and these resulting files may need to also be moved ?), THEN the get_third_party.sh script should be run BEFORE FINALLY building FAT using the fat ./build.sh command. Whew, lots of prerequisites. But worth doing, because you've done a brilliant job with this project
Thank you for your work.

Installing for Newbies

Hello Jacob,

I have started working with Fortran for a while now, but I have been using a REALLY old compiler (MS PowerStation) and some codes from my professor.

Could you please help me start working with your code?
I was not able to compile it. Could you please help me with the step-by-step?

Problem trying to build tests

I built https://github.com/jacobwilliams/pyplot-fortran, put libpyplot.a, pyplot_module.mod and pyplot-fortran/lib/pyplot_module.o under lib and tried to run ./build.sh, but I am having what I think are linking errors at the end:

Building tests/dro/dro_test.f90
Nothing to compile, all objects are up-to-date
Linking bin/dro_test
bin/dro_test.o: In function `MAIN__':
dro_test.f90:(.text+0xebb): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0xf17): undefined reference to `__pyplot_module_MOD_initialize'
dro_test.f90:(.text+0xf23): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0xf6c): undefined reference to `__pyplot_module_MOD_add_plot'
dro_test.f90:(.text+0xf89): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1072): undefined reference to `__pyplot_module_MOD_add_plot'
dro_test.f90:(.text+0x108f): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x117b): undefined reference to `__pyplot_module_MOD_add_plot'
dro_test.f90:(.text+0x1198): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x123e): undefined reference to `__pyplot_module_MOD_add_contour'
dro_test.f90:(.text+0x124a): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1271): undefined reference to `__pyplot_module_MOD_savefig'
dro_test.f90:(.text+0x1280): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1291): undefined reference to `__pyplot_module_MOD_destroy'
dro_test.f90:(.text+0x138d): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x13e9): undefined reference to `__pyplot_module_MOD_initialize'
dro_test.f90:(.text+0x1a6e): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1aec): undefined reference to `__pyplot_module_MOD_add_plot'
dro_test.f90:(.text+0x1b10): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1bf0): undefined reference to `__pyplot_module_MOD_add_plot'
dro_test.f90:(.text+0x1c0d): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1ce8): undefined reference to `__pyplot_module_MOD_add_plot'
dro_test.f90:(.text+0x1cf4): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1d1b): undefined reference to `__pyplot_module_MOD_savefig'
dro_test.f90:(.text+0x1d2a): undefined reference to `__pyplot_module_MOD___vtab_pyplot_module_Pyplot'
dro_test.f90:(.text+0x1d3b): undefined reference to `__pyplot_module_MOD_destroy'
collect2: error: ld returned 1 exit status

Problems with the Pork-Chop Test Program

I was able to build pork_chop.f. However when I run pork_chop.py I get the following messages:

/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/text.py:52: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  if rotation in ('horizontal', None):
/Users/user/anaconda/lib/python2.7/site-packages/matplotlib/text.py:54: UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal
  elif rotation == 'vertical':

Any suggestion as to how to correct this?

Standish Module

Jacob,
I see you used my Standish Ephemeris project for approximate
planet positions using the method of E Myles Standish. I had hoped you might.
You did a pro rewrite too, wonderful, awesome. My skill level is nowhere
near yours, for certain.
I am so pleased to have tricked you into fixing up my code! ;)
Glad to now be a little part of your excellent project.
Salute.

-CumuloEpsilon

error building under FPM

Hopefully this is the best place to post this. I'm trying to build using FPM on a Raspbery pi 3.

  • gfortran -c ./src/eispack_module.f90 -Wall -Wextra -Wimplicit-interface -fPIC -fmax-errors=1 -g -fcheck=bounds -fcheck=array->temps -fbacktrace -fcoarray=single -J build/gfortran_2A42023B310FA28D -Ibuild/gfortran_2A42023B310FA28D -o >build/gfortran_2A42023B310FA28D/fortran-astrodynamics-toolkit/src_eispack_module.f90.o
    ./src/eispack_module.f90:1549:42:

          write(*,'(F16.6,F16.6)') v(j)%re, v(j)%im
                                       1
    

Error: Unexpected ‘%’ for nonderived-type variable ‘v’ at (1)
compilation terminated due to -fmax-errors=1.
Compilation failed for object " src_eispack_module.f90.o "
stopping due to failed compilation
STOP 1

Getting the Pork_Chop Test to Work

I'm having trouble getting the pork_chop test to work. I can build the porkchop.so using f2py, but when I run the Python script pork_chop.py, I encounter an import problem involving porkchop as indicated in the attached file.

Please advise.

Sam Dupree.

pork_chop_build_report.txt

orbital_mechanics_module true anomaly

Jacob,

Appreciate the orbital mechanics routines, helpful
It is my understanding that by convention the true anomaly (tru) is in the range 0 to 2pi. Your use of wrap_angle places the range of tru in the range -pi to pi. The true anomaly of Mars on 2463114 is returned by rv_to_orbital_elements as -45 deg, rather than 315 deg for example. I'm no fanatic about such things where, as here, they make no computational difference, but we (our brains) do kinda get used to seeing things a particular way, like velocities in kps, it speeds our analysis. I note that NASA reports the element TA in the range 0 to 2pi.

Would you look at your use of the wrap_angle in this context, particularly for tru, and see if it is as you intended?

-Cumulo

External libraries

Some of the general-purpose modules in this package have since been moved and expanded into standalone libraries (for example, the rk, root, minpack modules, etc). We should probably depreciate the ones here. They could be made dependencies via FPM. The would make this library more focused on just astrodynamics.

get_third_party SED

Jacob,

Line 13 of your get_third_party.sh contains the script line
sed -i '_original' '/^C.*PARAMETER ( NRECL = 4 )/s/^C//' asc2eph.f

the "sed -i " throws an error on my debian linux (Raspbian), indicating the -i option is not linux compatible. It appears to be a Mac variant of insert-in-place. By consequence the third party script fails and the ephemeris does not build.
Unfortunately I am not skilled enough to advance a fix for you. I found the following similar discussion/fix which indicates a Mac/linux incompatibility on this and suggests a fix.

despark/kohana@656e1f7#commitcomment-5632757

Hope this helps. If you suggest an idea here I can test it for you. Best.
-Cumulo

Recommendation - ODE solvers moved to a separate package/module/class

Howdy @jacobwilliams,

I'm really learning a lot from how you design your Fortran projects, and thinking about porting my projects to be more inline with this modern modular Fortran approach to programming.

You've done a bunch of work on including ode solvers into your code - I think this could be hugely beneficial to others that need an ode solver, but don't necessarily want to clone your astrodynamics toolkit to use them.

After a quick search, the only open-source options I know of that are currently available are either older (77 and/or 90), or are for teaching purposes and don't have the kind of safeguards in place for rigorous use - I am probably missing some great libraries, but the two I found that are otherwise de facto standards are:

Codes available from FSU (John Burkardt):
https://people.sc.fsu.edu/~jburkardt/f_src/rkf45/rkf45.html

ODEPACK available from netlib:
http://www.netlib.org/odepack/

What do you think? Is there something tailored for modern fortran that meets this demand that I may have missed?

Building crtbp_test.f90 under Mac OS X ver. 10.11.5 (El Capitan)

I'm attempting to build and test the Fortran-Astrodynamics-Toolkit on a MacBook Pro under Mac OS X ver. 10.11.5. The problem I have at the moment is getting installation script, build.sh, to pick-up pyplot-fortran needed by crtbp_test.f90.

What do I need to do to get Fortran-Astrodynamics-Toolkit to include pyplot-fortran in its installation?

Sam Dupree.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.