ATP45.AbstractModel
ATP45.AbstractReleaseType
ATP45.AbstractWeapon
ATP45.AbstractZoneFeature
ATP45.Atp45Result
ATP45.ReleaseLocations
ATP45.WindAzimuth
ATP45.WindVector
ATP45.Zone
ATP45.ZoneBoundary
ATP45.circle_coordinates
ATP45.descend
ATP45.descendall
ATP45.get_zones
ATP45.horizontal_walk
ATP45.map_ids
ATP45.map_ids
ATP45.properties
ATP45.run_atp
ATP45.run_atp
ATP45.triangle_coordinates
ATP45.AbstractModel
— TypeAbstractModel
Determine the type of APT-45 that will be run (simplified or detailed).
ATP45.AbstractReleaseType
— TypeAbstractReleaseType <: AbstractCategory
Discriminate between the release type (ex: Air Contaminating Attack, Ground Contaminating Attacks)
ATP45.AbstractWeapon
— TypeAbstractWeapon <: AbstractCategory
Discriminate between the type of weapon (Chemical, Biological, Radiological, Nuclear)
ATP45.AbstractZoneFeature
— TypeAbstractZoneFeature{N, T}
An ATP-45 Zone{N, T}
with some properties related to it (typically the type of zone, e.g. release or hazard). It implements the GeoInterface.Feature
trait.
ATP45.Zone
— TypeZone{N, T} <: AbstractZone{N, T}
Defines a closed polygon with N
vertices for representing a ATP-45 zone. It implements the GeoInterface.Polygon
trait.
ATP45.ZoneBoundary
— TypeZoneBoundary{N, T}
Represents the border for a ATP45 zone. N
is the number of vertices defining the zone. It implements the GeoInterface.LinearRing
trait.
Examples
# We create a triangle like border (3 vertices):
julia> coords = [
[6., 49.],
[5., 50.],
[4., 49.],
]
julia> ZoneBoundary(coords)
ZoneBoundary{3, Float64}(((6.0, 49.0), (5.0, 50.0), (4.0, 49.0)))
ATP45.circle_coordinates
— Methodcircle_coordinates(lon::Number, lat::Number, radius::Number, res)
Calculate the coordinates of a circle like zone given the center (lon
, lat
) and the radius
in meters. res
is the number of points on the circle.
ATP45.descend
— Methoddescend(node::TreeNode, model_params) :: TreeNode
Discriminate between the children of node
according to the parameters in model_params
.
Examples
julia> ex = Simplified => [
ChemicalWeapon => [
LowerThan10 => (:_circle_circle, 2_000, 10_000),
HigherThan10 => (:_circle_triangle, 2_000, 10_000),
],
BiologicalWeapon => [
LowerThan10 => (:_circle_circle, 1_000, 10_000),
HigherThan10 => (:_circle_triangle, 1_000, 10_000),
],
]
julia> model_params = (BiologicalWeapon(),)
julia> descend(TreeNode(ex), model_params)
BiologicalWeapon()
├─ LowerThan10()
│ └─ (:_circle_circle, 1000, 10000)
└─ HigherThan10()
└─ (:_circle_triangle, 1000, 10000)
ATP45.descendall
— Methoddescendall(node::TreeNode, model_params) :: TreeNode{<:Tuple}
Browse the tree starting at node
, choosing the path following what is specified in model_params
.
Examples
julia> ex = Simplified => [
ChemicalWeapon => [
LowerThan10 => (:_circle_circle, 2_000, 10_000),
HigherThan10 => (:_circle_triangle, 2_000, 10_000),
],
BiologicalWeapon => [
LowerThan10 => (:_circle_circle, 1_000, 10_000),
HigherThan10 => (:_circle_triangle, 1_000, 10_000),
],
]
julia> model_params = (BiologicalWeapon(), WindAzimuth(45, 2))
julia> descendall(TreeNode(ex), model_params)
(:_circle_triangle, 1000, 10000)
ATP45.get_zones
— Methodget_zones(result::Atp45Result, type::String)
Get the zones in the ATP45Result result
from reading the type propertie of the zones. See [ATP45.Atp45Result
]
ATP45.horizontal_walk
— Methodhorizontal_walk(lon::AbstractFloat, lat::AbstractFloat, distance::AbstractFloat, azimuth::AbstractFloat)
Compute the end location given a starting location lon
and lat
in degrees, a distance distance
in meters and an azimuth azimuth
in degrees (the reference direction is North)
ATP45.map_ids
— Methodmap_ids()
Dictionnary mapping the existing id's to the ATP45.jl
categories.
Examples:
julia> ATP45.map_ids()
Dict{String, Any} with 29 entries:
"MPL" => MissilesPayload()
"MSL" => Missile()
"chem" => ChemicalWeapon()
"typeC" => ReleaseTypeC()
"MNE" => Mine()
⋮ => ⋮
ATP45.properties
— Methodproperties(iid::String)
properties(obj)
Give the properties defined on the ATP45 object, given the object itsels obj
or its id iid
.
Examples
julia> ATP45.properties(ChemicalWeapon())
4-element Vector{Pair{Symbol, String}}:
:id => "chem"
:longname => "Chemical"
:paramtype => "category"
:internalname => "ChemicalWeapon"
ATP45.run_atp
— Methodrun_atp(args...)
High level function to run the ATP-45 procedure. The arguments args
can be pretty flexible. They can be expressed as :
- categories and input types from
ATP45.jl
locations = ReleaseLocationss([4., 50.])
wind = WindAzimuth(2.5, 45.)
run_atp(Simplified(), ChemicalWeapon(), locations, wind)
- string corresponding to the categories' id's. See
map_ids
to know the id's of the existing categories:
run_atp("simplified", "chem", locations, wind)
- a combination of both:
run_atp(Simplified(), "chem", locations, wind)
ATP45.triangle_coordinates
— Methodtriangle_coordinates(lon, lat, azimuth, dhd, back_distance)
Calculate the coordinates of the triangle like zone given the release location, the wind direction azimuth
, the downwind hazard distance dhd
in meters.