Skip to main content

Module vector

Module vector 

Source
Expand description

The vector module contains functions for performing great circle calculations using Vector3ds to represent points and great circle poles on a unit sphere.

A Vector3d is a nalgebra Vector3<f64>.

Modules§

intersection
The intersection module contains functions for calculating great-circle intersections using vectors.

Constants§

MIN_SIN_ANGLE
The minimum value of the sine of an angle to normalise. Approximately 7.504e-9 seconds
MIN_SQ_DISTANCE
The minimum value of the square of distance.
MIN_SQ_NORM
The minimum length of a vector to normalize.

Functions§

along_track_distance
The Great Circle distance of a point along the arc relative to a, (+ve) ahead of a, (-ve) behind a.
are_orthogonal
Determine whether two Vector3ds are orthogonal (perpendicular).
calculate_atd_and_xtd
Calculate Great Circle along and across track distances.
calculate_azimuth
Calculate the azimuth at a point on the Great Circle defined by pole.
calculate_direction
Calculate the direction vector along a Great Circle from an initial position and an azimuth.
calculate_great_circle_atd
Calculate the relative distance of two points on a Great Circle arc.
calculate_pole
Calculate the right hand pole vector of a Great Circle from an initial position and an azimuth.
cross_track_distance
The across track distance of a point relative to a Great Circle pole.
delta_longitude
Calculate the relative longitude of point a from point b.
direction
Calculate the direction vector of a Great Circle arc.
distance
Calculate the shortest (Euclidean) distance between two Points.
is_right_of
Determine whether point is right of a Great Circle pole.
is_south_of
Determine whether point a is South of point b.
is_unit
Determine whether a Vector3d is a unit vector.
is_west_of
Determine whether point a is West of point b.
latitude
Calculate the latitude of a point.
longitude
Calculate the longitude of a point.
normalise
Normalize a vector to lie on the surface of the unit sphere.
normalise_centroid
Normalise a centroid on coincident great circles.
position
Calculate the position of a point along a Great Circle arc.
rotate
Calculate the direction vector of a Great Circle rotated by angle.
rotate_position
Calculate the position of a point rotated by angle at radius.
sin_atd
The sine of the along track distance of a point along a Great Circle arc.
sq_along_track_distance
Calculate the square of the Euclidean along track distance of a point from the start of an Arc.
sq_cross_track_distance
The square of the Euclidean cross track distance of a point relative to a Great Circle pole.
sq_distance
Calculate the square of the Euclidean distance between two points.
to_point
Convert a latitude and longitude to a point on the unit sphere.