RAVE
polarnav.h
Go to the documentation of this file.
1/* --------------------------------------------------------------------
2Copyright (C) 2009 Swedish Meteorological and Hydrological Institute, SMHI,
3
4This file is part of RAVE.
5
6RAVE is free software: you can redistribute it and/or modify
7it under the terms of the GNU Lesser General Public License as published by
8the Free Software Foundation, either version 3 of the License, or
9(at your option) any later version.
10
11RAVE is distributed in the hope that it will be useful,
12but WITHOUT ANY WARRANTY; without even the implied warranty of
13MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14GNU Lesser General Public License for more details.
15
16You should have received a copy of the GNU Lesser General Public License
17along with RAVE. If not, see <http://www.gnu.org/licenses/>.
18------------------------------------------------------------------------*/
27#ifndef POLARNAV_H
28#define POLARNAV_H
29#include "rave_object.h"
30
31#ifdef _MSC_VER
32#ifndef _CRT_SECURE_NO_DEPRECATE
33#define _CRT_SECURE_NO_DEPRECATE
34#endif
35#ifndef _CRT_NONSTDC_NO_DEPRECATE
36#define _CRT_NONSTDC_NO_DEPRECATE
37#endif
38#ifndef _USE_MATH_DEFINES
39#define _USE_MATH_DEFINES
40#endif
41#endif
42
47
52
58void PolarNavigator_setPoleRadius(PolarNavigator_t* polnav, double radius);
59
66
72void PolarNavigator_setEquatorRadius(PolarNavigator_t* polnav, double radius);
73
80
86void PolarNavigator_setLon0(PolarNavigator_t* polnav, double lon0);
87
94
100void PolarNavigator_setLat0(PolarNavigator_t* polnav, double lat0);
101
108
114void PolarNavigator_setAlt0(PolarNavigator_t* polnav, double alt0);
115
122
128void PolarNavigator_setDndh(PolarNavigator_t* polnav, double dndh);
129
136
143double PolarNavigator_getEarthRadius(PolarNavigator_t* polnav, double lat);
144
152
160double PolarNavigator_getDistance(PolarNavigator_t* polnav, double lat, double lon);
161
170void PolarNavigator_llToDa(PolarNavigator_t* polnav, double lat, double lon, double* d, double* a);
171
180void PolarNavigator_daToLl(PolarNavigator_t* polnav, double d, double a, double* lat, double* lon);
181
190void PolarNavigator_dhToRe(PolarNavigator_t* polnav, double d, double h, double* r, double* e);
191
200void PolarNavigator_deToRh(PolarNavigator_t* polnav, double d, double e, double* r, double* h);
201
210void PolarNavigator_reToDh(PolarNavigator_t* polnav, double r, double e, double* d, double* h);
211
220void PolarNavigator_ehToRd(PolarNavigator_t* polnav, double e, double h, double* r, double* d);
221
222#endif
void PolarNavigator_dhToRe(PolarNavigator_t *polnav, double d, double h, double *r, double *e)
Calculates the range/elevation from the specified distance and height.
Definition polarnav.c:260
void PolarNavigator_setEquatorRadius(PolarNavigator_t *polnav, double radius)
Sets the radius at the equator.
Definition polarnav.c:111
void PolarNavigator_setDndh(PolarNavigator_t *polnav, double dndh)
Sets the dndh (deflection).
Definition polarnav.c:159
double PolarNavigator_getEarthRadiusOrigin(PolarNavigator_t *polnav)
Returns the earth radius at the origin.
Definition polarnav.c:183
double PolarNavigator_getDistance(PolarNavigator_t *polnav, double lat, double lon)
Returns the distance between lon0/lat0 and the provided lon/lat coordinates.
Definition polarnav.c:195
double PolarNavigator_getEquatorRadius(PolarNavigator_t *polnav)
Returns the radius at the equator.
Definition polarnav.c:117
void PolarNavigator_ehToRd(PolarNavigator_t *polnav, double e, double h, double *r, double *d)
Calculates the range/distance from the specified elevation and height.
Definition polarnav.c:353
void PolarNavigator_setAlt0(PolarNavigator_t *polnav, double alt0)
Sets the origin altitude.
Definition polarnav.c:147
double PolarNavigator_getLat0(PolarNavigator_t *polnav)
Returns the origin latitude.
Definition polarnav.c:141
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.
Definition polarnav.c:242
double PolarNavigator_getLon0(PolarNavigator_t *polnav)
Returns the origin longitude.
Definition polarnav.c:129
void PolarNavigator_setLon0(PolarNavigator_t *polnav, double lon0)
Sets the origin longitude.
Definition polarnav.c:123
void PolarNavigator_reToDh(PolarNavigator_t *polnav, double r, double e, double *d, double *h)
Calculates the distance/height from the specified range and elevation.
Definition polarnav.c:329
void PolarNavigator_setPoleRadius(PolarNavigator_t *polnav, double radius)
Sets the radius to the poles.
Definition polarnav.c:99
double PolarNavigator_getAlt0(PolarNavigator_t *polnav)
Returns the origin altitude.
Definition polarnav.c:153
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.
Definition polarnav.c:207
void PolarNavigator_deToRh(PolarNavigator_t *polnav, double d, double e, double *r, double *h)
Calculates the range/height from the specified distance and elevation.
Definition polarnav.c:303
double PolarNavigator_getPoleRadius(PolarNavigator_t *polnav)
Returns the radius to the poles.
Definition polarnav.c:105
void PolarNavigator_setLat0(PolarNavigator_t *polnav, double lat0)
Sets the origin latitude.
Definition polarnav.c:135
double PolarNavigator_getDndh(PolarNavigator_t *polnav)
Returns the dndh.
Definition polarnav.c:165
RaveCoreObjectType PolarNavigator_TYPE
Type definition to use when creating a rave object.
Definition polarnav.c:396
double PolarNavigator_getEarthRadius(PolarNavigator_t *polnav, double lat)
Returns the earth radius (in meters) at the specified latitude.
Definition polarnav.c:171
Generic implementation of an object that is used within rave.
Represents one polar navigator.
Definition polarnav.c:44
double lat0
the origin latitude
Definition polarnav.c:50
double alt0
the origin altitude
Definition polarnav.c:51
double lon0
the origin longitude
Definition polarnav.c:49
double dndh
the dndh
Definition polarnav.c:52
The rave object type definition.
Definition rave_object.h:52