79 CU_ASSERT_DOUBLE_EQUAL(dir, M_PI_2, 1e-14);
80 CU_ASSERT_DOUBLE_EQUAL(dist, 0.0174532925199433, 1e-14);
87 CU_ASSERT_DOUBLE_EQUAL(dir, 0.0, 1e-14);
88 CU_ASSERT_DOUBLE_EQUAL(dist, 0.0174532925199433, 1e-14);
double sphere_distance(const GEOGRAPHIC_POINT *s, const GEOGRAPHIC_POINT *e)
Given two points on a unit sphere, calculate their distance apart in radians.
Point in spherical coordinates on the world.
void geographic_point_init(double lon, double lat, GEOGRAPHIC_POINT *g)
Initialize a geographic point.
double sphere_direction(const GEOGRAPHIC_POINT *s, const GEOGRAPHIC_POINT *e, double d)
Given two points on a unit sphere, calculate the direction from s to e.