Skip to content

Commit

Permalink
📚 Fix doctests
Browse files Browse the repository at this point in the history
  • Loading branch information
ronisbr authored and pbouffard-muon committed Sep 23, 2024
1 parent 127d6f5 commit 8fb7676
Show file tree
Hide file tree
Showing 7 changed files with 155 additions and 155 deletions.
12 changes: 6 additions & 6 deletions docs/src/man/earth/atmospheric_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ following fields:
```jldoctest
julia> jr1971(date_to_jd(2018, 6, 19, 18, 35, 0), deg2rad(-22), deg2rad(-45), 700e3, 79, 73.5, 1.34)
JR1971_Output{Float64}
nN2: Float64 2.8434980991303828e7
nN2: Float64 2.843498099130382e7
nO2: Float64 174222.87498004676
nO: Float64 1.4139107014677634e11
nAr: Float64 8.972570981074634
Expand Down Expand Up @@ -253,15 +253,15 @@ Notice that:
```jldoctest
julia> nrlmsise00(date_to_jd(2018, 6, 19, 18, 35, 0), 700e3, deg2rad(-22), deg2rad(-45), 73.5, 79, 5.13)
NRLMSISE00_Output{Float64}
den_N: Float64 5.597834653523333e9
den_N: Float64 5.597834653523334e9
den_N2: Float64 5.743312510585916e7
den_O: Float64 1.2705655159941983e11
den_aO: Float64 2.4185558056141124e9
den_O2: Float64 340464.9752380828
den_O2: Float64 340464.975238083
den_H: Float64 1.2667781795293002e11
den_He: Float64 6.248499395447589e11
den_Ar: Float64 23.18462060029951
den_Total: Float64 7.930928885098513e-15
den_He: Float64 6.248499395447592e11
den_Ar: Float64 23.184620600299517
den_Total: Float64 7.930928885098514e-15
T_exo: Float64 837.4122645268103
T_alt: Float64 837.4119807046409
flags: NRLMSISE00_Flags
Expand Down
90 changes: 45 additions & 45 deletions docs/src/man/earth/geomagnetic_field_models.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,58 +74,58 @@ function are the same as those in the function `igrf`.
accuracy is reduced.

```jldoctest
julia> igrf(2017.12313, 640e3, 50*pi/180, 25*pi/180, Val(:geodetic))
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
15365.787505205592
1274.9958640697
34201.21820333791
julia> igrf(2017.12313, 640e3, 50 * pi / 180, 25 * pi / 180, Val(:geodetic))
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15365.787505205588
1274.9958640696996
34201.2182033379
julia> igrfd(2017.12313, 640e3, 50, 25, Val(:geodetic))
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
15365.787505205592
1274.9958640697
34201.21820333791
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15365.787505205588
1274.9958640696996
34201.2182033379
julia> igrf(2017.12313, 6371e3+640e3, 50*pi/180, 25*pi/180, Val(:geocentric))
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
julia> igrf(2017.12313, 6371e3 + 640e3, 50 * pi / 180, 25 * pi / 180, Val(:geocentric))
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15165.486702524944
1269.7264334427598
1269.7264334427584
34243.04928373083
julia> igrfd(2017.12313, 6371e3+640e3, 50, 25, Val(:geocentric))
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
julia> igrfd(2017.12313, 6371e3 + 640e3, 50, 25, Val(:geocentric))
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15165.486702524944
1269.7264334427598
1269.7264334427584
34243.04928373083
```

```julia
julia> igrf(2026, 6371e3+640e3, 50*pi/180, 25*pi/180)
julia> igrf(2026, 6371e3 + 640e3, 50 * pi/180, 25 * pi/180)
┌ Warning: The magnetic field computed with this IGRF version may be of reduced accuracy for years greater than 2025.
└ @ SatelliteToolbox ~/.julia/dev/SatelliteToolbox/src/earth/geomagnetic_field_models/igrf/igrf.jl:103
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
15118.591511098817
1588.129544718571
└ @ SatelliteToolbox ~/.julia/dev/SatelliteToolbox/src/earth/geomagnetic_field_models/igrf/igrf.jl:367
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15118.591511098812
1588.129544718569
34668.84185460438

julia> igrfd(2026, 6371e3+640e3, 50, 25)
julia> igrfd(2026, 6371e3 + 640e3, 50, 25)
┌ Warning: The magnetic field computed with this IGRF version may be of reduced accuracy for years greater than 2025.
└ @ SatelliteToolbox ~/.julia/dev/SatelliteToolbox/src/earth/geomagnetic_field_models/igrf/igrf.jl:103
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
15118.591511098817
1588.129544718571
└ @ SatelliteToolbox ~/.julia/dev/SatelliteToolbox/src/earth/geomagnetic_field_models/igrf/igrf.jl:367
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15118.591511098812
1588.129544718569
34668.84185460438

julia> igrf(2026, 6371e3+640e3, 50*pi/180, 25*pi/180; show_warns = false)
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
15118.591511098817
1588.129544718571
julia> igrf(2026, 6371e3 + 640e3, 50 * pi / 180, 25 * pi / 180; show_warns = false)
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15118.591511098812
1588.129544718569
34668.84185460438

julia> igrfd(2026, 6371e3+640e3, 50, 25; show_warns = false)
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
15118.591511098817
1588.129544718571
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
15118.591511098812
1588.129544718569
34668.84185460438
```

