项目作者: LIM-AeroCloud

项目描述 :
Julia package for finding intersections between two sets of trajectories.
高级语言: Julia
项目地址: git://github.com/LIM-AeroCloud/TrackMatcher.jl.git
创建时间: 2019-09-24T13:11:11Z
项目社区:https://github.com/LIM-AeroCloud/TrackMatcher.jl

开源协议:GNU General Public License v3.0

下载


TrackMatcher

Overview

TrackMatcher is a Julia package to find intersections between two sets of trajectories.
The current version can match aircraft- or cloud-track (primary) data with CALIPSO satellite
(secondary) ground tracks and store relevant data in the vicinity of the intersection.

DOI

Installation

TrackMatcher is an unregistered Julia package, but can be installed with the
package manager. TrackMatcher uses the PCHIP.jl package developed within the
TrackMatcher framework. It is a pure Julia implementation of the Peacewise Cubic
Hermite Interpolating Polynomial. PCHIP has to be installed prior to TrackMatcher
as Julia currently only acknowledges registered dependencies.

  1. julia> ]
  2. pkg> add https://github.com/LIM-AeroCloud/PCHIP.jl.git
  3. pkg> add https://github.com/LIM-AeroCloud/TrackMatcher.jl.git

Usage

In essence, 3 TrackMatcher structs are needed to load essential primary and secondary data,
and find intersections in the stored track data. A full overview is given in the
WIKI and this README is
only meant as a quick reminder of the most important functions. Additionally, Julia’s
help function can be used by pressing ? and the respective function name or
type constructor.

Loading primary data

FlightData or FlightTrack of individual flights are loaded into a FlightSet
with vectors of FlightData for different database types, currently holding

  1. VOLPE AEDT inventory (field/keyword volpe)
  2. FlightAware archived data (field/keyword flightaware)
  3. flightaware.com online data (field/keyword webdata)

A convenience constructor for FlightSet exists, where data can be loaded by passing
a String or Vector{String} with directories of the input data files for each
source type to the individual fields of FlightSet using the keyword arguments listed
above. Those folders are searched recursively for the respective data files. More than
one folder path can be listed for all the database types in a Vector{String}.

  1. FlightSet{T}(;
  2. volpe::Union{String,Vector{String}}=String[],
  3. flightaware::Union{String,Vector{String}}=String[],
  4. webdata::Union{String,Vector{String}}=String[],
  5. altmin::Real=5000,
  6. odelim::Union{Nothing,Char,String}=nothing,
  7. savedir::Union{String,Bool}="abs",
  8. remarks=nothing
  9. ) where T

A similar convenience constructor exists for CloudTracks. As only one database type
exists, only the directories are needed as vararg rather than kwarg:

  1. CloudSet{T}(
  2. folders::String...;
  3. savedir::Union{String,Bool}="abs",
  4. structname::String="cloud",
  5. remarks=nothing
  6. ) where T

For details on the kwargs, see the WIKI
or use the help function for the individual constructors.

Loading CALIOP data from the CALIPSO satellite

Initially, only CALIPSO positions (lat/lon) and overpass times are stored as SatData
in a SatSet for performance reasons. Each granule is stored as SatData or SatTrack,
which are combined in the granules field of SatSet. Only one of the types
cloud profile (CPro) or cloud layer (CLay) data can be used to construct a SatSet.

In the vicinity of intersections, additional observations can be stored as CPro or
CLay structs.
This feature is only available, if the file/folder structure does not change between
loading the data and calculating intersections. It can be controlled with the
savedir keyword argument.

The SatSet metadata includes information about the granules, the type of the
satellite data, the date range of the data, the time the database was created,
the loadtime, and any remarks as additional data or comments.

A SatSet can be constructed by giving any number of folder strings and any remarks
using the keyword remarks. The folders are scanned recursively for any hdf file
and the type of the satellite data is determined by keywords CLay or CPro in
the folder/file names. If both types exist in the folders, the data type is determined
by the majority in the first 50 file names. Alternatively, the sat data type can
be forced with the keyword type set to a Symbol :CPro or :CLay.

  1. SatSet{T}(
  2. folders::String...;
  3. type::Symbol=:undef,
  4. savedir::Union{String,Bool}="abs",
  5. remarks=nothing
  6. ) where T

:information_source: NOTE

SatSet is designed to use CALIPSO data provided by the AERIS/ICARE Data and Services Centre.
For the best performance, you should use the same file/folder format as used by ICARE.
In particular, Cloud layer files must include the keyword CLay in the file name

and cloud profile data files the keyword CPro.

Finding intersections in the trajectories of the flight and satellite data

Intersections and corresponding accuracies and observation data in the vicinity
of the intersection are stored in the XData struct. Alternatively, an Intersection
constructor can be used for the construction of XData.

A convenience constructor exists for automatic calculation of the intersections
from the FlightSet and SatSet with parameters controlling these calculations.
Additionally, it can be specified by the optional argument savesecondsattype
whether both satellite data types CLay and CPro should be stored in SatSet
or only the specified main type.
For this feature to work, folder and file names of Clay/CPro data must be identical
except for the keywords CLay/CPro swapped.

Find intersections by instatiating the Intersection struct with:

  1. Intersection{T}(
  2. tracks::PrimarySet,
  3. sat::SatSet,
  4. savesecondsattype::Bool=false;
  5. maxtimediff::Int=30,
  6. primspan::Int=0,
  7. secspan::Int=15,
  8. lidarrange::Tuple{Real,Real}=(15_000,-Inf),
  9. stepwidth::Real=0.01,
  10. Xradius::Real=20_000,
  11. expdist::Real=Inf,
  12. atol::Real=0.1,
  13. savedir::Union{String,Bool}="abs",
  14. remarks=nothing
  15. ) where T

kwargs

  • maxtimediff::Int=30: maximum delay at intersection between aircraft/satellite overpass
  • primspan::Int=0: number of primary (flight or cloud) data points saved before and after the closest measurement to the intersection
  • secspan::Int=15: number of secondary (satellite) data points saved before and after the closest measurement to the intersection
  • lidarrange::Tuple{Real,Real}=(15_000,-Inf): top/bottom bounds of the lidar column data, between which
    data is stored; use (Inf, -Inf) to store the whole column
  • stepwidth::Float64=1000: stepwidth in degrees (at the equator) used for the
    interpolation of flight and satellite tracks
  • Xradius::Real=20_000: Radius in meters, in which multiple intersection finds are
    assumed to correspond to the same intersection and only the intersection with the
    minimum delay between flight and sat overpass is saved
  • expdist::Real=Inf: maximum threshold for the distance of a found intersection to the nearest measured track point
  • atol::Real=0.1: tolerance to increase the bounding box around primary tracks by atol degrees
    increasing the search radius in secondary tracks preventing the omission of intersections due to
    rounding errors
  • savedir::Union{String,Bool}="abs": options to save absolute ("abs") or relative
    ("rel") folder paths in the metadata of FlightData or SatSet. When savedir
    is set to an empty string ("") or false, folder strings are save as given in
    the constructor. When set to an empty string or false in the Intersection constructor,
    no observations are saved in Intersection.
  • remarks=nothing: any data or comments that can be attached to the metadata of Intersection