RAVE
|
Utilities for performing polar navigation. More...
#include "polarnav.h"
#include "rave_debug.h"
#include "rave_alloc.h"
#include "math.h"
#include <string.h>
Classes | |
struct | _PolarNavigator_t |
Represents one polar navigator. More... | |
Macros | |
#define | DEFAULT_EQUATOR_RADIUS 6378160.0; |
Radius at the equator. | |
#define | DEFAULT_POLE_RADIUS 6356780.0; |
Radius to the poles. | |
Functions | |
void | PolarNavigator_setPoleRadius (PolarNavigator_t *polnav, double radius) |
Sets the radius to the poles. | |
double | PolarNavigator_getPoleRadius (PolarNavigator_t *polnav) |
Returns the radius to the poles. | |
void | PolarNavigator_setEquatorRadius (PolarNavigator_t *polnav, double radius) |
Sets the radius at the equator. | |
double | PolarNavigator_getEquatorRadius (PolarNavigator_t *polnav) |
Returns the radius at the equator. | |
void | PolarNavigator_setLon0 (PolarNavigator_t *polnav, double lon0) |
Sets the origin longitude. | |
double | PolarNavigator_getLon0 (PolarNavigator_t *polnav) |
Returns the origin longitude. | |
void | PolarNavigator_setLat0 (PolarNavigator_t *polnav, double lat0) |
Sets the origin latitude. | |
double | PolarNavigator_getLat0 (PolarNavigator_t *polnav) |
Returns the origin latitude. | |
void | PolarNavigator_setAlt0 (PolarNavigator_t *polnav, double alt0) |
Sets the origin altitude. | |
double | PolarNavigator_getAlt0 (PolarNavigator_t *polnav) |
Returns the origin altitude. | |
void | PolarNavigator_setDndh (PolarNavigator_t *polnav, double dndh) |
Sets the dndh (deflection). | |
double | PolarNavigator_getDndh (PolarNavigator_t *polnav) |
Returns the dndh. | |
double | PolarNavigator_getEarthRadius (PolarNavigator_t *polnav, double lat) |
Returns the earth radius (in meters) at the specified latitude. | |
double | PolarNavigator_getEarthRadiusOrigin (PolarNavigator_t *polnav) |
Returns the earth radius at the origin. | |
double | PolarNavigator_getDistance (PolarNavigator_t *polnav, double lat, double lon) |
Returns the distance between lon0/lat0 and the provided lon/lat coordinates. | |
void | PolarNavigator_llToDa (PolarNavigator_t *polnav, double lat, double lon, double *d, double *a) |
Calculates the distance/azimuth from origin to the specified lon/lat. | |
void | PolarNavigator_daToLl (PolarNavigator_t *polnav, double d, double a, double *lat, double *lon) |
Calculates the lon/lat from origin to the specified azimuth/distance. | |
void | PolarNavigator_dhToRe (PolarNavigator_t *polnav, double d, double h, double *r, double *e) |
Calculates the range/elevation from the specified distance and height. | |
void | PolarNavigator_deToRh (PolarNavigator_t *polnav, double d, double e, double *r, double *h) |
Calculates the range/height from the specified distance and elevation. | |
void | PolarNavigator_reToDh (PolarNavigator_t *polnav, double r, double e, double *d, double *h) |
Calculates the distance/height from the specified range and elevation. | |
void | PolarNavigator_ehToRd (PolarNavigator_t *polnav, double e, double h, double *r, double *d) |
Calculates the range/distance from the specified elevation and height. | |
Variables | |
RaveCoreObjectType | PolarNavigator_TYPE |
Type definition to use when creating a rave object. | |
Utilities for performing polar navigation.
#define DEFAULT_EQUATOR_RADIUS 6378160.0; |
Radius at the equator.
#define DEFAULT_POLE_RADIUS 6356780.0; |
Radius to the poles.
void PolarNavigator_daToLl | ( | PolarNavigator_t * | polnav, |
double | d, | ||
double | a, | ||
double * | lat, | ||
double * | lon ) |
Calculates the lon/lat from origin to the specified azimuth/distance.
[in] | polnav | - the polar navigator |
[in] | d | - the distance (in meters) |
[in] | a | - the azimuth (in radians) |
[out] | lat | - the latitude (in radians) |
[out] | lon | - the longitude (in radians) |
void PolarNavigator_deToRh | ( | PolarNavigator_t * | polnav, |
double | d, | ||
double | e, | ||
double * | r, | ||
double * | h ) |
Calculates the range/height from the specified distance and elevation.
[in] | polnav | - the polar navigator |
[in] | d | - the distance (in meters) |
[in] | e | - the elevation (in radians) |
[out] | r | - the range (in meters) |
[out] | h | - the height (in meters) |
void PolarNavigator_dhToRe | ( | PolarNavigator_t * | polnav, |
double | d, | ||
double | h, | ||
double * | r, | ||
double * | e ) |
Calculates the range/elevation from the specified distance and height.
[in] | polnav | - the polar navigator |
[in] | d | - the distance (in meters) |
[in] | h | - the height (in meters) |
[out] | r | - the range (in meters) |
[out] | e | - the elevation (in radians) |
void PolarNavigator_ehToRd | ( | PolarNavigator_t * | polnav, |
double | e, | ||
double | h, | ||
double * | r, | ||
double * | d ) |
Calculates the range/distance from the specified elevation and height.
[in] | polnav | - the polar navigator |
[in] | e | - the elevation (in radians) |
[in] | h | - the height (in meters) |
[out] | r | - the range (in meters) |
[out] | d | - the distance (in meters) |
double PolarNavigator_getAlt0 | ( | PolarNavigator_t * | polnav | ) |
Returns the origin altitude.
[in] | polnav | - the polar navigator |
double PolarNavigator_getDistance | ( | PolarNavigator_t * | polnav, |
double | lat, | ||
double | lon ) |
Returns the distance between lon0/lat0 and the provided lon/lat coordinates.
[in] | polnav | - self |
[in] | lat | - the latitude |
[in] | lon | - the longitude |
double PolarNavigator_getDndh | ( | PolarNavigator_t * | polnav | ) |
Returns the dndh.
[in] | polnav | - the polar navigator |
double PolarNavigator_getEarthRadius | ( | PolarNavigator_t * | polnav, |
double | lat ) |
Returns the earth radius (in meters) at the specified latitude.
[in] | polnav | - the polar navigator |
[in] | lat | - the latitude (in radians) |
double PolarNavigator_getEarthRadiusOrigin | ( | PolarNavigator_t * | polnav | ) |
Returns the earth radius at the origin.
Same as calling PolarNavigator_getEarthRadius(polnav, PolarNavigator_getLat0(polnav)).
[in] | polnav | - the polar navigator |
double PolarNavigator_getEquatorRadius | ( | PolarNavigator_t * | polnav | ) |
Returns the radius at the equator.
[in] | polnav | - the polar navigator |
double PolarNavigator_getLat0 | ( | PolarNavigator_t * | polnav | ) |
Returns the origin latitude.
[in] | polnav | - the polar navigator |
double PolarNavigator_getLon0 | ( | PolarNavigator_t * | polnav | ) |
Returns the origin longitude.
[in] | polnav | - the polar navigator |
double PolarNavigator_getPoleRadius | ( | PolarNavigator_t * | polnav | ) |
Returns the radius to the poles.
[in] | polnav | - the polar navigator |
void PolarNavigator_llToDa | ( | PolarNavigator_t * | polnav, |
double | lat, | ||
double | lon, | ||
double * | d, | ||
double * | a ) |
Calculates the distance/azimuth from origin to the specified lon/lat.
[in] | polnav | - the polar navigator |
[in] | lat | - the destination latitude (in radians) |
[in] | lon | - the destination longitude (in radians) |
[out] | d | - the distance (in meters) |
[out] | a | - the azimuth (in radians) |
void PolarNavigator_reToDh | ( | PolarNavigator_t * | polnav, |
double | r, | ||
double | e, | ||
double * | d, | ||
double * | h ) |
Calculates the distance/height from the specified range and elevation.
[in] | polnav | - the polar navigator |
[in] | r | - the range (in meters) |
[in] | e | - the elevation (in radians) |
[out] | d | - the distance (in meters) |
[out] | h | - the height (in meters) |
void PolarNavigator_setAlt0 | ( | PolarNavigator_t * | polnav, |
double | alt0 ) |
Sets the origin altitude.
[in] | polnav | - the polar navigator |
[in] | alt0 | - the origin altitude (in meters) |
void PolarNavigator_setDndh | ( | PolarNavigator_t * | polnav, |
double | dndh ) |
Sets the dndh (deflection).
[in] | polnav | - the polar navigator |
[in] | dndh | - the dndh value |
void PolarNavigator_setEquatorRadius | ( | PolarNavigator_t * | polnav, |
double | radius ) |
Sets the radius at the equator.
[in] | polnav | - the polar navigator |
[in] | radius | - the radius at the equator (in meters) |
void PolarNavigator_setLat0 | ( | PolarNavigator_t * | polnav, |
double | lat0 ) |
Sets the origin latitude.
[in] | polnav | - the polar navigator |
[in] | lat0 | - the origin latitude (in radians) |
void PolarNavigator_setLon0 | ( | PolarNavigator_t * | polnav, |
double | lon0 ) |
Sets the origin longitude.
[in] | polnav | - the polar navigator |
[in] | lon0 | - the origin longitude (in radians) |
void PolarNavigator_setPoleRadius | ( | PolarNavigator_t * | polnav, |
double | radius ) |
Sets the radius to the poles.
[in] | polnav | - the polar navigator |
[in] | radius | - the radius to the poles (in meters) |
RaveCoreObjectType PolarNavigator_TYPE |
Type definition to use when creating a rave object.