ATP45.AbstractAgentATP45.AbstractAgentNameATP45.AbstractChemAgentATP45.AbstractContainerGroupATP45.AbstractContainerTypeATP45.AbstractModelATP45.AbstractReleaseSizeATP45.AbstractReleaseTypeATP45.AbstractWindCategoryATP45.AbstractZoneFeatureATP45.Atp45ResultATP45.ReleaseLocationsATP45.WindAzimuthATP45.WindVectorATP45.ZoneATP45.ZoneBoundaryATP45.circle_coordinatesATP45.descendATP45.descendallATP45.get_zonesATP45.horizontal_walkATP45.map_idsATP45.propertiesATP45.run_atpATP45.triangle_coordinates
ATP45.AbstractAgent — TypeAbstractAgent <: AbstractCategoryDiscriminate between the type of agent (Chemical, Biological, Radiological, Nuclear)
ATP45.AbstractAgentName — TypeAbstractAgentName <: AbstractCategorySelect the substance released for chemical release type D
ATP45.AbstractChemAgent — TypeAbstractChemAgent <: AbstractCategoryDiscriminate between the type of chemical agent (Weapon or Substance)
ATP45.AbstractContainerGroup — TypeAbstractContainerGroup <: AbstractCategoryGroup together the container types (for chemical weapons) which lead to the same result
ATP45.AbstractContainerType — TypeAbstractContainerType <: AbstractCategoryDiscriminate between the types of containers for chemical weapon (ex: Bomb, Mine, Shell, etc.)
ATP45.AbstractModel — TypeAbstractModelDetermine the type of APT-45 that will be run (simplified or detailed).
ATP45.AbstractReleaseSize — TypeAbstractReleaseSize <: AbstractCategoryDiscriminate between the release size (Small, Medium, Large, Extra Large)
ATP45.AbstractReleaseType — TypeAbstractReleaseType <: AbstractCategoryDiscriminate between the release type (ex: Air Contaminating Attack, Ground Contaminating Attacks)
ATP45.AbstractWindCategory — TypeAbstractWindCategory <: AbstractCategoryDiscriminate between the wind speed under/equal, and over 10 km/h
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.Atp45Result — TypeAtp45ResultCollection of zones representing the result of an ATP-45 procedure result. Also contains relevant information about the input conditions. It implements the GeoInterface.FeatureCollection trait. The properties can be accessed with ATP45.properties.
Examples
This is the output type of run_atp:
result = run_atp("chem", "chem_weapon","simplified", WindAzimuth(2., 90.), ReleaseLocations([4., 50.]))
# output
Atp45Result with 2 zones and properties:
Dict{Symbol, Any} with 3 entries:
:locations => ReleaseLocations{1, Float64}(((4.0, 50.0),))
:categories => (ChemicalAgent(), ChemicalWeapon(), Simplified())
:weather => (WindAzimuth(2.0, 90.0),)Specific zones can be access with the get_zones function:
get_zones(result, "release")
# output
1-element Vector{ATP45.AbstractZoneFeature}:
ATP45.ReleaseZone{100, Float64}(ATP45.CircleLikeZone{100, Float64}(ReleaseLocations{1, Float64}(((4.0, 50.0),)), 2000.0))ATP45.ReleaseLocations — TypeReleaseLocations{N, T}Represents the N locations of the release(s).
Examples
julia> coords = [
[6., 49.],
[6., 51.],
]
julia> ReleaseLocations(coords)
ReleaseLocations{2, Float64}(((6.0, 49.0), (6.0, 51.0)))ATP45.WindAzimuth — TypeWindAzimuth(speed, azimuth) <: AbstractWindDefines the wind with its speed in m/s and its azimuth in degrees (with North as reference).
ATP45.WindVector — TypeWindVector(u, v) <: AbstractWindDefines the wind with its horizontal coordinates. u is W-E and v is S-N.
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) :: TreeNodeDiscriminate between the children of node according to the parameters in model_params.
Examples
julia> ex = Simplified => [
ChemicalAgent => [
LowerThan10 => (:_circle_circle, 2_000, 10_000),
HigherThan10 => (:_circle_triangle, 2_000, 10_000),
],
BiologicalAgent => [
LowerThan10 => (:_circle_circle, 1_000, 10_000),
HigherThan10 => (:_circle_triangle, 1_000, 10_000),
],
]
julia> model_params = (BiologicalAgent(),)
julia> descend(TreeNode(ex), model_params)
BiologicalAgent()
├─ 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 => [
ChemicalAgent => [
LowerThan10 => (:_circle_circle, 2_000, 10_000),
HigherThan10 => (:_circle_triangle, 2_000, 10_000),
],
BiologicalAgent => [
LowerThan10 => (:_circle_circle, 1_000, 10_000),
HigherThan10 => (:_circle_triangle, 1_000, 10_000),
],
]
julia> model_params = (BiologicalAgent(), 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" => Chemical()
"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_weapon"
:longname => "Chemical Weapon"
: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 = ReleaseLocations([4., 50.])
wind = WindAzimuth(2.5, 45.)
run_atp(Simplified(), ChemicalAgent(), ChemicalWeapon(), locations, wind)- string corresponding to the categories' id's. See
map_idsto know the id's of the existing categories:
run_atp("simplified", "chem", "chem_weapon", locations, wind)- a combination of both:
run_atp(Simplified(), "chem", "chem_weapon", 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.