ICAROUS
|
#include <GreatCircle.h>
Static Public Member Functions | |
static double | angle_from_distance (double distance, double h) |
static double | distance_from_angle (double angle, double h) |
static double | angular_distance (double lat1, double lon1, double lat2, double lon2) |
static double | angular_distance (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | distance (double lat1, double lon1, double lat2, double lon2) |
static double | distance (const LatLonAlt &p1, const LatLonAlt &p2) |
static bool | almost_equals (double lat1, double lon1, double lat2, double lon2) |
static bool | almost_equals (double lat1, double lon1, double lat2, double lon2, double epsilon) |
static bool | almostEquals (const LatLonAlt &b, const LatLonAlt &v) |
static bool | almostEquals (const LatLonAlt &b, const LatLonAlt &a, double horizEps, double vertEps) |
static bool | almostEquals2D (const LatLonAlt &b, const LatLonAlt &v, double horizEps) |
static double | initial_course (double lat1, double lon1, double lat2, double lon2) |
static double | initial_course (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | final_course (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | representative_course (double lat1, double lon1, double lat2, double lon2) |
static double | representative_course (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | max_latitude_gc (double lat1, double lon1, double lat2, double lon2) |
static double | max_latitude_gc (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | min_latitude_gc (double lat1, double lon1, double lat2, double lon2) |
static double | min_latitude_gc (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | lonCross (double lat1, double lon1, double lat2, double lon2, double lat3) |
static double | max_latitude (double lat1, double lon1, double lat2, double lon2) |
static double | max_latitude (const LatLonAlt &p1, const LatLonAlt &p2) |
static double | min_latitude (double lat1, double lon1, double lat2, double lon2) |
static double | min_latitude (const LatLonAlt &p1, const LatLonAlt &p2) |
static LatLonAlt | interpolate (const LatLonAlt &p1, const LatLonAlt &p2, double f) |
static LatLonAlt | interpolateEst (const LatLonAlt &p1, const LatLonAlt &p2, double f) |
static LatLonAlt | linear_gcgs (const LatLonAlt &p1, const LatLonAlt &p2, const Velocity &v, double t) |
static LatLonAlt | linear_gc (LatLonAlt p1, LatLonAlt p2, double d) |
static LatLonAlt | linear_rhumb (const LatLonAlt &s, const Velocity &v, double t) |
static LatLonAlt | linear_rhumb (const LatLonAlt &s, double track, double dist) |
static Triple< double, double, double > | side_side_angle (double b, double a, double A, bool firstSolution) |
static Triple< double, double, double > | side_angle_angle (double a, double A, double B, bool firstSolution) |
static Triple< double, double, double > | side_angle_side (double a, double C, double b) |
static Triple< double, double, double > | angle_side_angle (double A, double c, double B) |
static LatLonAlt | intersectionSegment (double T, const LatLonAlt &so, const Velocity &vo, const LatLonAlt &si, const LatLonAlt &si2) |
static LatLonAlt | intersectSegments (const LatLonAlt &so, const LatLonAlt &so2, const LatLonAlt &si, const LatLonAlt &si2) |
static LatLonAlt | linear_initial (const LatLonAlt &s, const Velocity &v, double t) |
static LatLonAlt | linear_initial (const LatLonAlt &s, double track, double dist) |
static double | cross_track_distance (const LatLonAlt &p1, const LatLonAlt &p2, const LatLonAlt &offCircle) |
static bool | collinear (const LatLonAlt &p1, const LatLonAlt &p2, const LatLonAlt &p3) |
static LatLonAlt | closest_point_circle (const LatLonAlt &p1, const LatLonAlt &p2, const LatLonAlt &x) |
static LatLonAlt | closest_point_segment (const LatLonAlt &p1, const LatLonAlt &p2, const LatLonAlt &x) |
static LatLonAlt | intersection (const LatLonAlt &a1, const LatLonAlt &a2, const LatLonAlt &b1, const LatLonAlt &b2) |
static std::pair< LatLonAlt, double > | intersectionExtrapAlt (const LatLonAlt &so, const LatLonAlt &so2, double dto, const LatLonAlt &si, const LatLonAlt &si2) |
static std::pair< LatLonAlt, double > | intersectionAvgAlt (const LatLonAlt &so, const LatLonAlt &so2, double dto, const LatLonAlt &si, const LatLonAlt &si2) |
static std::pair< LatLonAlt, double > | intersection (const LatLonAlt &so, const Velocity &vo, const LatLonAlt &si, const Velocity &vi) |
static double | angleBetween (const LatLonAlt &a1, const LatLonAlt &a2, const LatLonAlt &b1, const LatLonAlt &b2) |
static double | angle_betweenOLD (const LatLonAlt &a, const LatLonAlt &b, const LatLonAlt &c) |
static double | angle_between (const LatLonAlt &a, const LatLonAlt &b, const LatLonAlt &c) |
static double | angle_between (const LatLonAlt &a, const LatLonAlt &b, const LatLonAlt &c, int dir) |
static bool | behind (const LatLonAlt &x, const LatLonAlt &ll, const Velocity &v) |
static int | passingDirection (const LatLonAlt &so, const Velocity &vo, const LatLonAlt &si, const Velocity &vi) |
static int | dirForBehind (const LatLonAlt &so, const Velocity &vo, const LatLonAlt &si, const Velocity &vi) |
static Velocity | velocity_average (const LatLonAlt &p1, const LatLonAlt &p2, double t) |
static Velocity | velocity_average_speed (const LatLonAlt &s1, const LatLonAlt &s2, double speed) |
static Velocity | velocity_initial (const LatLonAlt &p1, const LatLonAlt &p2, double t) |
static Velocity | velocity_final (const LatLonAlt &p1, const LatLonAlt &p2, double t) |
static Vect3 | spherical2xyz (double lat, double lon) |
static Vect3 | spherical2xyz (const LatLonAlt &lla) |
static LatLonAlt | xyz2spherical (const Vect3 &v) |
static double | chord_distance (double lat1, double lon1, double lat2, double lon2) |
static double | chord_distance (double surface_dist) |
static double | surface_distance (double chord_distance) |
static double | to_chordal_radius (double surface_radius) |
static double | to_surface_radius (double chord_radius) |
static LatLonAlt | small_circle_rotation (const LatLonAlt &so, const LatLonAlt ¢er, double angle) |
static double | small_circle_arc_length (double radius, double arcAngle) |
static double | small_circle_arc_angle (double radius, double arcLength) |
Static Public Attributes | |
static const double | minDt = 1E-5 |
static const double | spherical_earth_radius = 6366707.0194937070000000000 |
Static Private Member Functions | |
static double | max_latitude_gc_course (double lat1, double trk) |
static double | min_latitude_gc_course (double lat1, double trk) |
static bool | gauss_check (double a, double b, double c, double A, double B, double C) |
static LatLonAlt | closest_point_circle (const LatLonAlt &p1, const LatLonAlt &p2, const LatLonAlt &x, double a, double b, double c, double A, double B, double C) |
static double | angle_from_distance (double distance) |
This class contains common formulas used for modeling a spherical Earth, in particular, Great Circle calculations. Many of the formulas are based on the Aviation Formulary (v1.44) by Ed Williams.
Notes:
GreatCircle.spherical_earth_radius
.
|
static |
Determines if two points are close to each other, see Constants.get_horizontal_accuracy().
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Determines if two points are close to each other, where 'close' is defined by the distance value given in meters.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
epsilon | maximum difference in meters |
|
static |
Return the turn angle between great circles (this will return a value between 0 and PI) (uses coordinate transformation)
a | point on gc1 |
b | intersection of gc1 and gc2 |
c | point on gc2 |
|
static |
Return the turn angle between two great circles, measured in the indicated direction. This can return a value larger than PI.
a | first point |
b | turn point |
c | last point |
dir | +1 is right (clockwise), -1 is left (counterclockwise) |
|
static |
Return angle between great circles (old version, uses spherical trig)
a | point on gc1 |
b | intersection of gc1 and gc2 |
c | point on gc2 |
|
staticprivate |
Convert the distance (in internal length units) across the surface of the (spherical) Earth into an angle.
|
static |
Convert the distance (in internal length units) across a sphere at a height of h (in internal length units) above surface of the (spherical) Earth into an angle.
distance | distance [m] |
h | height above surface of spherical Earth |
|
static |
This implements the supplemental (polar triangle) spherical cosine rule to complete a triangle on the unit sphere
A | angle A |
c | side between A and B (angular distance |
B | angle B |
|
static |
Given two great circles defined by a1, a2 and b1, b2 return the angle between them at the intersection point.
This is the same as the dihedral angle, or angle between the two GC planes. This may not be the same angle as the one projected into the Euclidean (unless the projection point is the intersection point). and will generally not be the same as the (non-projected) track angle difference between them (though that can be very close). This will always return a value between 0 and PI.
Note: When two great circles intersect, they form supplementary angles, that is, two angles that sum to 180. This method can return either the smaller (less than 90) or the larger (greater than 90). It is a little complicated to determine which one will be returned. Imagine a 'right-handed' vector going from a1 to a2 and another one going from b1 to b2. If these two vectors point mostly in the same direction, then the smaller supplementary angle will be returned. If they point in mostly opposite directions, then the larger supplementary angle will be returned. As an example. Imagine three points, two points (a and c) on the equator, less than 90 degrees apart and point b at the north pole. angleBetween(a,b,c,b) will return the smaller supplementary angle, and angleBetween(a,b,b,c) will return the larger supplementary angle.
a1 | one point on the first great circle |
a2 | second point on the first great circle |
b1 | one point on the second great circle |
b2 | second point on the second great circle |
Compute the great circle distance in radians between the two points. The calculation applies to any sphere, not just a spherical Earth. The current implementation uses the haversine formula.
p1 | one point |
p2 | another point |
|
static |
Compute the great circle distance in radians between the two points. The calculation applies to any sphere, not just a spherical Earth. The current implementation uses the haversine formula.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Return true if x is "behind" ll, considering its current direction of travel, v. "Behind" here refers to the hemisphere aft of ll. That is, x is within the region behind the perpendicular line to v through ll.
ll | aircraft position |
v | aircraft velocity |
x | intruder position |
Return true if x is "behind" ll, considering its current direction of travel, v. "Behind" here refers to the hemisphere aft of ll. That is, x is within the region behind the perpendicular line to v through ll.
ll | aircraft position |
v | aircraft velocity |
x | intruder positino |
|
static |
Return the straight-line chord distance (through a spherical earth) from two points on the surface of the earth.
lat1 | latitude of first point |
lon1 | longitude of first point |
lat2 | latitude of second point |
lon2 | longitude of second point |
|
static |
Return the chord distance (through the earth) corresponding to a given surface distance (at the nominal earth radius). This is the distance of a direct line between two surface points.
surface_dist | distance across surface |
|
static |
This returns the point on the great circle running through p1 and p2 that is closest to point x. The altitude of the output is the same as x.
If p1 and p2 are the same point, then every great circle runs through them, thus x is on one of these great circles. In this case, x will be returned.
p1 | the starting point of the great circle |
p2 | another point on the great circle |
x | point to determine closest segment point to. |
This returns the point on the great circle running through p1 and p2 that is closest to point x. The altitude of the output is the same as x.
If p1 and p2 are the same point, then every great circle runs through them, thus x is on one of these great circles. In this case, x will be returned. This assumes any 2 points will be within 90 degrees of each other (angular distance).
p1 | the starting point of the great circle |
p2 | another point on the great circle |
x | point to determine closest segment point to. |
|
static |
This returns the point on the great circle segment running through p1 and p2 that is closest to point x. This will return either p1 or p2 if the actual closest point is outside the segment.
p1 | the starting point of the great circle |
p2 | another point on the great circle |
x | point to determine closest segment point to. |
|
static |
Determines if the three points are on the same great circle.
p1 | One point |
p2 | Second point |
p3 | Third point |
|
static |
This function forms a great circle from p1 to p2, then computes the shortest distance of another point (offCircle) to the great circle. This is the cross track distance. A positive value means offCircle is to the right of the path from p1 to p2. A negative value means offCircle is to the left of the path from p1 to p2.
p1 | the starting point of the great circle |
p2 | another point on the great circle |
offCircle | the point to measure the cross track distance |
Compute the great circle distance between the two given points. The calculation assumes the Earth is a sphere. This ignores the altitudes.
p1 | one point |
p2 | another point |
|
static |
Compute the great circle distance between the two given points. The calculation assumes the Earth is a sphere
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Convert the given angle into a distance across a (spherical) Earth at height above the surface of h.
angle | angular distance [radian] |
h | height above surface of spherical Earth |
Course of the great circle coming in from point #1 to point #2. This value is NOT a compass angle (in the 0 to 2 Pi range), but is in radians from clockwise from true north.
Usage Note: If point #1 and #2 are close to each other, then the course may become unstable. In the extreme case when point #1 equals point #2, then the course is undefined.
p1 | point #1 |
p2 | point #2 |
The initial true course (course relative to true north) at point #1 on the great circle route from point #1 to point #2. The value is in internal units of angles (radians), and is a compass angle [0..2*Pi]: clockwise from true north.
Usage Note: If point #1 and #2 are close to each other, then the course may become unstable. In the extreme case when point #1 equals point #2, then the course is undefined.
p1 | a point |
p2 | another point |
|
static |
The initial true course (course relative to true north) at lat/long #1 on the great circle route from lat/long #1 to lat/long #2. The value is in internal units of angles (radians), and is a compass angle [0..2*Pi]: clockwise from true north.
Usage Note: If lat/long #1 and #2 are close to each other, then the initial course may become unstable. In the extreme case when lat/long #1 equals lat/long #2, then the initial course is undefined.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Find the position (latitude, longitude, and altitude) of a point on the great circle from point #1 to point #2 as a fraction of the distance between the two points. If the fraction is 0.0 then point #1 is returned, if the fraction is 1.0 then point #2 is returned. If a fraction less than zero or greater than one is used, then this function will extrapolate along the great circle.
Usage Notes:
p1 | point #1 |
p2 | point #1 |
f | decimal fraction |
|
static |
This is a fast but crude way of interpolating between relatively close geodesic points
p1 | point #1 |
p2 | point #1 |
f | decimal fraction |
|
static |
Given two great circles defined by a1,a2 and b1,b2, return the intersection point that is closest a1. Use LatLonAlt.antipode() to get the other value. This assumes that the arc distance between a1,a2 < 90 and b1,b2 < 90 The altitude of the return value is equal to a1.alt() This returns an INVALID value if both segments are collinear
a1 | point #1 to form great circle #1 |
a2 | point #2 to form great circle #1 |
b1 | point #1 to form great circle #2 |
b2 | point #2 to form great circle #2 |
Given two great circles defined by a1,a2 and b1,b2, return the intersection poin that is closest a1. Use LatLonAlt.antipode() to get the other value. This assumes that the arc distance between a1,a2 < 90 and b1,b2 < 90 This returns an INVALID value if both segments are collinear EXPERIMENTAL
|
static |
Given two great circles defined by so, so2 and si, si2 return the intersection point that is closest to so. (Note. because on a sphere there are two intersection points) Calculate altitude of intersection using linear extrapolation from line (so,so2)
so | first point of line o |
so2 | second point of line o |
dto | the delta time between point so and point so2. |
si | first point of line i |
si2 | second point of line i |
|
static |
EXPERIMENTAL Given two great circle segments defined by a1,a2 and b1,b2, return the intersection point that is closest a1.
This assumes that the arc distance between a1,a2 < 90 and b1,b2 < 90 The altitude of the return value is equal to a1.alt() This returns an INVALID value if both segments are collinear or there is no intersection
Note: This is very slow compared to the equivalent Vect3 method.
so | starting point of segment [so,so2] |
so2 | ending point of segment [so,so2] |
si | starting point of segment [si,si2] |
si2 | ending point of segment [si,si2] |
Return a new location on the great circle path from p1 to p2 that is distance d from p1
p1 | the first point to define the great circle |
p2 | the second point to define the great circle |
d | distance from point #1 [m] |
|
static |
Find a point on the great circle route from point #1 to point #2, traveling at the given velocity (only ground speed and vertical speed, not track angle) for the given amount of time. If points #1 and #2 are essentially the same, then the direction between these two points is undefined, so the first point is returned.
This calculation ignores altitude. Small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
p1 | a point |
p2 | another point |
v | velocity |
t | time |
|
static |
Find a point from the given lat/lon ('s') when traveling along the great circle with the given initial velocity for the given amount of time.
This calculation is approximate: small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
s | a position |
v | velocity |
t | time |
|
static |
Find a point from the given lat/lon ('s') with an initial 'track' angle at a distance of 'dist'. This calculation follows the great circle.
Note: this method does not compute an accurate altitude
s | a position |
track | the initial course coming from point s, assuming a great circle is followed |
dist | distance from point #1 over the surface of the Earth [m], for very small distances, this method returns inaccurate results. |
|
static |
Find a point from the given lat/lon when traveling at the given velocity for the given amount of time. This calculation follows the rhumb line (loxodrome or line of constant track).
Modern aircraft (and most ships) usually travel great circles not rhumb lines, therefore linear_initial() is usually the preferred over this function.
At "normal" latitudes, rhumb lines are usually within a few percent of the great circle route. However, near the poles the behavior of rhumb lines is not intuitive: if the destination is a point near the pole, then the rhumb line may spiral around the pole to get to the destination. In fact, if you maintain a constant track angle along a rhumb line for a long enough distance, gradually the line will spiral in towards one of the poles.
Rhumb lines are not defined at the exact north and south poles, therefore if the origin or destination is precisely at a pole, this function will choose a point near the pole.
This calculation is approximate: small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
s | position |
v | velocity |
t | time |
|
static |
Find a point from the given lat/lon at an angle of 'track' at a distance of 'dist'. This calculation follows the rhumb line (loxodrome or line of constant track).
Modern aircraft (and most ships) usually travel great circles not rhumb lines, therefore linear_initial() is usually preferred over this function.
At "normal" latitudes, rhumb lines are usually within a few percent of the great circle route. However, near the poles the behavior of rhumb lines is not intuitive: if the destination is a point near the pole, then the rhumb line may spiral around the pole to get to the destination. In fact, if you maintain a constant track angle along a rhumb line for a long enough distance, gradually the line will spiral in towards one of the poles.
Rhumb lines are not defined at the exact north and south poles, therefore if the origin or destination is precisely at a pole, this function will choose a point near the pole.
This calculation is approximate: small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
s | position |
track | track angle |
dist | distance |
|
static |
Find the maximum (northern-most) latitude of the line segment defined by the two points along a great circle path.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
Estimate the maximum latitude of the great circle defined by the two points.
p1 | point 1 |
p2 | point 2 |
|
static |
Estimate the maximum latitude of the great circle defined by the two points.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Find the minimum (southern-most) latitude of the line segment defined by the two points along a great circle path.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
Estimate the minimum latitude of the great circle defined by the two points.
p1 | point 1 |
p2 | point 2 |
|
static |
Estimate the minimum latitude of the great circle defined by the two points.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Returns values describing if the ownship state will pass in front of or behind the intruder (from a horizontal perspective)
so | ownship position |
vo | ownship velocity |
si | intruder position |
vi | intruder velocity |
|
static |
A representative course (course relative to true north) for the entire arc on the great circle route from lat/long #1 to lat/long #2. The value is in internal units of angles (radians), and is a compass angle [0..2*Pi]: clockwise from true north. This is currently calculated as the initial course from the midpoint of the arc to its endpoint.
lat1 | latitude of point 1 |
lon1 | longitude of point 1 |
lat2 | latitude of point 2 |
lon2 | longitude of point 2 |
|
static |
Solve the spherical triangle when one has a side (in angular distance), and two angles. The side is not between the angles. The sides are labeled a, b, and c. The angles are labelled A, B, and C. Side a is opposite angle A, and so forth.
Given these constraints, in some cases two solutions are possible. To get one solution set the parameter firstSolution to true, to get the other set firstSolution to false. A firstSolution == true will return a smaller side, b, than firstSolution == false.
a | one side (in angular distance) |
A | the angle opposite the side a |
B | another angle |
firstSolution | select which solution to use |
|
static |
This implements the spherical cosine rule to complete a triangle on the unit sphere
a | side a (angular distance) |
C | angle between sides a and b |
b | side b (angular distance) |
|
static |
Solve the spherical triangle when one has a side (in angular distance), another side, and an angle between sides. The angle is not between the sides. The sides are labeled a, b, and c. The angles are labelled A, B, and C. Side a is opposite angle A, and so forth.
Given these constraints, in some cases two solutions are possible. To get one solution set the parameter firstSolution to true, to get the other set firstSolution to false. A firstSolution == true will return a smaller angle, B, than firstSolution == false.
b | one side (in angular distance) |
a | another side (in angular distance) |
A | the angle opposite the side a |
firstSolution | select which solution to use |
|
static |
Accurately calculate the angular distance of an arc on a small circle (turn) on the sphere.
radius | along-surface radius of small circle |
arcLength | linear (m) length of the arc. This is the along-line length of the arc. |
|
static |
Accurately calculate the linear distance of an arc on a small circle (turn) on the sphere.
radius | along-surface radius of small circle |
arcAngle | angular (radian) length of the arc. This is the angle between two great circles that intersect at the small circle's center. |
|
static |
EXPERIMENTAL Given a small circle, rotate a point
so | point on circle |
center | center of circle |
angle | angle of rotation around center (positive is clockwise) |
Transforms a lat/lon position to a point in R3 (on a sphere) This is an Earth-Centered, Earth-Fixed translation (ECEF, assuming earth-surface altitude). From Wikipedia: en.wikipedia.org/wiki/Curvilinear_coordinates (contents apparently moved to Geodetic datum entry)
The x-axis intersects the sphere of the earth at 0 latitude (the equator) and 0 longitude (Greenwich).
lla | lattitude/longitude point |
|
static |
Transforms a lat/lon position to a point in R3 (on a sphere) This is an Earth-Centered, Earth-Fixed translation (assuming earth-surface altitude). From Wikipedia: en.wikipedia.org/wiki/Curvilinear_coordinates (contents apparently moved to Geodetic datum entry)
The x-axis intersects the sphere of the earth at 0 latitude (the equator) and 0 longitude (Greenwich).
lat | latitude |
lon | longitude |
|
static |
Return the surface distance (at the nominal earth radius) corresponding to a given chord distance (through the earth).
chord_distance | cordal distance |
|
static |
Estimate the velocity on the great circle from lat/lon #1 to lat/lon #2 with the given amount of time. Essentially, the velocity at the mid point between lat/lon #1 and lat/lon #2. If points #1 and #2 are essentially the same (about 1 meter apart), then a zero vector is returned. Also if the absolute value of time is less than 1 [ms], then a zero vector is returned.
If the time is negative, then the velocity is along the great circle formed by #1 and #2, but in the opposite direction from #2.
This is an estimate of the velocity. This calculation ignores altitude when calculating great circle distance. Small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
p1 | a point |
p2 | another point |
t | time |
|
static |
Estimate the velocity on the great circle from lat/lon #1 to lat/lon #2 with the given speed. If the time is negative, then the velocity is along the great circle formed by #1 and #2, but in the opposite direction from #2.
This is an estimate of the velocity. This calculation ignores altitude when calculating great circle distance. Small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
s1 | a point |
s2 | another point |
speed | speed between point |
|
static |
Estimate the final velocity on the great circle from lat/lon #1 to lat/lon #2 with the given amount of time. The track angle of the velocity is the course from point #1 to #2 roughly at point #2. If points #1 and #2 are essentially the same (about 1 meter apart), then a zero vector is returned. Also if the absolute value of time is less than 1 [ms], then a zero vector is returned.
If the time is negative, then the velocity is along the great circle formed by #1 and #2, but in the opposite direction from #2.
This is an estimate of the velocity. This calculation ignores altitude when calculating great circle distance. Small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
p1 | a point |
p2 | another point |
t | time |
|
static |
Compute the initial velocity on the great circle from lat/lon #1 to lat/lon #2 with the given amount of time. If points #1 and #2 are essentially the same (about 1 meter apart), then a zero vector is returned. Also if the absolute value of time is less than 1 [ms], then a zero vector is returned.
If the time is negative, then the velocity is along the great circle formed by #1 and #2, but in the opposite direction from #2.
This calculation ignores altitude when calculating great circle distance. Small errors (typically less than 0.5%) will be introduced at typical aircraft altitudes.
p1 | point 1 |
p2 | point 2 |
t | time |
Transforms a R3 position on the earth surface into lat/lon coordinates This is an Earth-Centered, Earth-Fixed translation (ECEF, assuming earth-surface altitude). From Wikipedia: en.wikipedia.org/wiki/Curvilinear_coordinates (contents apparently moved to Geodetic datum entry) We take a standard radius of the earth as defined in GreatCircle, and treat altitude as 0.
v | position in R3, with ECEF origin |
|
static |
The radius of a spherical "Earth" assuming 1 nautical mile is 1852 meters (as defined by various international committees) and that one nautical mile is equal to one minute of arc (traditional definition of a nautical mile). This value lies between the major and minor axis as defined by WGS84.