ATP45.AbstractAgentType
AbstractAgent <: AbstractCategory

Discriminate between the type of agent (Chemical, Biological, Radiological, Nuclear)

source
ATP45.AbstractContainerGroupType
AbstractContainerGroup <: AbstractCategory

Group together the container types (for chemical weapons) which lead to the same result

source
ATP45.AbstractContainerTypeType
AbstractContainerType <: AbstractCategory

Discriminate between the types of containers for chemical weapon (ex: Bomb, Mine, Shell, etc.)

source
ATP45.AbstractReleaseTypeType
AbstractReleaseType <: AbstractCategory

Discriminate between the release type (ex: Air Contaminating Attack, Ground Contaminating Attacks)

source
ATP45.AbstractZoneFeatureType
AbstractZoneFeature{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.

source
ATP45.Atp45ResultType
Atp45Result

Collection 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))
source
ATP45.ReleaseLocationsType
ReleaseLocations{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)))
source
ATP45.WindAzimuthType
WindAzimuth(speed, azimuth) <: AbstractWind

Defines the wind with its speed in m/s and its azimuth in degrees (with North as reference).

source
ATP45.WindVectorType
WindVector(u, v) <: AbstractWind

Defines the wind with its horizontal coordinates. u is W-E and v is S-N.

source
ATP45.ZoneType
Zone{N, T} <: AbstractZone{N, T}

Defines a closed polygon with N vertices for representing a ATP-45 zone. It implements the GeoInterface.Polygon trait.

source
ATP45.ZoneBoundaryType
ZoneBoundary{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)))
source
ATP45.circle_coordinatesMethod
circle_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.

source
ATP45.descendMethod
descend(node::TreeNode, model_params) :: TreeNode

Discriminate 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)
source
ATP45.descendallMethod
descendall(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)
source
ATP45.get_zonesMethod
get_zones(result::Atp45Result, type::String)

Get the zones in the ATP45Result result from reading the type propertie of the zones. See [ATP45.Atp45Result]

source
ATP45.horizontal_walkMethod
horizontal_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)

source
ATP45.map_idsMethod
map_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()
  ⋮                 => ⋮
source
ATP45.propertiesMethod
properties(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"
source
ATP45.run_atpMethod
run_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_ids to 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)
source
ATP45.triangle_coordinatesMethod
triangle_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.

source