Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 5 additions & 14 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name = "GeneralAstrodynamics"
uuid = "8068df5b-8501-4530-bd82-d24d3c9619db"
authors = ["Joey Carpinelli <joey@loopy.codes>"]
version = "0.11.0"
authors = ["Joey Carpinelli <joey@loopy.codes>"]

[workspace]
projects = ["docs", "test", "lib/AstrodynamicalCalculations", "lib/AstrodynamicalModels", "lib/AstrodynamicalSolvers"]

[deps]
AstrodynamicalCalculations = "c0cf9fb7-f496-4999-a425-c50785d1b88b"
Expand All @@ -12,11 +15,6 @@ EphemerisSources = "858900df-f7ae-402a-aa8c-3e4ef85aa271"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
SPICE = "5bab7191-041a-5c2e-a744-024b9c3a5062"

[sources]
AstrodynamicalCalculations = {path="lib/AstrodynamicalCalculations"}
AstrodynamicalModels = {path="lib/AstrodynamicalModels"}
AstrodynamicalSolvers = {path="lib/AstrodynamicalSolvers"}

[compat]
AstrodynamicalCalculations = "0.5, 1"
AstrodynamicalModels = "3.4"
Expand All @@ -25,11 +23,4 @@ DocStringExtensions = "0.9"
EphemerisSources = "1.0.0"
Reexport = "1.2"
SPICE = "0.2"
julia = "1.7"

