Skip to content

Commit

Permalink
Merge pull request #90 from cadojo/dev
Browse files Browse the repository at this point in the history
Perifocal tracking
  • Loading branch information
cadojo authored Oct 17, 2020
2 parents e2f0717 + 35d4fe3 commit 285c2ae
Show file tree
Hide file tree
Showing 20 changed files with 575 additions and 365 deletions.
19 changes: 0 additions & 19 deletions .github/workflows/docs.yml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/julia-latest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@

name: Julia-Nightly
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version:
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
arch:
- x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}
- uses: actions/cache@v1
env:
cache-name: cache-artifacts
with:
path: ~/.julia/artifacts
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ hashFiles('**/Project.toml') }}
restore-keys: |
${{ runner.os }}-test-${{ env.cache-name }}-
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-runtest@latest
1 change: 0 additions & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ jobs:
matrix:
version:
- '1.5'
- 'nightly'
os:
- ubuntu-latest
- macOS-latest
Expand Down
13 changes: 12 additions & 1 deletion .github/workflows/tag.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
name: TagBot
name: Documentation
on:
schedule:
- cron: 0 0 * * *
workflow_dispatch:
jobs:
TagBot:
name: TagBot
runs-on: ubuntu-latest
steps:
- uses: JuliaRegistries/TagBot@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
Documenter:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: julia-actions/julia-buildpkg@latest
- uses: julia-actions/julia-docdeploy@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }}
79 changes: 45 additions & 34 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# This file is machine-generated - editing it directly is not advised

[[AbstractAlgebra]]
deps = ["InteractiveUtils", "LinearAlgebra", "Markdown", "Random", "SparseArrays", "Test"]
git-tree-sha1 = "8fa03ecf25341ff3e8fb301dba3f41c6fe09952e"
deps = ["InteractiveUtils", "LinearAlgebra", "Markdown", "Random", "RandomExtensions", "SparseArrays", "Test"]
git-tree-sha1 = "b861cb913bc7e2e52e93bb9ad3def00bbd658889"
uuid = "c3fe647b-3220-5bb0-a1ea-a7954cac585d"
version = "0.10.0"
version = "0.11.0"

[[Adapt]]
deps = ["LinearAlgebra"]
Expand All @@ -20,15 +20,15 @@ version = "0.0.4"

[[ArrayInterface]]
deps = ["LinearAlgebra", "Requires", "SparseArrays"]
git-tree-sha1 = "a7110d4291700c0d9ddbeb5fa41c3b9c4659c2aa"
git-tree-sha1 = "920136b6b8ae5bd28a3c45d68e55421dec156d7f"
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
version = "2.13.3"
version = "2.13.6"

[[ArrayLayouts]]
deps = ["Compat", "FillArrays", "LinearAlgebra", "SparseArrays"]
git-tree-sha1 = "d6f1ecde467019346f7601fb2ee58cb2bc60d121"
git-tree-sha1 = "613ee839b41d4fb5aef6494a9ac998d058729051"
uuid = "4c555306-a7a7-4459-81d9-ec55ddd5c99a"
version = "0.4.8"
version = "0.4.9"

[[Artifacts]]
deps = ["Pkg"]
Expand All @@ -37,10 +37,10 @@ uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
version = "1.3.0"

