Skip to content

Commit

Permalink
Fix documentation so that it builds with latest Documenter version. A…
Browse files Browse the repository at this point in the history
…dd coumentation for SGP Models and fix some missing docs
  • Loading branch information
duncaneddy committed May 17, 2024
1 parent 0101a84 commit 3e6842f
Show file tree
Hide file tree
Showing 9 changed files with 108 additions and 55 deletions.
79 changes: 45 additions & 34 deletions Manifest.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This file is machine-generated - editing it directly is not advised

julia_version = "1.9.0"
julia_version = "1.10.3"
manifest_format = "2.0"
project_hash = "5f9347c0e1dd71efe90e5f50b60636488e00d6a9"

Expand All @@ -23,7 +23,7 @@ version = "1.0.2"
[[deps.CompilerSupportLibraries_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "e66e0078-7015-5450-92f7-15fbd957f2ae"
version = "1.0.2+0"
version = "1.1.1+0"

[[deps.Dates]]
deps = ["Printf"]
Expand All @@ -44,21 +44,26 @@ uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
[[deps.LibCURL]]
deps = ["LibCURL_jll", "MozillaCACerts_jll"]
uuid = "b27032c2-a3e7-50c8-80cd-2d36dbcbfd21"
version = "0.6.3"
version = "0.6.4"

[[deps.LibCURL_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll", "Zlib_jll", "nghttp2_jll"]
uuid = "deac9b47-8bc7-5906-a0fe-35ac56dc84c0"
version = "7.84.0+0"
version = "8.4.0+0"

[[deps.LibGit2]]
deps = ["Base64", "NetworkOptions", "Printf", "SHA"]
deps = ["Base64", "LibGit2_jll", "NetworkOptions", "Printf", "SHA"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[deps.LibGit2_jll]]
deps = ["Artifacts", "LibSSH2_jll", "Libdl", "MbedTLS_jll"]
uuid = "e37daf67-58a4-590a-8e99-b0245dd2ffc5"
version = "1.6.4+0"

[[deps.LibSSH2_jll]]
deps = ["Artifacts", "Libdl", "MbedTLS_jll"]
uuid = "29816b5a-b9ab-546f-933c-edad1886dfa8"
version = "1.10.2+0"
version = "1.11.0+1"

[[deps.Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"
Expand All @@ -77,11 +82,11 @@ uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"
[[deps.MbedTLS_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.28.2+0"
version = "2.28.2+1"

[[deps.MozillaCACerts_jll]]
uuid = "14a3606d-f60d-562e-9121-12d972cd8159"
version = "2022.10.11"
version = "2023.1.10"

[[deps.NetworkOptions]]
uuid = "ca575930-c2e3-43a9-ace4-1e988b2c1908"
Expand All @@ -90,12 +95,24 @@ version = "1.2.0"
[[deps.OpenBLAS_jll]]
deps = ["Artifacts", "CompilerSupportLibraries_jll", "Libdl"]
uuid = "4536629a-c528-5b80-bd46-f80d51c5b363"
version = "0.3.21+4"
version = "0.3.23+4"

[[deps.Pkg]]
deps = ["Artifacts", "Dates", "Downloads", "FileWatching", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "Serialization", "TOML", "Tar", "UUIDs", "p7zip_jll"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
version = "1.9.0"
version = "1.10.0"

[[deps.PrecompileTools]]
deps = ["Preferences"]
git-tree-sha1 = "5aa36f7049a63a1528fe8f7c3f2113413ffd4e1f"
uuid = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
version = "1.2.1"

[[deps.Preferences]]
deps = ["TOML"]
git-tree-sha1 = "9306f6085165d270f7e3db02af26a400d580f5c6"
uuid = "21216c6a-2e73-6563-6e65-726566657250"
version = "1.4.3"

[[deps.Printf]]
deps = ["Unicode"]
Expand All @@ -106,7 +123,7 @@ deps = ["InteractiveUtils", "Markdown", "Sockets", "Unicode"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[deps.Random]]
deps = ["SHA", "Serialization"]
deps = ["SHA"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[deps.SHA]]
Expand All @@ -125,30 +142,24 @@ uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"
[[deps.Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[deps.SparseArrays]]
deps = ["Libdl", "LinearAlgebra", "Random", "Serialization", "SuiteSparse_jll"]
uuid = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[[deps.StaticArrays]]
deps = ["LinearAlgebra", "Random", "StaticArraysCore", "Statistics"]
git-tree-sha1 = "c262c8e978048c2b095be1672c9bee55b4619521"
deps = ["LinearAlgebra", "PrecompileTools", "Random", "StaticArraysCore"]
git-tree-sha1 = "9ae599cd7529cfce7fea36cf00a62cfc56f0f37c"
uuid = "90137ffa-7385-5640-81b9-e52037218182"
version = "1.5.24"
version = "1.9.4"

[[deps.StaticArraysCore]]
git-tree-sha1 = "6b7ba252635a5eff6a0b0664a41ee140a1c9e72a"
uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
version = "1.4.0"
[deps.StaticArrays.extensions]
StaticArraysChainRulesCoreExt = "ChainRulesCore"
StaticArraysStatisticsExt = "Statistics"

[[deps.Statistics]]
deps = ["LinearAlgebra", "SparseArrays"]
uuid = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
version = "1.9.0"
[deps.StaticArrays.weakdeps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"

[[deps.SuiteSparse_jll]]
deps = ["Artifacts", "Libdl", "Pkg", "libblastrampoline_jll"]
uuid = "bea87d4a-7f5b-5778-9afe-8cc45184846c"
version = "5.10.1+6"
[[deps.StaticArraysCore]]
git-tree-sha1 = "36b3d696ce6366023a0ea192b4cd442268995a0d"
uuid = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
version = "1.4.2"

[[deps.TOML]]
deps = ["Dates"]
Expand Down Expand Up @@ -176,19 +187,19 @@ uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
[[deps.Zlib_jll]]
deps = ["Libdl"]
uuid = "83775a58-1f1d-513f-b197-d71354ab007a"
version = "1.2.13+0"
version = "1.2.13+1"

[[deps.libblastrampoline_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850b90-86db-534c-a0d3-1478176c7d93"
version = "5.7.0+0"
version = "5.8.0+1"

[[deps.nghttp2_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "8e850ede-7688-5339-a07c-302acd2aaf8d"
version = "1.48.0+0"
version = "1.52.0+1"

[[deps.p7zip_jll]]
deps = ["Artifacts", "Libdl"]
uuid = "3f19e933-33d8-53b3-aaab-bd5110c3b7a0"
version = "17.4.0+0"
version = "17.4.0+2"
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SatelliteDynamics"
uuid = "0e7c1a32-1b9f-5532-88a4-e668712d6a4c"
authors = ["Duncan Eddy <[email protected]>"]
version = "0.4.5"
authors = ["Duncan Eddy <[email protected]> and contributors"]
version = "0.5.0"

[deps]
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Expand Down
5 changes: 5 additions & 0 deletions docs/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[deps]
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
LaTeXStrings = "b964fa9f-0449-5b57-a5c2-d3ea65f4040f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
SatelliteDynamics = "0e7c1a32-1b9f-5532-88a4-e668712d6a4c"
22 changes: 15 additions & 7 deletions docs/make.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,24 @@ using SatelliteDynamics

include("src/makeplots.jl")

DocMeta.setdocmeta!(SatelliteDynamics, :DocTestSetup, :(using SatelliteDynamics); recursive=true)

# Generate plots
makeplots()

# Generate documents
makedocs(
modules = [SatelliteDynamics],
doctest = false,
clean = true,
linkcheck = true,
format = Documenter.HTML(),
linkcheck = false,
checkdocs = :none,
format = Documenter.HTML(
canonical="https://sisl.github.io/SatelliteDynamics.jl",
edit_link="main",
assets=String[],
prettyurls = get(ENV, "CI", nothing) == "true"
),
sitename = "SatelliteDynamics.jl",
authors = "Duncan Eddy",
pages = Any[
Expand All @@ -22,6 +33,7 @@ makedocs(
"modules/attitude.md",
"modules/coordinates.md",
"modules/astrodynamics.md",
"modules/sgp_models.md",
"Orbit Dynamics" => "modules/orbit_dynamics.md",
"Earth Environment" => Any[
"Space Weather" => "modules/earth_environment/space_weather.md",
Expand All @@ -39,11 +51,7 @@ makedocs(
]
)

# Generate plots
makeplots()

deploydocs(
repo = "github.com/sisl/SatelliteDynamics.jl",
devbranch = "master",
devurl = "latest",
devbranch = "main",
)
4 changes: 2 additions & 2 deletions docs/src/makeplots.jl
Original file line number Diff line number Diff line change
Expand Up @@ -159,8 +159,8 @@ function makeplots()
println("Generating plots")

# Make output directory
plot_dir = (pwd()[end-3:end] == "docs") ? "build/plots" : "docs/build/plots"
if isdir(plot_dir)
plot_dir = "src/plots"
if isdir(joinpath(pwd(), plot_dir))
rm(plot_dir, recursive=true)
end
mkdir(plot_dir)
Expand Down
10 changes: 10 additions & 0 deletions docs/src/modules/sgp_models.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# SGP Models

The `sgp_models` module contains the implementation of the Simplified General Perturbations (SGP) models for orbit propagation. These models are based on the work of [Vallado et al. (2001)](https://celestrak.com/publications/AIAA/2006-6753/). The SGP models are a set of simplified models for propagating the orbits of Earth-orbiting satellites. The models are based on the two-line element (TLE) format used by the US Department of Defense to distribute satellite orbit data. The SGP models are widely used in the satellite tracking community due to their simplicity and computational efficiency.

```@docs
TLE
state
ecef
eci
```
8 changes: 4 additions & 4 deletions docs/src/tutorials/orbit_propagation_example.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ module to propagate an orbit.

We can visualize the orbit in inertial space:

![](../../plots/keplerian_orbit.svg)
![](../plots/keplerian_orbit.svg)

Or the evolution of the orbital elements:

![](../../plots/keplerian_elements.svg)
![](../plots/keplerian_elements.svg)

## Full Force Model

Expand Down Expand Up @@ -114,11 +114,11 @@ t, epc, eci = sim!(orb, epcf)

We can visualize the orbit in inertial space:

![](../../plots/fullforce_orbit.svg)
![](../plots/fullforce_orbit.svg)

Or the evolution of the orbital elements:

![](../../plots/fullforce_elements.svg)
![](../plots/fullforce_elements.svg)

From these plots we can see the effect of the orbit perturbations on each of the
orbital elements.
22 changes: 18 additions & 4 deletions src/sgp_models.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2428,9 +2428,16 @@ function state(tle::TLE, epc::Epoch)
end

export ecef
```
"""
Compute the satellite state in the Earth-fixed frame.
```
Arguments:
- `tle::TLE` Two-Line element object
- `epc::Epoch` Epoch for SGP4 state
Returns:
- `ecef::AbstractArray{Float64, 1}` Position and velocity in ECEF frame. Units [m; m/s]
"""
function ecef(tle::TLE, epc::Epoch)
s = state(tle, epc)
ecef = zeros(Float64, 6)
Expand All @@ -2444,9 +2451,16 @@ function ecef(tle::TLE, epc::Epoch)
end

export eci
```
"""
Compute the satellite state in the Earth-centered inertial.
```
Arguments:
- `tle::TLE` Two-Line element object
- `epc::Epoch` Epoch for SGP4 state
Returns:
- `eci::AbstractArray{Float64, 1}` Position and velocity in ECI frame. Units [m; m/s]
"""
function eci(tle::TLE, epc::Epoch)
s = ecef(tle, epc)

Expand Down
9 changes: 7 additions & 2 deletions src/universe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -419,16 +419,21 @@ global GRAVITY_MODEL = GravModel(abspath(@__DIR__, "../data/EGM2008_90.gfc"))

export load_gravity_model
"""
Load new gravity model into module global EarthOrientationData object. The product can be one of the symbols: `:EGM2008_20`, `:EGM2008_90`, `:GGM01S`, `:GGM05S`, or the filepath to a text-encoded gravity model file.
Load new gravity model into module global EarthOrientationData object.
Arguments:
- `gfc_file::String` File path of gravity field model
- `product_name::Symbol` _OR_ a symbol of a known gravity field product. Valid ones are: `:EGM2008_20`, `:EGM2008_90`, `:GGM01S`, `:GGM05S`
"""
function load_gravity_model_file(gfc_file::String)
global GRAVITY_MODEL = GravModel(gfc_file::String)
end

"""
Load new gravity model into module global EarthOrientationData object. The product can be one of the symbols: `:EGM2008_20`, `:EGM2008_90`, `:GGM01S`, `:GGM05S`, or the filepath to a text-encoded gravity model file.
Arguments:
- `product_name::Symbol` Symbol of a known gravity field product. Valid ones are: `:EGM2008_20`, `:EGM2008_90`, `:GGM01S`, `:GGM05S`
"""
function load_gravity_model(product_name::Symbol)
global GRAVITY_MODEL = GravModel(product_name::Symbol)
end
Expand Down

0 comments on commit 3e6842f

Please sign in to comment.