[extras]
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test", "Pkg"]
julia = "1.10"
67 changes: 56 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
[![Tests](https://github.com/cadojo/GeneralAstrodynamics.jl/workflows/Tests/badge.svg)](https://github.com/cadojo/GeneralAstrodynamics.jl/actions?query=workflow%3ATests)
[![Docs](https://github.com/cadojo/GeneralAstrodynamics.jl/workflows/Documentation/badge.svg)](https://cadojo.github.io/GeneralAstrodynamics.jl/)

# `GeneralAstrodynamics.jl`

[![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliaastro.org/GeneralAstrodynamics.jl/stable/)
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://juliaastro.org/GeneralAstrodynamics.jl/dev/)

[![Tests](https://github.com/JuliaAstro/GeneralAstrodynamics.jl/actions/workflows/Tests.yml/badge.svg)](https://github.com/JuliaAstro/GeneralAstrodynamics.jl/actions/workflows/Tests.yml)
[![Codecov](https://codecov.io/gh/JuliaAstro/GeneralAstrodynamics.jl/graph/badge.svg)](https://codecov.io/gh/JuliaAstro/GeneralAstrodynamics.jl)
[![Aqua](https://raw.githubusercontent.com/JuliaTesting/Aqua.jl/master/badge.svg)](https://github.com/JuliaTesting/Aqua.jl)
[![PkgEval](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/G/GeneralAstrodynamics.svg)](https://juliaci.github.io/NanosoldierReports/pkgeval_badges/report.html)
[![License](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

_Common astrodynamics calculations, with hooks into the SciML ecosystem._

## JuliaCon Talk

Check out `GeneralAstrodynamics` in action at JuliaCon 2021! The talk
[_Going to Jupiter with Julia_](https://www.youtube.com/watch?v=WnvKaUsGv8w)
walks through a simple Jupiter mission design while gently introducing
astrodynamics, Julia, and `GeneralAstrodynamics`.
Check out `GeneralAstrodynamics` in action at JuliaCon 2021! The talk [_Going to Jupiter with Julia_](https://www.youtube.com/watch?v=WnvKaUsGv8w) walks through a simple Jupiter mission design while gently introducing astrodynamics, Julia, and `GeneralAstrodynamics`.

## Features

Expand All @@ -23,8 +26,7 @@ astrodynamics, Julia, and `GeneralAstrodynamics`.

### Circular Restricted Three-body Problem (CR3BP)

- Structures for dimensioned and normalized Cartesian states, and dimensioned
and normalized CR3BP systems
- Structures for dimensioned and normalized Cartesian states, and dimensioned and normalized CR3BP systems
- Functions which implement common CR3BP equations
- Analytical and iterative (numerical) Halo orbit solvers
- Unstable and stable Halo orbit manifold computation
Expand All @@ -33,8 +35,7 @@ astrodynamics, Julia, and `GeneralAstrodynamics`.

### N-body Problem (NBP)

- This was implemented in a previous package version, and is currently being
refactored
- This was implemented in a previous package version, and is currently being refactored

## Usage

Expand Down Expand Up @@ -64,3 +65,47 @@ end

trajectory = propagate(orbit, T)
```

## Developer documentation

### Tests

Run all tests from top-level of monorepo:

```julia-repl
> j --proj

(GeneralAstrodynamics) pkg> test
```

Run all tests for `<subpackage>` from top-level of monorepo:

```julia-repl
> j --proj

ENV["GROUP"] = <subpackage>

(GeneralAstrodynamics) pkg> test
```

or navigate to top-level of `<subpackage>` and run tests as usual:

```julia-repl
> j --proj

(GeneralAstrodynamics/lib/AstrodynamicalCalculations) pkg> test
```

### Explicit imports

See the documentation for [`ExplicitImports.jl`]() for standard usage. For non-package files at path `<fpath>` relative to the top-level of `<subpackage>`, run the following:

```julia-repl
> julia --proj

julia> using ExplicitImports, <subpackage>

julia> include(<fpath>)

julia> print_explicit_imports(Main.<subpackage>Tests, <fpath>)
```
16 changes: 7 additions & 9 deletions lib/AstrodynamicalCalculations/Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
name = "AstrodynamicalCalculations"
uuid = "c0cf9fb7-f496-4999-a425-c50785d1b88b"
authors = ["Joey Carpinelli <joey@loopy.codes>"]
version = "1.0.0"
authors = ["Joey Carpinelli <joey@loopy.codes>"]

[workspace]
projects = ["docs", "test"]

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
Expand All @@ -12,13 +15,8 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"

[compat]
DocStringExtensions = "0.9"
LinearAlgebra = "1"
Reexport = "1.2"
StaticArrays = "1.6"
Roots = "2.0"
julia = "1.6"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[targets]
test = ["Test"]
StaticArrays = "1.6"
julia = "1.10"
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ $(LICENSE)
"""
module AstrodynamicalCalculations

using Reexport
using DocStringExtensions
using Reexport: @reexport
using DocStringExtensions: EXPORTS, IMPORTS, LICENSE

include("R2BPCalculations.jl")
@reexport using .R2BPCalculations
Expand Down
8 changes: 4 additions & 4 deletions lib/AstrodynamicalCalculations/src/CR3BPCalculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ $(EXPORTS)
"""
module CR3BPCalculations

using StaticArrays
using LinearAlgebra
using DocStringExtensions
using Roots
using StaticArrays: SMatrix, SVector
using LinearAlgebra: eigen, isposdef, normalize, ⋅
using DocStringExtensions: @template, DOCSTRING, EXPORTS, IMPORTS, LICENSE, SIGNATURES
using Roots: find_zero

@template (
FUNCTIONS,
Expand Down
6 changes: 3 additions & 3 deletions lib/AstrodynamicalCalculations/src/R2BPCalculations.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ $(EXPORTS)
"""
module R2BPCalculations

using StaticArrays
using LinearAlgebra
using StaticArrays: SMatrix, SVector
using LinearAlgebra: dot, norm, normalize, ×, ⋅

export conic,
cartesian_to_keplerian,
Expand Down Expand Up @@ -50,7 +50,7 @@ export conic,
kepler,
lambert

using DocStringExtensions
using DocStringExtensions: @template, DOCSTRING, IMPORTS, EXPORTS, LICENSE, SIGNATURES

@template (
FUNCTIONS,
Expand Down
6 changes: 6 additions & 0 deletions lib/AstrodynamicalCalculations/test/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[deps]
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
AstrodynamicalCalculations = "c0cf9fb7-f496-4999-a425-c50785d1b88b"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
37 changes: 34 additions & 3 deletions lib/AstrodynamicalCalculations/test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,40 @@ Restricted Two-body Model tests.
"""
module AstrodynamicalCalculationsTests

using LinearAlgebra
using Test, AstrodynamicalCalculations
using StaticArrays
using Test
using AstrodynamicalCalculations:
#CR3BP
converge,
diverge,
jacobi_constant,
richardson_ic,
richardson_halo,

# R2BP
R2BPCalculations,
argument_of_periapsis,
cartesian_to_keplerian,
cartesian_to_perifocal,
conic,
inclination,
kepler,
keplerian_to_cartesian,
lambert,
orbital_period,
orbital_radius,
right_ascension_ascending_node,
specific_energy,
specific_angular_momentum,
specific_angular_momentum_vector,
semimajor_axis
using LinearAlgebra: norm
using StaticArrays: SVector

@testset "Aqua tests" begin
using Aqua: test_all
using AstrodynamicalCalculations
test_all(AstrodynamicalCalculations)
end

@testset verbose = false "R2BP Calculations" begin
@test conic(0) == :Circular
Expand Down
17 changes: 6 additions & 11 deletions lib/AstrodynamicalModels/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ uuid = "4282b555-f590-4262-b575-3e516e1493a7"
version = "3.8.0"
authors = ["Joseph D Carpinelli <joey@loopy.codes>"]

[workspace]
projects = ["docs", "test"]

[deps]
DocStringExtensions = "ffbed154-4ef7-542d-bbb7-c09d3a79fcae"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Expand All @@ -23,19 +26,11 @@ SPICEBodiesExt = "SPICEBodies"
[compat]
AstrodynamicalCalculations = "1"
DocStringExtensions = "0.9"
LinearAlgebra = "1"
Memoize = "0.4"
ModelingToolkit = "9"
SPICEBodies = "1"
SciMLBase = "2"
StaticArrays = "1"
Symbolics = "5, 6"
julia = "1.7"

[extras]
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
AstrodynamicalCalculations = "c0cf9fb7-f496-4999-a425-c50785d1b88b"

[targets]
test = ["Test", "SPICEBodies", "AstrodynamicalCalculations"]

[sources]
AstrodynamicalCalculations = {path="../AstrodynamicalCalculations"}
julia = "1.10"
27 changes: 19 additions & 8 deletions lib/AstrodynamicalModels/src/AstrodynamicalModels.jl
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,25 @@ export Orbit, R2BOrbit, CR3BOrbit, CartesianOrbit, KeplerianOrbit
# Export every method
export state, parameters, dynamics, system

using Symbolics
using SciMLBase
using Memoize
using LinearAlgebra
using ModelingToolkit
using StaticArrays

using DocStringExtensions
using SciMLBase: SciMLBase
using Memoize: @memoize
using LinearAlgebra: I, norm
using ModelingToolkit:
@independent_variables,
Differential,
@parameters,
@variables,
t_nounits as t,
D_nounits as D,
ODEFunction,
ODEProblem,
Symbolics,
System,
complete
import ModelingToolkit
using StaticArrays: FieldMatrix, FieldVector

using DocStringExtensions: @template, DOCSTRING, EXPORTS, IMPORTS, LICENSE, SIGNATURES, TYPEDEF
@template (FUNCTIONS, METHODS, MACROS) = """
$(SIGNATURES)

Expand Down
Loading
Loading