diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 2488bdf..71da811 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-16T05:42:13","documenter_version":"1.3.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.10.2","generation_timestamp":"2024-03-22T00:31:52","documenter_version":"1.3.0"}} \ No newline at end of file diff --git a/dev/generated/basic/index.html b/dev/generated/basic/index.html index ff76cf7..fa6726f 100644 --- a/dev/generated/basic/index.html +++ b/dev/generated/basic/index.html @@ -21,7 +21,7 @@ rx = GroundSampler(distance, field)
GroundSampler{Float64}(2.0e6, LongwaveModePropagator.Fields.Ez)
Finally there is a Receiver
struct which is defined with a geographic location and Antenna
, but it is not exported because geographic information is not currently handled by the package.
The abstract LongwaveModePropagator.Waveguide
type is used to describe the earth-ionosphere waveguide with a BField
, Species
, and Ground
.
The basic concrete waveguide type is a HomogeneousWaveguide
, with fields
bfield::BField
: background magnetic field.species::S
: ionosphere constituents.ground::Ground
: waveguide ground.distance::Float64
: distance from the Emitter
at the start of the segment in meters.If not specified, distance
is 0. The form of the function call is
HomogeneousWaveguide(bfield, species, ground)
HomogeneousWaveguide
should be used when modeling with only a single homogeneous waveguide (ground, ionosphere, and magnetic field) along the propagation path.
To model an inhomogeneous propagation path, there is a SegmentedWaveguide
type. The SegmentedWaveguide
is simply a wrapper for a Vector
of waveguides.
Let's look at the components of a waveguide.
The BField
type describes the magnitude and direction of the background magnetic field. Internally it consists of fields for the field strength B
in Teslas and direction cosines corresponding to the directions parallel, perpendicular, and up into the waveguide.
A BField
is most commonly constructed by specifying the field strength, dip
angle in radians from the horizontal and positive when directed into Earth, and azimuth
angle in radians from the propagation direction, positive towards $y$.
For example,
bfield = BField(50000e-9, π/2, 0)
BField(5.0e-5, 6.123233995736766e-17, 0.0, -1.0)
bfield
is a vertical magnetic field of 50,000 nT.
The Species
struct identifies a constituent species of the ionosphere. Species
contains the fields
charge::Float64
: signed species charged in Coulombs.mass::Float64
: species mass in kilograms.numberdensity::F
: a callable that returns number density in number per cubic meter as a function of height in meters.collisionfrequency::G
: a callable that returns the collision frequency in collisions per second as a function of height in meters.numberdensity
and collisionfrequency
should be "callables" (usually Function
s) that return the number density and collision frequency, respectively, as a function of height in meters.
For convenience, the Wait and Spies profile is accessible via waitprofile
. Similarly the accompanying collision frequency profiles are electroncollisionfrequency
and ioncollisionfrequency
.
To define some electrons for the ionosphere (QE
and ME
were explicitly imported at the top of the example):
h = 75
β = 0.35
-electrons = Species(QE, ME, z->waitprofile(z, h, β), electroncollisionfrequency)
Species(-1.602176634e-19, 9.1093837015e-31, FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x0000763071f813b0, Ptr{Nothing} @0x00007630168ac068, Base.RefValue{Main.var"#1#2"}(Main.var"#1#2"()), Main.var"#1#2"), FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x0000763071f81700, Ptr{Nothing} @0x00007630168ac070, Base.RefValue{typeof(electroncollisionfrequency)}(LongwaveModePropagator.electroncollisionfrequency), typeof(electroncollisionfrequency)))
Note that we used a lambda function to specify the waitprofile
with our given $h'$ and $\beta$. Also note that these two parameters are a rare instance of SI units not strictly being followed. See the help for waitprofile
for more information, including optional height cutoff and density threshold arguments.
electroncollisionfrequency
is a function of height z
only, so it is not necessary to generate a lambda function. We can pass the function handle directly.
Ground
describes the relative permittivity ϵᵣ
and conductivity σ
of Earth.
ground = Ground(10, 2e-4)
Ground(10, 0.0002)
For convenience, a dictionary of common ground indices is exported.
GROUND
Dict{Int64, Ground} with 10 entries:
+electrons = Species(QE, ME, z->waitprofile(z, h, β), electroncollisionfrequency)
Species(-1.602176634e-19, 9.1093837015e-31, FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x00007fc886981290, Ptr{Nothing} @0x00007fc8256c8070, Base.RefValue{Main.var"#1#2"}(Main.var"#1#2"()), Main.var"#1#2"), FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x00007fc8869815e0, Ptr{Nothing} @0x00007fc8256c8078, Base.RefValue{typeof(electroncollisionfrequency)}(LongwaveModePropagator.electroncollisionfrequency), typeof(electroncollisionfrequency)))
Note that we used a lambda function to specify the waitprofile
with our given $h'$ and $\beta$. Also note that these two parameters are a rare instance of SI units not strictly being followed. See the help for waitprofile
for more information, including optional height cutoff and density threshold arguments.
electroncollisionfrequency
is a function of height z
only, so it is not necessary to generate a lambda function. We can pass the function handle directly.
Ground
describes the relative permittivity ϵᵣ
and conductivity σ
of Earth.
ground = Ground(10, 2e-4)
Ground(10, 0.0002)
For convenience, a dictionary of common ground indices is exported.
GROUND
Dict{Int64, Ground} with 10 entries:
5 => Ground(15, 0.001)
4 => Ground(10, 0.0003)
6 => Ground(15, 0.003)
@@ -42,7 +42,7 @@
electrons = Species(QE, ME, z->waitprofile(z, 75, 0.35), electroncollisionfrequency)
ground = GROUND[5]
-waveguide = HomogeneousWaveguide(bfield, electrons, ground)
HomogeneousWaveguide{Species}(BField(5.0e-5, 6.123233995736766e-17, 0.0, -1.0), Species(-1.602176634e-19, 9.1093837015e-31, FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x0000763071f87540, Ptr{Nothing} @0x00007630168ac078, Base.RefValue{Main.var"#3#4"}(Main.var"#3#4"()), Main.var"#3#4"), FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x0000763071f81700, Ptr{Nothing} @0x00007630168ac080, Base.RefValue{typeof(electroncollisionfrequency)}(LongwaveModePropagator.electroncollisionfrequency), typeof(electroncollisionfrequency))), Ground(15, 0.001), 0.0)
The propagate
function returns a tuple of complex electric field, amplitude in dB μV/m, and phase in radians.
E, a, p = propagate(waveguide, tx, rx);
Here are quick plots of the amplitude
plot(ranges/1000, a;
+waveguide = HomogeneousWaveguide(bfield, electrons, ground)
HomogeneousWaveguide{Species}(BField(5.0e-5, 6.123233995736766e-17, 0.0, -1.0), Species(-1.602176634e-19, 9.1093837015e-31, FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x00007fc886987420, Ptr{Nothing} @0x00007fc8256c8068, Base.RefValue{Main.var"#3#4"}(Main.var"#3#4"()), Main.var"#3#4"), FunctionWrappers.FunctionWrapper{Float64, Tuple{Float64}}(Ptr{Nothing} @0x00007fc8869815e0, Ptr{Nothing} @0x00007fc8256c8080, Base.RefValue{typeof(electroncollisionfrequency)}(LongwaveModePropagator.electroncollisionfrequency), typeof(electroncollisionfrequency))), Ground(15, 0.001), 0.0)
The propagate
function returns a tuple of complex electric field, amplitude in dB μV/m, and phase in radians.
E, a, p = propagate(waveguide, tx, rx);
Here are quick plots of the amplitude
plot(ranges/1000, a;
xlabel="range (km)", ylabel="amplitude (dB)",
linewidth=1.5, legend=false)
and phase.
plot(ranges/1000, rad2deg.(p);
xlabel="range (km)", ylabel="phase (deg)",
@@ -79,4 +79,4 @@
wavefieldheights: StepRangeLen{Float64, Base.TwicePrecision{Float64}, Base.TwicePrecision{Float64}, Int64}
wavefieldintegrationparams: IntegrationParams{OrdinaryDiffEq.Tsit5{typeof(OrdinaryDiffEq.trivial_limiter!), typeof(OrdinaryDiffEq.trivial_limiter!), Static.False}}
radiationresistancecorrection: Bool false
-
An instance of LMPParams
can be passed as the params
argument of propagate
or findmodes
.
See the Parameters.jl README for other ways of interacting with LMPParams
.
This page was generated using Literate.jl.
Settings
This document was generated with Documenter.jl version 1.3.0 on Saturday 16 March 2024. Using Julia version 1.10.2.