Tracktable Namespaces¶
Namespaces¶
Algorithms Namespace¶
-
namespace
algorithms
¶ Functions
-
TRACKTABLE_CORE_EXPORT PropertyValue tracktable::algorithms::interpolate_property(PropertyValueT const & first, PropertyValueT const & second, double t)
Interpolate between two properties.
For timestamps and numeric properties, this function will give you a linear interpolation between the start and end points. For strings, this function will give you the first string at less than 0.5 and the second string at greater than 0.5.
You will probably never need to call this function directly. It will be invoked when you try to interpolate between two points that have property maps attached.
- Return
Linearly-interpolated version of property
- Parameters
[in] first
: Starting value for interpolation[in] second
: Ending value for interpolation[in] t
: Interpolant; 0 means first value, 1 means second value
-
TRACKTABLE_CORE_EXPORT PropertyValue tracktable::algorithms::extrapolate_property(PropertyValueT const & first, PropertyValueT const & second, double t)
-
template<>
structbearing
<PointLonLat>¶ Public Static Functions
-
static double
apply
(PointLonLat const &from, PointLonLat const &to)¶
-
static double
-
template<class
PointT
>
structend_to_end_distance
<Trajectory<PointT>>¶ - #include <Trajectory.h>
Default implementation of end_to_end_distance.
This uses tracktable::distance to compute the distance between the first and last points of the trajectory. We will probably never need to override this implementation.
Public Types
-
typedef Trajectory<PointT>
trajectory_type
¶
Public Static Functions
-
static double
apply
(trajectory_type const &path)¶
-
typedef Trajectory<PointT>
-
template<std::size_t
Dimension
>
structextrapolate
<PointCartesian<Dimension>>¶ Public Static Functions
-
template<typename
point_type
>
static point_typeapply
(point_type const &left, point_type const &right, double t)¶
-
template<typename
-
template<>
structextrapolate
<PropertyMap>¶ Public Static Functions
-
static PropertyMap
apply
(PropertyMap const &first, PropertyMap const &second, double t)¶
-
static PropertyMap
-
template<class
BasePointT
>
structextrapolate
<TrajectoryPoint<BasePointT>>¶ Public Types
-
typedef BasePointT
Superclass
¶
Public Static Functions
-
template<class
trajectory_point_type
>
static trajectory_point_typeapply
(trajectory_point_type const &left, trajectory_point_type const &right, double t)¶
-
typedef BasePointT
-
template<std::size_t
Dimension
>
structinterpolate
<PointCartesian<Dimension>>¶ - #include <PointCartesian.h>
Interpolate between two PointCartesian objects.
Public Static Functions
-
template<typename
point_type
>
static point_typeapply
(point_type const &left, point_type const &right, double t)¶
-
template<typename
-
template<>
structinterpolate
<PropertyMap>¶ - #include <PropertyMap.h>
Interpolate between two property maps.
Interpolation is well-defined for numbers and for timestamps. For strings, we choose the first string for t <= 0.5 and the second string for t > 0.5.
Public Static Functions
-
static PropertyMap
apply
(PropertyMap const &first, PropertyMap const &second, double t)¶
-
static PropertyMap
-
template<>
structinterpolate
<Timestamp>¶ - #include <Timestamp.h>
Interpolate between two timestamps.
Standard linear interpolation. At t <= 0 you get back the first value. At t >= 1 you get the second value. Anywhere in between, you get (1-t) * first + t * second.
This specializes the template in tracktable/Core/detail/algorithm_signatures/Interpolate.h.
-
template<class
BasePointT
>
structinterpolate
<TrajectoryPoint<BasePointT>>¶ - #include <TrajectoryPoint.h>
Interpolate between two points.
Interpolate between two different points in a trajectory. At t <= 0 you’ll get the first point back. At t >= 1 you’ll get the second point. At any value in between you’ll get a combination of the two. Coordinates and timestamp will be interpolated linearly. Numeric properties will be interpolated linearly. String properties will be taken from the first point if t <= 0.5 and the second point otherwise.
Public Types
-
typedef BasePointT
Superclass
¶
Public Static Functions
-
template<class
trajectory_point_type
>
static trajectory_point_typeapply
(trajectory_point_type const &left, trajectory_point_type const &right, double t)¶
-
typedef BasePointT
-
template<class
PointT
, template<class> classTrajectoryT
>
structpoint_to_trajectory_distance
¶ Public Static Functions
-
static double
apply
(PointT const &from, TrajectoryT<PointT> const &to)¶
-
static double
-
template<>
structsigned_turn_angle
<PointLonLat>¶ Public Static Functions
-
static double
apply
(PointLonLat const &a, PointLonLat const &b, PointLonLat const &c)¶
-
static double
-
template<>
structsimplify_linestring
<PointLonLat>¶ Public Static Functions
-
template<typename
linestring_type
>
static voidapply
(linestring_type const &input, linestring_type &result, double tolerance)¶
-
template<typename
-
template<class
BasePointT
>
structspeed_between
<TrajectoryPoint<BasePointT>>¶ - #include <TrajectoryPoint.h>
Speed between two points in native units per second.
Public Types
-
typedef TrajectoryPoint<BasePointT>
point_type
¶
Public Static Functions
-
static double
apply
(point_type const &start, point_type const &finish)¶
-
typedef TrajectoryPoint<BasePointT>
-
template<>
structspherical_coordinate_access
<PointLonLat>¶ Public Types
-
typedef PointLonLat
point_type
¶
Public Static Functions
-
static double
longitude_as_degrees
(point_type const &p)¶
-
static double
latitude_as_degrees
(point_type const &p)¶
-
static double
longitude_as_radians
(point_type const &p)¶
-
static double
latitude_as_radians
(point_type const &p)¶
-
static void
set_longitude_from_degrees
(point_type &p, double value)¶
-
static void
set_latitude_from_degrees
(point_type &p, double value)¶
-
static void
set_longitude_from_radians
(point_type &p, double value)¶
-
static void
set_latitude_from_radians
(point_type &p, double value)¶
-
typedef PointLonLat
-
Conversions Namespace¶
-
namespace
conversions
¶ Functions
-
double
degrees
(double _rad)¶ Convert radians to degrees.
- Return
Angle measured in degrees
- Parameters
[in] _rad
: Angle to convert
-
double
radians
(double _deg)¶ Convert degrees to radians.
- Return
Angle measured in radians
- Parameters
[in] _deg
: Angle to convert
-
double
hours_to_seconds
(double _hrs)¶
-
double
seconds_to_hours
(double _secs)¶
-
double
steradians_to_km2
(double _sr)¶
-
double
km2_to_steradians
(double _km2)¶
-
double
radians_to_km
(double _rad)¶
-
double
km_to_radians
(double _km)¶
-
double
feet_to_meters
(double _feet)¶
-
namespace
constants
¶ Variables
-
constexpr double
PI
= 3.141592653589793238462643383¶
-
constexpr double
EARTH_RADIUS_IN_KM
= 6371¶
-
constexpr double
EARTH_RADIUS_IN_MI
= 3959¶
-
constexpr double
EARTH_RADIUS_IN_NM
= 3440¶
-
constexpr double
DEGREES_PER_RADIAN
= 57.29577951308232087679¶
-
constexpr double
RADIANS_PER_DEGREE
= .01745329251994329576¶
-
constexpr double
SECONDS_PER_HOUR
= 3600.0¶
-
constexpr double
HOURS_PER_SECOND
= 0.0027777777777777¶
-
constexpr double
METERS_PER_FOOT
= 0.3048¶
-
constexpr double
-
double