[[BandedMatrices]]
deps = ["ArrayLayouts", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "9b90c8e22ff5a467ef14699bc38afac53885ac3e"
deps = ["ArrayLayouts", "Compat", "FillArrays", "LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "c462231baa800ec25075747c97c6477fffa89873"
uuid = "aae01518-5342-5314-be14-df237901396f"
version = "0.15.21"
version = "0.15.24"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Expand Down Expand Up @@ -70,15 +70,15 @@ version = "0.5.1"

[[CanonicalTraits]]
deps = ["MLStyle"]
git-tree-sha1 = "e4581e3fadda3824e0df04396c85258a2107035d"
git-tree-sha1 = "fe3d23a57c0c9d9b99d7e65890a36c3de6b14906"
uuid = "a603d957-0e48-4f86-8fbd-0b7bc66df689"
version = "0.2.2"
version = "0.2.3"

[[ChainRulesCore]]
deps = ["LinearAlgebra", "MuladdMacro"]
git-tree-sha1 = "bf716c385bbffdefc5503e8ae13ae6c2ceeb3038"
git-tree-sha1 = "a7e639087196dc62ce4f7cad7224735d7520e963"
uuid = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
version = "0.9.13"
version = "0.9.16"

[[ColorSchemes]]
deps = ["ColorTypes", "Colors", "FixedPointNumbers", "Random", "StaticArrays"]
Expand Down Expand Up @@ -111,9 +111,9 @@ version = "0.3.0"

[[Compat]]
deps = ["Base64", "Dates", "DelimitedFiles", "Distributed", "InteractiveUtils", "LibGit2", "Libdl", "LinearAlgebra", "Markdown", "Mmap", "Pkg", "Printf", "REPL", "Random", "SHA", "Serialization", "SharedArrays", "Sockets", "SparseArrays", "Statistics", "Test", "UUIDs", "Unicode"]
git-tree-sha1 = "cf03b37436c6bc162e7c8943001568b4cad4bee3"
git-tree-sha1 = "f76e41cf110de7176a657c72409e722cfc86fbb6"
uuid = "34da2185-b29b-5c13-b0c7-acf172513d20"
version = "3.19.0"
version = "3.20.0"

[[CompilerSupportLibraries_jll]]
deps = ["Libdl", "Pkg"]
Expand Down Expand Up @@ -144,6 +144,11 @@ git-tree-sha1 = "f0464e499ab9973b43c20f8216d088b61fda80c6"
uuid = "adafc99b-e345-5852-983c-f28acb93d879"
version = "0.2.2"

[[Crayons]]
git-tree-sha1 = "3f71217b538d7aaee0b69ab47d9b7724ca8afa0d"
uuid = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
version = "4.0.4"

[[DataAPI]]
git-tree-sha1 = "176e23402d80e7743fc26c19c681bfb11246af32"
uuid = "9a962f9c-6df0-11e9-0e5d-c546b8b5ee8a"
Expand All @@ -166,9 +171,9 @@ uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[DelayDiffEq]]
deps = ["DataStructures", "DiffEqBase", "LinearAlgebra", "Logging", "OrdinaryDiffEq", "Printf", "RecursiveArrayTools", "Reexport", "Roots", "UnPack"]
git-tree-sha1 = "a74a10a4c9885313b00e1f6409ef0fc8141af68e"
git-tree-sha1 = "406d5213a04d251ac751300d84f04ff34f5f8f11"
uuid = "bcd4f6db-9728-5f36-b5f7-82caef46ccdb"
version = "5.24.2"
version = "5.25.0"

[[DelimitedFiles]]
deps = ["Mmap"]
Expand Down Expand Up @@ -276,9 +281,9 @@ version = "0.4.0"

[[FFMPEG_jll]]
deps = ["Artifacts", "Bzip2_jll", "FreeType2_jll", "FriBidi_jll", "JLLWrappers", "LAME_jll", "LibVPX_jll", "Libdl", "Ogg_jll", "OpenSSL_jll", "Opus_jll", "Pkg", "Zlib_jll", "libass_jll", "libfdk_aac_jll", "libvorbis_jll", "x264_jll", "x265_jll"]
git-tree-sha1 = "13a934b9e74a8722bf1786c989de346a9602e695"
git-tree-sha1 = "3cc57ad0a213808473eafef4845a74766242e05f"
uuid = "b22a6f82-2f65-5046-a5b2-351ab43fb4e5"
version = "4.3.1+2"
version = "4.3.1+4"

[[FastClosures]]
git-tree-sha1 = "acebe244d53ee1b461970f8910c235b259e772ef"
Expand All @@ -287,9 +292,9 @@ version = "0.3.2"

[[FillArrays]]
deps = ["LinearAlgebra", "Random", "SparseArrays"]
git-tree-sha1 = "b955c227b0d1413a1a97e2ca0635a5de019d7337"
git-tree-sha1 = "502b3de6039d5b78c76118423858d981349f3823"
uuid = "1a297f60-69ca-5386-bcde-b61e274b549b"
version = "0.9.6"
version = "0.9.7"

[[FiniteDiff]]
deps = ["ArrayInterface", "LinearAlgebra", "Requires", "SparseArrays", "StaticArrays"]
Expand Down Expand Up @@ -410,9 +415,9 @@ uuid = "82899510-4779-5014-852e-03e436cf321d"
version = "1.0.0"

[[JLLWrappers]]
git-tree-sha1 = "dbc0967f6403829a6682493fdb4ec7c0ebfd2e68"
git-tree-sha1 = "7cec881362e5b4e367ff0279dd99a06526d51a55"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.1.1"
version = "1.1.2"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
Expand Down Expand Up @@ -581,9 +586,9 @@ uuid = "71a1bf82-56d0-4bbc-8a3c-48b961074391"
version = "0.1.5"

[[OffsetArrays]]
git-tree-sha1 = "3fdfca8a532507d65f39ff0ad34fe81097a55337"
git-tree-sha1 = "a416e2f267e2c8729f25bcaf1ce19d2893faf393"
uuid = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
version = "1.3.0"
version = "1.3.1"

[[Ogg_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
Expand Down Expand Up @@ -674,9 +679,9 @@ version = "1.0.7"

[[Plots]]
deps = ["Base64", "Contour", "Dates", "FFMPEG", "FixedPointNumbers", "GR", "GeometryBasics", "GeometryTypes", "JSON", "Latexify", "LinearAlgebra", "Measures", "NaNMath", "Pkg", "PlotThemes", "PlotUtils", "Printf", "REPL", "Random", "RecipesBase", "RecipesPipeline", "Reexport", "Requires", "Showoff", "SparseArrays", "Statistics", "StatsBase", "UUIDs"]
git-tree-sha1 = "9376c978098b85a001870ad0270569b6e445f154"
git-tree-sha1 = "f4425bbd5f313b074d6ce3b86d80c0ad16bf7326"
uuid = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
version = "1.6.10"
version = "1.6.12"

[[PoissonRandom]]
deps = ["Random", "Statistics", "Test"]
Expand Down Expand Up @@ -707,6 +712,12 @@ uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[RandomExtensions]]
deps = ["Random", "SparseArrays", "Test"]
git-tree-sha1 = "a1f5f900aaf39849bd59efcf751df79f1179bb73"
uuid = "fb686558-2515-59ef-acaa-46db3789a887"
version = "0.4.2"

[[RandomNumbers]]
deps = ["Random", "Requires"]
git-tree-sha1 = "441e6fc35597524ada7f85e13df1f4e10137d16f"
Expand All @@ -726,9 +737,9 @@ version = "0.1.13"

[[RecursiveArrayTools]]
deps = ["ArrayInterface", "LinearAlgebra", "RecipesBase", "Requires", "StaticArrays", "Statistics", "ZygoteRules"]
git-tree-sha1 = "800236466c6932b9ddc78c1970706188fd8e14b4"
git-tree-sha1 = "639b3c4c7bcdc42be3ce69c4919eac17be73242b"
uuid = "731186ca-8d62-57ce-b412-fbd966d074cd"
version = "2.7.1"
version = "2.7.2"

[[RecursiveFactorization]]
deps = ["LinearAlgebra", "LoopVectorization", "VectorizationBase"]
Expand All @@ -744,9 +755,9 @@ version = "0.2.0"

[[Requires]]
deps = ["UUIDs"]
git-tree-sha1 = "2fc2e1ab606a5dca7bbad9036a694553c3a57926"
git-tree-sha1 = "28faf1c963ca1dc3ec87f166d92982e3c4a1f66d"
uuid = "ae029012-a4dd-5104-9daa-d747884805df"
version = "1.0.3"
version = "1.1.0"

[[ResettableStacks]]
deps = ["StaticArrays"]
Expand Down Expand Up @@ -901,9 +912,9 @@ version = "5.2.0+1"

[[SymbolicUtils]]
deps = ["AbstractAlgebra", "Combinatorics", "DataStructures", "NaNMath", "SpecialFunctions", "TimerOutputs"]
git-tree-sha1 = "3cd0b83054bd456ac5c8740900ef4d1f830462c0"
git-tree-sha1 = "cd230ab5f02844155415aad28e8474fe459fe366"
uuid = "d1185830-fcd6-423d-90d6-eec64667417b"
version = "0.5.1"
version = "0.5.2"

[[TableTraits]]
deps = ["IteratorInterfaceExtensions"]
Expand Down
5 changes: 3 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name = "UnitfulAstrodynamics"
uuid = "673e7d9c-15b0-48d3-bce0-fab551f3a174"
authors = ["Joe Carpinelli <jdcarpinelli@gmail.com>"]
version = "0.5.0"
version = "0.5.1"

[deps]
ComponentArrays = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
Crayons = "a8cc5b0e-0ffa-5ad4-8c14-923d3ee1735f"
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
Logging = "56ddb016-857b-54e1-b83d-db4d58db5568"
Expand All @@ -18,7 +19,6 @@ UnitfulAngles = "6fb2a4bd-7999-5318-a3b2-8ad61056cd98"
UnitfulAstro = "6112ee07-acf9-5e0f-b108-d242c714bf9f"

[compat]
julia = "1"
ComponentArrays = "0.8"
DifferentialEquations = "6.15"
PhysicalConstants = "0.2"
Expand All @@ -29,3 +29,4 @@ StaticArrays = "0.12"
Unitful = "1.4"
UnitfulAngles = "0.6"
UnitfulAstro = "1.0"
julia = "1"
24 changes: 12 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,31 @@ A simple Astrodynamics package, written with Julia!

## Motivation

This package aims to provide a simple interface for common astrodynamics problems. It was created to learn more about Astrodynamics, and will be developed alongside a Graduate Astrodynamics course at the University of Maryland. The packages [JuliaSpace/Astrodynamics.jl](https://github.com/JuliaSpace/Astrodynamics.jl) [JuliaAstro/AstroBase.jl](https://github.com/JuliaAstro/AstroBase.jl)are more fully featured. I will continue adding features to this package, but for a more complete feature set, use the packages provided by [JuliaSpace](https://github.com/JuliaSpace) and [JuliaAstro](https://github.com/JuliaAstro).
This package aims to provide a simple interface for common astrodynamics problems. It was created to learn more about Astrodynamics, and will be developed alongside a Graduate Astrodynamics course at the University of Maryland. The packages [JuliaSpace/Astrodynamics.jl](https://github.com/JuliaSpace/Astrodynamics.jl) and [JuliaAstro/AstroBase.jl](https://github.com/JuliaAstro/AstroBase.jl) are more fully featured. I will continue adding features to this package, but for a more complete feature set, use the packages provided by [JuliaSpace](https://github.com/JuliaSpace) and [JuliaAstro](https://github.com/JuliaAstro).

## Credits

\[1\] Vallado, David A. Fundamentals of astrodynamics and applications. Vol. 12. Springer Science & Business Media, 2001.
* All equations and algorithms within `UnitfulAstrodynamics` are pulled from Vallado's _Fundamentals of Astrodynamics and Applications_, as well as course notes from ENAE 601 (Astrodynamics) at the University of Maryland.

\[2\] [JuliaAstro/AstroBase.jl](https://github.com/JuliaAstro/AstroBase.jl)
* `AstroBase` is referenced as a well thought-out Julia package structure example (I'm new to Julia!), as well as feature ideas.
* `AstroBase` is referenced as a well thought-out Julia package structure example, as well as feature ideas.

\[3\] [Unitful.jl](https://github.com/PainterQubits/Unitful.jl) and [UnitfulAstro.jl](https://github.com/JuliaAstro/UnitfulAstro.jl) are used for unit handling.

## Usage

Check out the [Getting Started](https://cadojo.github.io/UnitfulAstrodynamics.jl/stable/Overview/usage/#Getting-Started) documentation for code examples, and more detail about using this package. Some quick examples are shown below!
Check out the [Getting Started](https://cadojo.github.io/UnitfulAstrodynamics.jl/stable/#Getting-Started) documentation for code examples, and more detail about using this package. Some quick examples are shown below!

#### Two-body Problem

The `TwoBody` module handles Astrodynamics scenarios within the two-body problem.

```Julia
# Cartesian state to Orbit
= [0.0, 11681.0, 0.0]u"km"
= [5.134, 4.226, 2.787]u"km/s"
orbit1 = Orbit(r̅, v̅, Earth)
rᵢ = [0.0, 11681.0, 0.0] * u"km"
vᵢ = [5.134, 4.226, 2.787] * u"km/s"
orbit1 = Orbit(rᵢ, vᵢ, Earth)

# Keplerian state to Orbit
e = 0.3 * u"rad"
Expand Down Expand Up @@ -65,16 +65,16 @@ The `NBody` module helps to solve the classical gravitational `NBody` problem.

```Julia
# It's MY Earth, and I want it now
= [0.0, 0.0, 0.0]u"km"
= [0.0, 0.0, 0.0]u"km/s"
r= [0.0, 0.0, 0.0]u"km"
v= [0.0, 0.0, 0.0]u"km/s"
m₁ = Earth.m
myEarth = Body(₁, ₁, m₁)
myEarth = Body(r₁, v₁, m₁)

# And we'll need a satellite...
= [0.0, 11681.0, 0.0]u"km"
= [5.134, 4.226, 2.787]u"km/s"
r= [0.0, 11681.0, 0.0]u"km"
v= [5.134, 4.226, 2.787]u"km/s"
m₂ = 1000.0u"kg"
mySatellite = Body(₂, ₂, m₂)
mySatellite = Body(r₂, v₂, m₂)

# Construct a MultibodySystem
sys = MultibodySystem([myEarth, mySatellite])
Expand Down
Loading

2 comments on commit 285c2ae

@cadojo
Copy link
Collaborator Author

@cadojo cadojo commented on 285c2ae Oct 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator register branch=main

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/23116

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.5.1 -m "<description of version>" 285c2ae35461956adf28eea874e0876bbbdecdee
git push origin v0.5.1

Please sign in to comment.