Go to the documentation of this file.
57 static void utm_print_info
59 const TRANSFORMATION *trans
68 "Scale Factor at C. Meridian: ");
81 static void tm_print_info
83 const TRANSFORMATION *trans
91 "Scale Factor at C. Meridian: ");
107 static int common_init
109 TRANSFORMATION *trans,
129 trans->cache =
cache;
136 cache->lon_center = center_long;
153 if (
cache->es < .00001)
154 cache->is_sphere = 1;
156 cache->is_sphere = 0;
171 static int tm_common_init
173 TRANSFORMATION *trans
184 const GCTP_PROJECTION *proj = &trans->proj;
185 int spheroid = proj->spheroid;
196 "DMS to degrees: %f", proj->parameters[4]);
199 center_long *= 3600 *
S2R;
204 "DMS to degrees: %f", proj->parameters[5]);
209 trans->print_info = tm_print_info;
225 static int utm_common_init
227 TRANSFORMATION *trans
239 const GCTP_PROJECTION *proj = &trans->proj;
240 int spheroid = proj->spheroid;
261 "DMS to degrees: %f", proj->parameters[0]);
269 "DMS to degrees: %f", proj->parameters[1]);
284 if ((
abs(zone) < 1) || (
abs(zone) > 60))
291 center_long = ((6 *
abs(zone)) - 183) *
D2R;
295 trans->print_info = utm_print_info;
310 static int inverse_transform
312 const TRANSFORMATION *trans,
323 double sin_phi, cos_phi, tan_phi;
324 double c, cs,
t, ts, n,
r, d, ds;
325 double f,
h,
g, temp;
332 g = 0.5 * (
f - 1.0/
f);
336 con = sqrt((1.0 -
h *
h)/(1.0 +
g *
g));
340 if ((
g == 0) && (
h == 0))
360 delta_phi = ((con + cache_ptr->
e1 * sin(2.0*phi) - cache_ptr->
e2
361 * sin(4.0*phi) + cache_ptr->
e3 * sin(6.0*phi))
362 / cache_ptr->
e0) - phi;
375 sincos(phi, &sin_phi, &cos_phi);
381 con = 1.0 - cache_ptr->
es *
SQUARE(sin_phi);
382 n = cache_ptr->
r_major / sqrt(con);
383 r = n * (1.0 - cache_ptr->
es) / con;
386 *
lat = phi - (n * tan_phi * ds /
r) * (0.5 - ds / 24.0 * (5.0 + 3.0
387 *
t + 10.0 *
c - 4.0 * cs - 9.0 * cache_ptr->
esp - ds / 30.0
388 * (61.0 + 90.0 *
t + 298.0 *
c + 45.0 * ts - 252.0
389 * cache_ptr->
esp - 3.0 * cs)));
391 * (1.0 + 2.0 *
t +
c - ds / 20.0 * (5.0 - 2.0 *
c + 28.0
392 *
t - 3.0 * cs + 8.0 * cache_ptr->
esp + 24.0 * ts)))
412 static int forward_transform
414 const TRANSFORMATION *trans,
423 double sin_phi, cos_phi;
436 b = cos_phi * sin(delta_lon);
445 * log((1.0 +
b)/(1.0 -
b));
446 con = acos(cos_phi * cos(delta_lon)/sqrt(1.0 -
b*
b));
455 al = cos_phi * delta_lon;
460 con = 1.0 - cache_ptr->
es *
SQUARE(sin_phi);
461 n = cache_ptr->
r_major / sqrt(con);
463 cache_ptr->
e1, cache_ptr->
e2, cache_ptr->
e3,
lat);
466 * (1.0 -
t +
c + als / 20.0 * (5.0 - 18.0 *
t +
SQUARE(
t) + 72.0
470 * (0.5 + als / 24.0 * (5.0 -
t + 9.0 *
c + 4.0 *
SQUARE(
c) + als
471 / 30.0 * (61.0 - 58.0 *
t +
SQUARE(
t) + 600.0 *
c - 330.0
488 TRANSFORMATION *trans
498 trans->transform = inverse_transform;
514 TRANSFORMATION *trans
524 trans->transform = forward_transform;
540 TRANSFORMATION *trans
550 trans->transform = inverse_transform;
566 TRANSFORMATION *trans
576 trans->transform = forward_transform;
int gctp_utm_forward_init(TRANSFORMATION *trans)
int gctp_tm_inverse_init(TRANSFORMATION *trans)
void gctp_print_origin(double A)
void gctp_print_title(const char *proj_name)
double gctp_calc_e2(double x)
#define GCTP_PRINT_ERROR(format,...)
int gctp_get_sign(double x)
void gctp_print_genrpt_long(long A, const char *S)
double adjust_lon(double x)
int gctp_utm_inverse_init(TRANSFORMATION *trans)
double precision function f(R1)
def cache(filename, recache=False)
double gctp_calc_e0(double x)
int gctp_calc_utm_zone(double lon)
void gctp_print_offsetp(double A, double B)
double gctp_calc_e3(double x)
int gctp_tm_forward_init(TRANSFORMATION *trans)
int gctp_dms2degrees(double angle, double *degrees)
void gctp_print_genrpt(double A, const char *S)
double gctp_calc_e1(double x)
#define gctp_get_spheroid
void gctp_print_radius2(double radius1, double radius2)
void gctp_print_cenlonmer(double A)
for(i=0;i< NROOTS;i++) s[i]
no change in intended resolving MODur00064 Corrected handling of bad ephemeris attitude resolving resolving GSFcd00179 Corrected handling of fill values for[Sensor|Solar][Zenith|Azimuth] resolving MODxl01751 Changed to validate LUT version against a value retrieved from the resolving MODxl02056 Changed to calculate Solar Diffuser angles without adjustment for estimated post launch changes in the MODIS orientation relative to incidentally resolving defects MODxl01766 Also resolves MODxl01947 Changed to ignore fill values in SCI_ABNORM and SCI_STATE rather than treating them as resolving MODxl01780 Changed to use spacecraft ancillary data to recognise when the mirror encoder data is being set by side A or side B and to change calculations accordingly This removes the need for seperate LUTs for Side A and Side B data it makes the new LUTs incompatible with older versions of the and vice versa Also resolves MODxl01685 A more robust GRing algorithm is being which will create a non default GRing anytime there s even a single geolocated pixel in a granule Removed obsolete messages from seed as required for compatibility with version of the SDP toolkit Corrected test output file names to end in per delivery and then split off a new MYD_PR03 pcf file for Aqua Added AssociatedPlatformInstrumentSensor to the inventory metadata in MOD01 mcf and MOD03 mcf Created new versions named MYD01 mcf and MYD03 where AssociatedPlatformShortName is rather than Terra The program itself has been changed to read the Satellite Instrument validate it against the input L1A and LUT and to use it determine the correct files to retrieve the ephemeris and attitude data from Changed to produce a LocalGranuleID starting with MYD03 if run on Aqua data Added the Scan Type file attribute to the Geolocation copied from the L1A and attitude_angels to radians rather than degrees The accumulation of Cumulated gflags was moved from GEO_validate_earth_location c to GEO_locate_one_scan c
double gctp_calc_dist_from_equator(double e0, double e1, double e2, double e3, double phi)