radii.c

Go to the documentation of this file.
00001 #include "gis.h"
00002 #include "pi.h"
00003 
00004 extern double sin(), sqrt();
00005 
00006 /****************************************************************
00007  Various formulas for the ellipsoid.
00008  Reference: Map Projections by Peter Richardus and Ron K. Alder
00009             University of Illinois Library Call Number: 526.8 R39m
00010  Parameters are:
00011     lon = longitude of the meridian
00012     a   = ellipsoid semi-major axis
00013     e2  = ellipsoid eccentricity squared
00014 
00015 
00016   meridional radius of curvature (p. 16)
00017                         2
00018                a ( 1 - e )
00019        M = ------------------
00020                  2   2    3/2
00021            (1 - e sin lon)
00022 
00023   transverse radius of curvature (p. 16)
00024 
00025                     a
00026        N = ------------------
00027                  2   2    1/2
00028            (1 - e sin lon)
00029 
00030   radius of the tangent sphere onto which angles are mapped
00031   conformally (p. 24)
00032 
00033        R = sqrt ( N * M )
00034 
00035 ***************************************************************************/
00036 
00053 double
00054 G_meridional_radius_of_curvature (lon, a, e2)
00055     double lon, a, e2;
00056 {
00057     double x;
00058     double s;
00059 
00060     s = sin (Radians(lon));
00061     x = 1 - e2 * s*s;
00062 
00063     return a * (1 - e2) / (x * sqrt(x));
00064 }
00065 
00066 
00067 
00084 double
00085 G_transverse_radius_of_curvature (lon, a, e2)
00086     double lon, a, e2;
00087 {
00088     double x;
00089     double s;
00090 
00091     s = sin (Radians(lon));
00092     x = 1 - e2 * s*s;
00093 
00094     return a / sqrt(x);
00095 }
00096 
00097 
00114 double
00115 G_radius_of_conformal_tangent_sphere (lon, a, e2)
00116     double lon, a, e2;
00117 {
00118     double x;
00119     double s;
00120 
00121     s = sin (Radians(lon));
00122     x = 1 - e2 * s*s;
00123 
00124     return a * sqrt (1 - e2) / x;
00125 }

Generated on Wed Aug 23 17:49:23 2006 for GRASS by  doxygen 1.4.7