tracktable.feature.annotations module¶
Module contents¶
tracktable.feature.annotations:
Annotate points or trajectories (or the points in a trajectory) with useful derived quantities
- tracktable.feature.annotations.available_annotations()[source]¶
Supply all available annotations
- Returns
All of the possible annotation types
- tracktable.feature.annotations.climb_rate(trajectory, max_climb=2000)[source]¶
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).
- Parameters
trajectory (Trajectory) – Trajectory to be annotated with climb rate
- Keyword Arguments
max_climb (int) – max climb rate (Default: 2000)
- Returns
Trajectory annotated with climb rate
- tracktable.feature.annotations.compute_speed_from_positions(trajectory)[source]¶
Annotate points in an Trajectory with point-to-point speeds
This will add a property “speed” 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.
- Parameters
trajectory (Trajectory) – Trajectory to be annotated with speeds
- Returns
Trajectory annotated with point-to-point speeds
- 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 (Trajectory) – Trajectory containing speeds
- Keyword Arguments
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. (Default: 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). (Default: 980)
- Returns
A vector of scalars that can be used as input to a colormap.
- tracktable.feature.annotations.get_climb_rate(trajectory, max_velocity=2000)[source]¶
Return a vector of scalars for point-to-point climb rate
- Parameters
trajectory (Trajectory) – Trajectory to be annotated with climb rate
- Keyword Arguments
max_velocity (int) – max possible velocity to use when calculating climb rate (Default: 2000)
- Returns
A vector of scalars with point-to-point climb rates
- tracktable.feature.annotations.get_progress(trajectory)[source]¶
Return a vector of scalars for point-to-point flight progress
- Parameters
trajectory (Trajectory) – Trajectory containing flight progress
- Returns
A vector of scalars with point-to-point flight progress
- tracktable.feature.annotations.get_speed(trajectory)[source]¶
Get the speed for a trajectory without any scaling.
- Parameters
trajectory (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 (Trajectory) – Trajectory containing speeds
- Keyword Arguments
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. (Default: 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). (Default: 60)
- Returns
A vector of scalars that can be used as input to a colormap.
- tracktable.feature.annotations.progress(trajectory)[source]¶
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.
- Parameters
trajectory (Trajectory) – Trajectory to be annotated with flight progress
- Returns
Trajectory annotated with flight progress
- tracktable.feature.annotations.register_annotation(feature_name, compute_feature, retrieve_feature)[source]¶