GRASS Programmer's Manual
6.4.3(2013)-r
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Macros
Pages
radii.c
Go to the documentation of this file.
1
/* TODO:
2
3
Suggestion: all "lon"s in the file "radii.c" should read as "lat"
4
5
Comments:
6
on page http://www.mentorsoftwareinc.com/cc/gistips/TIPS0899.HTM
7
down where it says "Meridional Radius of Curvature" is the exact formula
8
out of "radii.c".
9
Quote: "essentially, the radius of curvature, at a specific latitude ...".
10
11
See also http://williams.best.vwh.net/ellipsoid/node1.html which has a nice
12
picture showning the parametric latitude and phi, the geodetic latitude.
13
On the next page,
14
http://williams.best.vwh.net/ellipsoid/node2.html, in equation 3, the
15
Meridional Radius of Curvature shows up.
16
17
So, it looks like you are calculating the Meridional Radius of Curvature
18
as a function of GEODETIC LATITUDE.
19
*/
20
21
#include <math.h>
22
#include <grass/gis.h>
23
#include "
pi.h
"
24
25
26
/****************************************************************
27
Various formulas for the ellipsoid.
28
Reference: Map Projections by Peter Richardus and Ron K. Alder
29
University of Illinois Library Call Number: 526.8 R39m
30
Parameters are:
31
lon = longitude of the meridian
32
a = ellipsoid semi-major axis
33
e2 = ellipsoid eccentricity squared
34
35
36
meridional radius of curvature (p. 16)
37
2
38
a ( 1 - e )
39
M = ------------------
40
2 2 3/2
41
(1 - e sin lon)
42
43
transverse radius of curvature (p. 16)
44
45
a
46
N = ------------------
47
2 2 1/2
48
(1 - e sin lon)
49
50
radius of the tangent sphere onto which angles are mapped
51
conformally (p. 24)
52
53
R = sqrt ( N * M )
54
55
***************************************************************************/
56
73
double
G_meridional_radius_of_curvature
(
double
lon,
double
a,
double
e2)
74
{
75
double
x;
76
double
s
;
77
78
s = sin(
Radians
(lon));
79
x = 1 - e2 * s *
s
;
80
81
return
a * (1 - e2) / (x * sqrt(x));
82
}
83
84
85
102
double
G_transverse_radius_of_curvature
(
double
lon,
double
a,
double
e2)
103
{
104
double
x;
105
double
s
;
106
107
s = sin(
Radians
(lon));
108
x = 1 - e2 * s *
s
;
109
110
return
a / sqrt(x);
111
}
112
113
130
double
G_radius_of_conformal_tangent_sphere
(
double
lon,
double
a,
double
e2)
131
{
132
double
x;
133
double
s
;
134
135
s = sin(
Radians
(lon));
136
x = 1 - e2 * s *
s
;
137
138
return
a * sqrt(1 - e2) / x;
139
}
lib
gis
radii.c
Generated on Sat Oct 5 2013 12:11:09 for GRASS Programmer's Manual by
1.8.4