Expand Down Expand Up @@ -167,31 +167,31 @@ considered as 2019.
reference frame.

```jldoctest
julia> r_e = [0;0;R0+200e3];
julia> r_e = [0; 0; R0 + 200e3];
julia> geomag_dipole(r_e)
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
1286.02428617178
-4232.804339060698
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
1286.0242861717802
-4232.804339060699
-53444.68086319672
julia> geomag_dipole(r_e, 1986)
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
1715.2656071053527
-4964.598060841779
-54246.30480714958
-4964.59806084178
-54246.30480714959
julia> r_e = [R0+200e3;0;0];
julia> geomag_dipole(r_e)
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
-2572.04857234356
-4232.804339060698
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
-2572.0485723435604
-4232.804339060699
26722.34043159836
julia> geomag_dipole(r_e, 1986)
3-element StaticArrays.SVector{3, Float64} with indices SOneTo(3):
3-element StaticArraysCore.SVector{3, Float64} with indices SOneTo(3):
-3430.5312142107055
-4964.598060841779
27123.15240357479
-4964.59806084178
27123.152403574793
```
6 changes: 3 additions & 3 deletions docs/src/man/orbit/anomalies.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ configure it:

```jldoctest
julia> M_to_E(0.04, pi/4)
0.8144932819286269
0.814493281928579
julia> M_to_f(0.04, pi/4)
0.8440031124631683
0.8440031124631191
julia> f_to_M(0.04, pi/4)
0.7300148523821107
Expand All @@ -62,7 +62,7 @@ julia> M_to_f(0, 0.343)
0.3430000000000001
julia> M_to_f(0.04, 0.343)
0.37122803399203647
0.3712280339918371
```

[^1]: In astronomy, anomaly is an angle.
14 changes: 7 additions & 7 deletions docs/src/man/orbit/general.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ where:
* `orb` is an instance of [`Orbit`](@ref).

```jldoctest
julia> dargp(7130982, 0.001111, deg2rad(98.405))
julia> dargp(7130982.0, 0.001111, deg2rad(98.405))
-6.082892348533058e-7
julia> dargp(7130982, 0.001111, deg2rad(63.435))
julia> dargp(7130982.0, 0.001111, deg2rad(63.435))
-2.433253158726004e-12
julia> dargp(7130982, 0.001111, deg2rad(98.405), :J0)
julia> dargp(7130982.0, 0.001111, deg2rad(98.405), :J0)
0.0
```

Expand Down Expand Up @@ -135,10 +135,10 @@ where:
* `orb` is an instance of [`Orbit`](@ref).

```jldoctest
julia> draan(7130982, 0.001111, deg2rad(98.405))
julia> draan(7130982.0, 0.001111, deg2rad(98.405))
1.9909533223838115e-7
julia> draan(7130982, 0.001111, deg2rad(98.405), :J0)
julia> draan(7130982.0, 0.001111, deg2rad(98.405), :J0)
0.0
```

Expand Down Expand Up @@ -170,10 +170,10 @@ where:
* `orb` is an instance of [`Orbit`](@ref).

```jldoctest
julia> period(7130982, 0.001111, deg2rad(98.405))/60
julia> period(7130982.0, 0.001111, deg2rad(98.405))/60
100.00000980636328
julia> period(7130982, 0.001111, deg2rad(98.405), :J0)/60
julia> period(7130982.0, 0.001111, deg2rad(98.405), :J0)/60
99.88119746433748
```

Expand Down
Loading

0 comments on commit 8fb7676

Please sign in to comment.