Changeset 8715 for issm/trunk/src/c/modules/Ll2xyx/Ll2xyx.cpp
- Timestamp:
- 06/24/11 14:15:04 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/src/c/modules/Ll2xyx/Ll2xyx.cpp
r8706 r8715 22 22 % -1 : south latitude (default is mer=0 lat=71) 23 23 */ 24 double delta,slat; 25 bool flag=true; 24 double central_meridian,standard_parallel; 26 25 27 /* Get central_meridian and standard_parallel depending on hemisphere */ 28 if (sgn == 1) { 29 delta= 45; 30 slat = 70; 31 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n"); 32 } 33 else if (sgn == -1) { 34 delta= 0; 35 slat = 71; 36 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n"); 37 } 38 else _error_("Sign should be either +1 or -1.\n"); 26 Ll2xydef(¢ral_meridian,&standard_parallel,sgn); 39 27 40 return(Ll2xyx(x,y, lat,lon,ncoord, sgn,delta,slat));28 return(Ll2xyx(x,y,lat,lon,ncoord,sgn,central_meridian,standard_parallel)); 41 29 } 42 30 … … 59 47 int i,iret=0; 60 48 double delta,slat; 61 double cde,re,ex2,ex ,pi;49 double cde,re,ex2,ex; 62 50 double latitude,longitude; 63 51 double T,rho,sl,tc,mc; … … 105 93 return(iret); 106 94 } 95 96 void Ll2xydef(double* pdelta, double* pslat, int sgn){ 97 /* This is a cpp conversion of the following: 98 %LL2XY - converts lat long to polar stereographic 99 % 100 % Converts from geodetic latitude and longitude to Polar 101 % Stereographic (X,Y) coordinates for the polar regions. 102 % Author: Michael P. Schodlok, December 2003 (map2ll) 103 % 104 % Usage: 105 % [x,y] = ll2xy(lat,lon,sgn) 106 % [x,y] = ll2xy(lat,lon,sgn,central_meridian,standard_parallel) 107 % 108 % - sgn = Sign of latitude +1 : north latitude (default is mer=45 lat=70) 109 % -1 : south latitude (default is mer=0 lat=71) 110 */ 111 bool flag=true; 112 113 /* Get central_meridian and standard_parallel depending on hemisphere */ 114 if (sgn == 1) { 115 *pdelta= 45; 116 *pslat = 70; 117 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 70N Meridian: 45).\n"); 118 } 119 else if (sgn == -1) { 120 *pdelta= 0; 121 *pslat = 71; 122 _printf_(flag,"Info: creating coordinates in polar stereographic (Std Latitude: 71S Meridian: 0).\n"); 123 } 124 else _error_("Sign should be either +1 or -1.\n"); 125 126 return; 127 }
Note:
See TracChangeset
for help on using the changeset viewer.