Giter Club home page Giter Club logo

generalastrodynamics.jl's Introduction

Scientific Software ๐ŸŽข

I love exploring physical concepts through computation, including Julia and Python code. My focus for the last three years of open-source hobby projects has been astrodynamics. At my highest aspiration, I want to create an ecosystem of packages that helps students to explore the solar system without having to learn complicated interfaces! I've also dabbled in other small projects: see my in-development experimental Python package manager, CommonLicenses.jl, and my other unpinned projects!

Brief Portfolio

Astrodynamics

GeneralAstrodynamics.jl is the largest open source software project I have created. It contains graduate astrodynamics research codes which find halo orbits, and invariant manifolds about those orbits, throughout the solar system. I am working to break this larger package into constituent parts, including AstrodynamicalModels.jl and AstrodynamicalCalculations.jl. In the future, I hope to add hooks into ephemeris fetching & parsing packages that I have published: SPICEKernels.jl, SPICEBodies.jl, HorizonsAPI.jl, and HorizonsEphemeris.jl.

Developer Tools

Julia's pakage manager allows users to simply replicate environments without much effort. Python is an older language with older package distribution infrastructure. Can Julia's easily-replicatable environments be adapted to Python? Possibly! I'm trying some ideas out in dimples.

See also opinionated (and a bit cursed) namespace hygiene and scoping within module-hygiene and block-scopes, and Markdown-like admonition blocks (in the style of Julia's in-terminal admonition blocks) in rich-admonitions.

When you write open-source computational documents in Julia, consider CommonLicenses.jl! This package allows you to easily paste license contents inline, without working about links or manually pasting license text.

Forward Work

In the coming years, I hope to continue exploring physical concepts through computation with Julia and Python. Along the way, I'll release any potentially useful substantial pieces of code as open source software.

generalastrodynamics.jl's People

Contributors

cadojo avatar github-actions[bot] avatar pbouffard avatar

Stargazers

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

Watchers

 avatar

generalastrodynamics.jl's Issues

`Makie.jl` integration

Right now plotting functions and visualizations use Plots, which is great, but there should also be Makie integration.

Kepler propagator bug

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

# Make orbit
r = [0.0, 11681.0, 0.0] * u"km"
v = [5.134, 4.226, 2.787] * u"km/s"
orbit = Orbit(r, v, Earth)

# Propagate 1000 seconds
kepler(orbit, 1000u"s"; max_iter=100000)

Returns: NaN error. This works if tol and max_iter are set accordingly.

This should return a user friendly answer to the user.

Package should be broken into submodules

Submodules should include...

  • Module for handling abstract orbit types
  • Module for handling bodies
  • Module for handling two-body problem
  • Module for handling n-body problem

Correct `\approx` fields throughout package

  • I horribly misunderstood how isapprox operates
  • atol defaults to 0, so x \approx 0 is equivalent to x == 0
  • All of the isapprox checks I make through the Cartesian / Keplerian transform functions are likely not needed

Smarter trajectory handling

Trajectories could be better!

Right now, they're just Vectors of Orbit structures. This could be so much better for many reasons, including lots of memory allocation necessary to get a high degree of precision for trajectory calculations, and more.

Ideas for Improvement

  • Allow for returning ODESolution structures from propagate with a odesolution=Val{true} switch, and manually add methods for applying astrodynamics calculations

I don't like that solution. Is there another?

OrbitalTrajectories.jl

While watching Julia-related talks online, I found the OrbitalTrajectories.jl talk. Turns out OrbitalTrajectories also uses DifferentialEquations for propagating orbits (no surprises there). What is interesting is that the ODESolution object is returned directly from the propagation. That allows for interpolating by epoch, and access to DifferentialEquations helper methods.

Conclusion

  • The Trajectory design by OrbitalTrajectories is far more robust. This should be the default, and a simple Vector of Orbit structures should be available via vec=Val{true}

Add maneuvers

  • Add circularize function

  • Add Hohmann function

  • Add eccentricity change function

  • Add semi major axis change function

  • Add common simultaneous orbital element change function

Restructure submodules

  • Plots and Propagators should be their own, separate submodules
  • Add unit test files for each submodule in Astrodynamics

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

Clean up `TwoBody`

  • Separate common equations from conic-specific equations

  • Remove ::TwoBodyState calculation function calls from CartesianState(::KeplerianState) and KeplerianState(::CartesianState) to avoid circular references in the future

  • While we're at it... remove CartesianState and KeplerianState - the states should track in the background, always

  • Change helper functions to target TwoBodyOrbit

  • Pick a ...Orbit and ...State design and stick with it, damnit!

That's all for now, but there's definitely a lot more that can be improved.

`Orbit` structure rewrites

Change to a more functional-styled design. Data structures should have the minimum necessary information to reconstruct any related value.

Parameterized conic sections?

Check if two-body equations change based on conic section. If so, Orbit types should be parameterized by conic sections so we can dispatch accordingly.

Superpackage Structure

The first cut at GeneralAstrodynamics.jl contained many submodules.
Now, all substantial portions of GeneralAstrodynamics.jl's v0
functionality has been added to the following external packages.

  1. AstrodynamicalModels.jl
  2. AstrodynamicalCalculations.jl
  3. AstrodynamicalSolvers.jl

New packages have also been independently developed and released,
including the following.

  1. SPICEKernels.jl
  2. SPICEApplications.jl
  3. SPICEBodies.jl
  4. HorizonsAPI.jl
  5. HorizonsEphemeris.jl

Moving forward, GeneralAstrodynamics.jl should simply tie together
all of the functionality provided by the above packages. This is also
a good opportunity to release v1!

Change structures to ComonentArrays

Is your feature request related to a problem? Please describe.
Both orbit data structures are not iterable, and need to be unit stripped and parsed before they can be used in solvers. As a result, the propagation functions strip units and parse, and return all data twice: one copy with units, and the other without.

Describe the solution you'd like
All structures should be ComponentArrays, and should be iterable for solvers with units. The arrays should be explicitly typed so the solver calls are still fast.

Standard Cartesian State vectors

CR3BP, R2BP, and NBP orbits all have the same fields,r, v to represent some Cartesian position with respect to something. This should be standardized.

The motivation for this issue is some ideas I have for ephemeris wrappers. At first, I outputted TwoBodyState instances from the ephemeris files. But this isn't always valid! I'd like to use ephemeris for CR3BP, 2BP, and NBody analysis, as well as CR3BP and 2BP patched conics. So I should just output some Cartesian state that's valid across all modules.

Or maybe I should export Body instances?

Let's see what this turns into!

Add all planets and common bodies as `CelestialBody`

  • Currently only Earth and the Sun are supported, but I should add:
  1. Mercury
  2. Venus
  3. Moon
  4. Mars
  5. Jupiter
  6. Saturn
  7. Uranus
  8. Neptune
  9. Pluto

That's all for now, maybe I can add some interesting non-Earth moons as well in the future.

Lambert's problem

  • Implement Lambert's problem with universal variables (as shown in Vallado's textbook)

Integrate `GeneralAstrodynamics` with other tools

Tools

AstroLib

  • Integrated?
  • AstroLib has a lot of useful routines for space navigation, and variables for information about solar system bodies
  • Right now, GeneralAstrodynamics uses its own variables for solar system planets, and CelestialBodies โ€“ maybe we should use tools provided by AstroLib instead

Type instability issues

The new v0.10 re-write is way faster than v0.9, but somehow v0.09 was always type stable and v0.10 functions are nearly always type unstable.

This needs to be fixed!

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.