tracktable.feature module¶
Submodules¶
tracktable.feature.annotations module¶
tracktable.feature.annotations:
Annotate points or trajectories (or the points in a trajectory) with useful derived quantities
-
tracktable.feature.annotations.
climb_rate
(trajectory, max_climb=2000)[source]¶ climb_rate: Annotate points in an AirTrajectory with climb rate
usage: climb_rate(t: AirTrajectory) -> None
This will add a property ‘climb_rate’ to each point in the input trajectory. This is measured in units/sec and is computed as (points[n].altitude - points[n-1].altitude) / (points[n].timestamp - points[n-1].timestamp).
-
tracktable.feature.annotations.
get_airspeed
(trajectory, min_speed=0, max_speed=980)[source]¶ Return a vector of scalars for point-to-point speeds
This is a feature accessor that can be used to color a trajectory. It will map the ‘speed’ property into a range from 0 to 1.
- Parameters
trajectory (tracktable.core.Trajectory) – Trajectory containing speeds
- Kwargs:
min_speed (float): Minimum speed in kilometers per hour. This will be mapped to the bottom of the scalar range and thus the bottom of the color map. Defaults to 0. max_speed (float): Maximum speed in kilometers per hour. This will be mapped to the top of the scalar range and thus the top of the color map. Defaults to 980 (0.8 Mach, a common maximum permitted speed for civilian airliners).
- Returns
A vector of scalars that can be used as input to a colormap.
-
tracktable.feature.annotations.
get_speed
(trajectory)[source]¶ Get the speed for a trajectory without any scaling.
- Parameters
trajectory (tracktable.core.Trajectory) – Trajectory containing speeds
- Returns
Numpy array containing the speed value for each point
-
tracktable.feature.annotations.
get_speed_over_water
(trajectory, min_speed=0, max_speed=60)[source]¶ Return a vector of scalars for point-to-point speeds over water
This is a feature accessor that can be used to color a trajectory. It will map the ‘speed’ property into a range from 0 to 1.
- Parameters
trajectory (tracktable.core.Trajectory) – Trajectory containing speeds
- Kwargs:
min_speed (float): Minimum speed in kilometers per hour. This will be mapped to the bottom of the scalar range and thus the bottom of the color map. Defaults to 0. max_speed (float): Maximum speed in kilometers per hour. This will be mapped to the top of the scalar range and thus the top of the color map. Defaults to 60 km/h (32 knots, very fast for big ships but slower than the maximum speed of high-speed civilian ferries).
- Returns
A vector of scalars that can be used as input to a colormap.
-
tracktable.feature.annotations.
progress
(trajectory)[source]¶ progress: Annotate points in an AirTrajectory with flight progress
usage: progress(t: AirTrajectory) -> None
This will add a property “progress” to each point in the input trajectory. This property will be 0 at the first point, 1 at the last point, and spaced evenly in between.
Module contents¶
TrailMix Trajectory Library - Features module
All the code for dealing with features (derived quantities) on points and trajectories lives in this module.