00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 #include <drms.h>
00125 #include <math.h>
00126
00127 #include "soho_ephem.c"
00128
00129 char *module_name = "track_target_list";
00130 char *version_id = "1.3";
00131
00132 ModuleArgs_t module_args[] = {
00133 {ARG_TIME, "time", "now-120deg", "midpoint of desired tracking interval"},
00134 {ARG_NUME, "grid", "discross", "target grid",
00135 "discross, rdsyn05, rdsyn15, rdsyn30, timed20, timed24, timed24+, mdidp, mdisp, rd+05, rd+15, rd+30, rdx05, rdx15, rdx30, rdcm05, rdcm15, rdcm30, rdeq05, rdeq15, rdeq30"},
00136 {ARG_INTS, "ar", "{}",
00137 "target active regions for ring diagrams structure grid"},
00138 {ARG_FLAG, "B", "",
00139 "use midtime geocentric latitude of disc center as base for latitude targets"},
00140 {ARG_FLAG, "M", "", "midtime Carrington longitude appropriate for MDI"},
00141 {ARG_FLAG, "c", "", "report longitudes relative to CM rather than HG"},
00142 {ARG_FLAG, "r", "", "also report center angles and position angles"},
00143 {ARG_FLAG, "v", "", "run verbose (with commentary to stderr)"},
00144 {}
00145 };
00146
00147 ModuleArgs_t *gModArgs = module_args;
00148 CmdParams_t cmdparams;
00149
00150 enum {
00151 L150_60S, L150_45S, L150_30S, L150_15S,
00152 L150_000,
00153 L150_15N, L150_30N, L150_45N, L150_60N
00154 };
00155
00156 enum {
00157 L75_75S, L75_675S, L75_60S, L75_525S, L75_45S,
00158 L75_375S, L75_30S, L75_225S, L75_15S, L75_075S,
00159 L75_000,
00160 L75_075N, L75_15N, L75_225N, L75_30N, L75_375N,
00161 L75_45N, L75_525N, L75_60N, L75_675N, L75_75N
00162 };
00163
00164 enum {
00165 L25_825S, L25_80S, L25_775S, L25_75S, L25_725S,
00166 L25_70S, L25_675S, L25_65S, L25_625S, L25_60S, L25_575S, L25_55S,
00167 L25_525S, L25_50S, L25_475S, L25_45S, L25_425S, L25_40S, L25_375S,
00168 L25_35S, L25_325S, L25_30S, L25_275S, L25_25S, L25_225S, L25_20S,
00169 L25_175S, L25_15S, L25_125S, L25_10S, L25_075S, L25_05S, L25_025S,
00170 L25_000,
00171 L25_025N, L25_05N, L25_075N, L25_10N, L25_125N, L25_15N, L25_175N,
00172 L25_20N, L25_225N, L25_25N, L25_275N, L25_30N, L25_325N, L25_35N,
00173 L25_375N, L25_40N, L25_425N, L25_45N, L25_475N, L25_50N, L25_525N,
00174 L25_55N, L25_575N, L25_60N, L25_625N, L25_65N, L25_675N, L25_70N,
00175 L25_725N, L25_75N, L25_775N, L25_80N, L25_825N
00176 };
00177
00178 enum {
00179 X25_85S, X25_825S, X25_80S, X25_775S, X25_75S, X25_725S,
00180 X25_70S, X25_675S, X25_65S, X25_625S, X25_60S, X25_575S, X25_55S,
00181 X25_525S, X25_50S, X25_475S, X25_45S, X25_425S, X25_40S, X25_375S,
00182 X25_35S, X25_325S, X25_30S, X25_275S, X25_25S, X25_225S, X25_20S,
00183 X25_175S, X25_15S, X25_125S, X25_10S, X25_075S, X25_05S, X25_025S,
00184 X25_000,
00185 X25_025N, X25_05N, X25_075N, X25_10N, X25_125N, X25_15N, X25_175N,
00186 X25_20N, X25_225N, X25_25N, X25_275N, X25_30N, X25_325N, X25_35N,
00187 X25_375N, X25_40N, X25_425N, X25_45N, X25_475N, X25_50N, X25_525N,
00188 X25_55N, X25_575N, X25_60N, X25_625N, X25_65N, X25_675N, X25_70N,
00189 X25_725N, X25_75N, X25_775N, X25_80N, X25_825N, X25_85N
00190 };
00191
00192 static TIME earth_meridian_crossing (double lonn, int crr) {
00193
00194
00195
00196
00197 double ephem[EPHEM_SIZE];
00198 double lon;
00199 double phi, secapp;
00200
00201 secapp = ((crr - CRR0) * 360.0 - (lonn - LONN0)) * K;
00202 calc_sun_ephemeris (secapp, ephem, 0.0, 0.0);
00203
00204 while (lonn >= 360.0) lonn -= 360.0;
00205 while (lonn < 0.0) lonn += 360.0;
00206 lon = 360.0 - fmod (ephem[EPHEM_L0], 360.0);
00207 phi = lon - lonn;
00208 while (phi > 180.0) phi -= 360.0;
00209 while (phi < -180.0) phi += 360.0;
00210 while (fabs (phi) > ERR) {
00211 secapp += phi * K;
00212 calc_sun_ephemeris (secapp, ephem, 0.0, 0.0);
00213 lon = 360.0 - fmod (ephem[EPHEM_L0], 360.0);
00214 phi = lon - lonn;
00215 while (phi > 180.0) phi -= 360.0;
00216 while (phi < -180.0) phi += 360.0;
00217 }
00218 return secapp;
00219 }
00220
00221 static double arc_distance (double lat, double lon, double latc, double lonc) {
00222 static double radeg = M_PI / 180.0;
00223 static double degrad = 180.0 / M_PI;
00224 double cosa = sin (radeg * lat) * sin (radeg * latc) +
00225 cos (radeg * lat) * cos (radeg * latc) * cos (radeg * (lon - lonc));
00226 return degrad * acos (cosa);
00227 }
00228
00229 static double position_angle (double lat, double lon, double latc, double lonc) {
00230 static double degrad = 180.0 / M_PI;
00231 double pa = -degrad * atan2 (lon - lonc, lat - latc);
00232 return (pa < 0) ? pa + 360.0 : pa;
00233 }
00234
00235 int struc_pack_list (double clon) {
00236 float lat, lon, loncm;
00237
00238 for (loncm = -15.0; loncm <= 15.0; loncm += 15.0) {
00239 for (lat = -45.0; lat <= 45.0; lat += 7.5)
00240 printf (" %+05.1f", lat);
00241 }
00242 printf ("\n");
00243
00244 for (loncm = -15.0; loncm <= 15.0; loncm += 15.0) {
00245 lon = clon + loncm;
00246 while (lon < 0.0) lon += 360.0;
00247 while (lon >= 360.0) lon -= 360.0;
00248 for (lat = -45.0; lat <= 45.0; lat += 7.5)
00249 printf (" %05.1f", lon);
00250 }
00251 printf ("\n");
00252
00253 return 0;
00254 }
00255
00256 int dense_pack_list (double clon) {
00257 float lat, lon, loncm;
00258
00259 for (lat = -22.5; lat <= 22.5; lat += 7.5)
00260 printf (" %+05.1f", lat);
00261 for (loncm = -45.0; loncm <= -37.5; loncm += 7.5) {
00262 for (lat = -37.5; lat <= 37.5; lat += 7.5)
00263 printf (" %+05.1f", lat);
00264 }
00265 for (lat = -45.0; lat <= 45.0; lat += 7.5)
00266 printf (" %+05.1f", lat);
00267 for (loncm = -22.5; loncm <= 22.5; loncm += 7.5) {
00268 for (lat = -52.5; lat <= 52.5; lat += 7.5)
00269 printf (" %+05.1f", lat);
00270 }
00271 for (lat = -45.0; lat <= 45.0; lat += 7.5)
00272 printf (" %+05.1f", lat);
00273 for (loncm = 37.5; loncm <= 45.0; loncm += 7.5) {
00274 for (lat = -37.5; lat <= 37.5; lat += 7.5)
00275 printf (" %+05.1f", lat);
00276 }
00277 for (lat = -22.5; lat <= 22.5; lat += 7.5)
00278 printf (" %+05.1f", lat);
00279 for (lat = -60.0; lat <= 60.0; lat += 120.0) {
00280 for (loncm = -15.0; loncm <= 15.0; loncm += 15.0)
00281 printf (" %+05.1f", lat);
00282 }
00283 printf ("\n");
00284
00285 loncm = -52.5;
00286 lon = clon + loncm;
00287 while (lon < 0.0) lon += 360.0;
00288 while (lon >= 360.0) lon -= 360.0;
00289 for (lat = -22.5; lat <= 22.5; lat += 7.5)
00290 printf (" %05.1f", lon);
00291 for (loncm = -45.0; loncm <= -37.5; loncm += 7.5) {
00292 lon = clon + loncm;
00293 while (lon < 0.0) lon += 360.0;
00294 while (lon >= 360.0) lon -= 360.0;
00295 for (lat = -37.5; lat <= 37.5; lat += 7.5)
00296 printf (" %05.1f", lon);
00297 }
00298 loncm = -30.0;
00299 lon = clon + loncm;
00300 while (lon < 0.0) lon += 360.0;
00301 while (lon >= 360.0) lon -= 360.0;
00302 for (lat = -45.0; lat <= 45.0; lat += 7.5)
00303 printf (" %05.1f", lon);
00304 for (loncm = -22.5; loncm <= 22.5; loncm += 7.5) {
00305 lon = clon + loncm;
00306 while (lon < 0.0) lon += 360.0;
00307 while (lon >= 360.0) lon -= 360.0;
00308 for (lat = -52.5; lat <= 52.5; lat += 7.5)
00309 printf (" %05.1f", lon);
00310 }
00311 loncm = 30.0;
00312 lon = clon + loncm;
00313 while (lon < 0.0) lon += 360.0;
00314 while (lon >= 360.0) lon -= 360.0;
00315 for (lat = -45.0; lat <= 45.0; lat += 7.5)
00316 printf (" %05.1f", lon);
00317 for (loncm = 37.5; loncm <= 45.0; loncm += 7.5) {
00318 lon = clon + loncm;
00319 while (lon < 0.0) lon += 360.0;
00320 while (lon >= 360.0) lon -= 360.0;
00321 for (lat = -37.5; lat <= 37.5; lat += 7.5)
00322 printf (" %05.1f", lon);
00323 }
00324 loncm = 52.5;
00325 lon = clon + loncm;
00326 while (lon < 0.0) lon += 360.0;
00327 while (lon >= 360.0) lon -= 360.0;
00328 for (lat = -22.5; lat <= 22.5; lat += 7.5)
00329 printf (" %05.1f", lon);
00330
00331 for (lat = -60.0; lat <= 60.0; lat += 120.0) {
00332 for (loncm = -15.0; loncm <= 15.0; loncm += 15.0) {
00333 lon = clon + loncm;
00334 while (lon < 0.0) lon += 360.0;
00335 while (lon >= 360.0) lon -= 360.0;
00336 printf (" %05.1f", lon);
00337 }
00338 }
00339 printf ("\n");
00340
00341 return 0;
00342 }
00343
00344 int timed_grid_list (double clon, double clat, float step, int stony) {
00345 float lat, lon, loncm;
00346 float edge = 2.0 * step;
00347
00348 for (lat = clat - edge; lat <= clat + edge + 0.1*step; lat += step) {
00349 for (loncm = -edge; loncm <= edge; loncm += step)
00350 printf (" %+05.1f", lat);
00351 }
00352 printf ("\n");
00353 for (lat = clat - edge; lat <= clat + edge + 0.1*step; lat += step) {
00354 for (loncm = -edge; loncm <= edge; loncm += step)
00355 if (stony) printf (" %+05.1f", loncm);
00356 else {
00357 for (loncm = -edge; loncm <= edge; loncm += step) {
00358 lon = clon + loncm;
00359 while (lon < 0.0) lon += 360.0;
00360 while (lon >= 360.0) lon -= 360.0;
00361 printf (" %05.1f", lon);
00362 }
00363 }
00364 }
00365 printf ("\n");
00366 return 0;
00367 }
00368
00369 int timed_grid_list_plus (double clon, double clat, int stony) {
00370 float lat, lon, loncm;
00371 float step = 24.0, edge = 48.0;
00372
00373 for (lat = clat - edge; lat <= clat + edge + 0.1*step; lat += step) {
00374 for (loncm = -edge; loncm <= edge; loncm += step)
00375 printf (" %+05.1f", lat);
00376 }
00377 printf (" %+05.1f", clat - edge - 20.0);
00378 printf (" %+05.1f", clat);
00379 printf (" %+05.1f", clat);
00380 printf (" %+05.1f", clat + edge + 20.0);
00381 printf ("\n");
00382
00383 for (lat = clat - edge; lat <= clat + edge + 0.1*step; lat += step) {
00384 for (loncm = -edge; loncm <= edge; loncm += step) {
00385 if (stony) printf (" %+05.1f", loncm);
00386 else {
00387 lon = clon + loncm;
00388 while (lon < 0.0) lon += 360.0;
00389 while (lon >= 360.0) lon -= 360.0;
00390 printf (" %05.1f", lon);
00391 }
00392 }
00393 }
00394 if (stony) {
00395 printf (" %+05.1f %+05.1f %+05.1f %+05.1f", 0.0, -edge - 20.0, edge + 20.0,
00396 0.0);
00397 printf ("\n");
00398 return 0;
00399 }
00400 printf (" %05.1f", clon);
00401 lon = clon - edge - 20.0;
00402 while (lon < 0.0) lon += 360.0;
00403 while (lon >= 360.0) lon -= 360.0;
00404 printf (" %05.1f", lon);
00405 lon = clon + edge + 20.0;
00406 while (lon < 0.0) lon += 360.0;
00407 while (lon >= 360.0) lon -= 360.0;
00408 printf (" %05.1f", lon);
00409 printf (" %05.1f", clon);
00410 printf ("\n");
00411 return 0;
00412 }
00413
00414 int hmi30_pack_list (double clon, double b0, int radial) {
00415 float lat, lon, loncm, lim;
00416
00417 lat = -60.0;
00418 lim = (b0 < -3.625) ? 60.0 : 30.0;
00419 for (loncm = -lim; loncm <= lim; loncm += 30.0)
00420 printf (" %+05.1f", lat);
00421 lat = -45.0;
00422 lim = (b0 <= 3.625) ? 60.0 : 45.0;
00423 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00424 printf (" %+05.1f", lat);
00425 for (lat = -30.0; lat <= 30.0; lat += 15.0) {
00426 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0)
00427 printf (" %+05.1f", lat);
00428 }
00429 lat = 45.0;
00430 lim = (b0 >= -3.625) ? 60.0 : 45.0;
00431 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00432 printf (" %+05.1f", lat);
00433 lat = 60.0;
00434 lim = (b0 > 3.625) ? 60.0 : 30.0;
00435 for (loncm = -lim; loncm <= lim; loncm += 30.0)
00436 printf (" %+05.1f", lat);
00437 printf ("\n");
00438
00439 lat = -60.0;
00440 lim = (b0 < -3.625) ? 60.0 : 30.0;
00441 for (loncm = -lim; loncm <= lim; loncm += 30.0) {
00442 lon = clon + loncm;
00443 while (lon < 0.0) lon += 360.0;
00444 while (lon >= 360.0) lon -= 360.0;
00445 printf (" %05.1f", lon);
00446 }
00447 lat = -45.0;
00448 lim = (b0 <= 3.625) ? 60.0 : 45.0;
00449 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
00450 lon = clon + loncm;
00451 while (lon < 0.0) lon += 360.0;
00452 while (lon >= 360.0) lon -= 360.0;
00453 printf (" %05.1f", lon);
00454 }
00455 for (lat = -30.0; lat <= 30.0; lat += 15.0) {
00456 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0) {
00457 lon = clon + loncm;
00458 while (lon < 0.0) lon += 360.0;
00459 while (lon >= 360.0) lon -= 360.0;
00460 printf (" %05.1f", lon);
00461 }
00462 }
00463 lat = 45.0;
00464 lim = (b0 >= -3.625) ? 60.0 : 45.0;
00465 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
00466 lon = clon + loncm;
00467 while (lon < 0.0) lon += 360.0;
00468 while (lon >= 360.0) lon -= 360.0;
00469 printf (" %05.1f", lon);
00470 }
00471 lat = 60.0;
00472 lim = (b0 > 3.625) ? 60.0 : 30.0;
00473 for (loncm = -lim; loncm <= lim; loncm += 30.0) {
00474 lon = clon + loncm;
00475 while (lon < 0.0) lon += 360.0;
00476 while (lon >= 360.0) lon -= 360.0;
00477 printf (" %05.1f", lon);
00478 }
00479 printf ("\n");
00480
00481 if (radial) {
00482 lat = -60.0;
00483 lim = (b0 < -3.625) ? 60.0 : 30.0;
00484 for (loncm = -lim; loncm <= lim; loncm += 30.0)
00485 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00486 lat = -45.0;
00487 lim = (b0 <= 3.625) ? 60.0 : 45.0;
00488 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00489 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00490 for (lat = -30.0; lat <= 30.0; lat += 15.0) {
00491 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0)
00492 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00493 }
00494 lat = 45.0;
00495 lim = (b0 >= -3.625) ? 60.0 : 45.0;
00496 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00497 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00498 lat = 60.0;
00499 lim = (b0 > 3.625) ? 60.0 : 30.0;
00500 for (loncm = -lim; loncm <= lim; loncm += 30.0)
00501 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00502 printf ("\n");
00503
00504 lat = -60.0;
00505 lim = (b0 < -3.625) ? 60.0 : 30.0;
00506 for (loncm = -lim; loncm <= lim; loncm += 30.0)
00507 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00508 lat = -45.0;
00509 lim = (b0 <= 3.625) ? 60.0 : 45.0;
00510 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00511 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00512 for (lat = -30.0; lat <= 30.0; lat += 15.0) {
00513 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0)
00514 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00515 }
00516 lat = 45.0;
00517 lim = (b0 >= -3.625) ? 60.0 : 45.0;
00518 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00519 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00520 lat = 60.0;
00521 lim = (b0 > 3.625) ? 60.0 : 30.0;
00522 for (loncm = -lim; loncm <= lim; loncm += 30.0)
00523 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00524 printf ("\n");
00525 }
00526
00527 return 0;
00528 }
00529
00530 int hmi30_cm_list () {
00531 float lat;
00532
00533 for (lat = -60.0; lat <= 60.0; lat += 15.0) printf (" %+05.1f", lat);
00534 printf ("\n");
00535 return 0;
00536 }
00537
00538 int hmi30_eq_list (double clon, int stony) {
00539 float lon, loncm;
00540
00541 if (stony) {
00542 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0)
00543 printf (" %+05.1f", loncm);
00544 } else {
00545 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0) {
00546 lon = clon + loncm;
00547 while (lon < 0.0) lon += 360.0;
00548 while (lon >= 360.0) lon -= 360.0;
00549 printf (" %05.1f", lon);
00550 }
00551 }
00552 printf ("\n");
00553 return 0;
00554 }
00555
00556 int hmi30_stgrg_list (double clon, double b0, int stony, int radial) {
00557 float lat, lon, loncm;
00558
00559 for (lat = -60.0; lat < 0.0; lat += 15.0) printf (" %+05.1f", lat);
00560 lat = 0.0;
00561 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0) printf (" %+05.1f", lat);
00562 for (lat = 15.0; lat <= 60.0; lat += 15.0) printf (" %+05.1f", lat);
00563 printf ("\n");
00564
00565 if (stony) {
00566 for (lat = -60.0; lat < 0.0; lat += 15.0) printf (" %+05.1f", 0.0);
00567 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0) printf (" %+05.1f", loncm);
00568 for (lat = 15.0; lat <= 60.0; lat += 15.0) printf (" %+05.1f", 0.0);
00569 } else {
00570 for (lat = -60.0; lat < 0.0; lat += 15.0) printf (" %05.1f", clon);
00571 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0) {
00572 lon = clon + loncm;
00573 while (lon < 0.0) lon += 360.0;
00574 while (lon >= 360.0) lon -= 360.0;
00575 printf (" %05.1f", lon);
00576 }
00577 for (lat = 15.0; lat <= 60.0; lat += 15.0) printf (" %05.1f", clon);
00578 }
00579 printf ("\n");
00580 if (radial) {
00581 for (lat = -60.0; lat < 0.0; lat += 15.0)
00582 printf (" %05.2f", arc_distance (lat, 0.0, b0, 0.0));
00583 lat = 0.0;
00584 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0)
00585 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00586 for (lat = 15.0; lat <= 60.0; lat += 15.0)
00587 printf (" %05.2f", arc_distance (lat, 0.0, b0, 0.0));
00588 printf ("\n");
00589 for (lat = -60.0; lat < 0.0; lat += 15.0)
00590 printf (" %05.1f", position_angle (lat, 0.0, b0, 0.0));
00591 lat = 0.0;
00592 for (loncm = -60.0; loncm <= 60.0; loncm += 15.0)
00593 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00594 for (lat = 15.0; lat <= 60.0; lat += 15.0)
00595 printf (" %05.1f", position_angle (lat, 0.0, b0, 0.0));
00596 printf ("\n");
00597 }
00598 return 0;
00599 }
00600
00601 int hmi30_stand_list (double clon, double b0, int stony, int radial) {
00602 float lat, lon, loncm;
00603
00604 for (lat = -60.0; lat < 0.0; lat += 15.0) printf (" %+05.1f %+05.1f", lat, lat);
00605 lat = 0.0;
00606 printf (" %+05.1f", lat);
00607 for (lat = 15.0; lat <= 60.0; lat += 15.0) printf (" %+05.1f %+05.1f", lat, lat);
00608 printf ("\n");
00609
00610 if (stony) {
00611 for (loncm = -60.0; loncm < 0.0; loncm += 15.0) printf (" %+05.1f %+05.1f",
00612 loncm, -loncm);
00613 printf (" %+05.1f", 0.0);
00614 for (loncm = 15; loncm <= 60.0; loncm += 15.0) printf (" %+05.1f %+05.1f",
00615 loncm, -loncm);
00616 } else {
00617 for (loncm = -60.0; loncm < 0.0; loncm += 15.0) {
00618 lon = clon + loncm;
00619 while (lon < 0.0) lon += 360.0;
00620 while (lon >= 360.0) lon -= 360.0;
00621 printf (" %05.1f", lon);
00622 lon = clon - loncm;
00623 while (lon < 0.0) lon += 360.0;
00624 while (lon >= 360.0) lon -= 360.0;
00625 printf (" %05.1f", lon);
00626 }
00627 printf (" %05.1f", clon);
00628 for (loncm = 15; loncm <= 60.0; loncm += 15.0) {
00629 lon = clon + loncm;
00630 while (lon < 0.0) lon += 360.0;
00631 while (lon >= 360.0) lon -= 360.0;
00632 printf (" %05.1f", lon);
00633 lon = clon - loncm;
00634 while (lon < 0.0) lon += 360.0;
00635 while (lon >= 360.0) lon -= 360.0;
00636 printf (" %05.1f", lon);
00637 }
00638 }
00639 printf ("\n");
00640 if (radial) {
00641 for (lat = -60.0; lat < 0.0; lat += 15.0) {
00642 printf (" %05.2f", arc_distance (lat, lat, b0, 0.0));
00643 printf (" %05.2f", arc_distance (lat, -lat, b0, 0.0));
00644 }
00645 lat = 0.0;
00646 printf (" %05.2f", arc_distance (lat, lat, b0, 0.0));
00647 for (lat = 15.0; lat <= 60.0; lat += 15.0) {
00648 printf (" %05.2f", arc_distance (lat, lat, b0, 0.0));
00649 printf (" %05.2f", arc_distance (lat, -lat, b0, 0.0));
00650 }
00651 printf ("\n");
00652 for (lat = -60.0; lat < 0.0; lat += 15.0) {
00653 printf (" %05.1f", position_angle (lat, lat, b0, 0.0));
00654 printf (" %05.1f", position_angle (lat, -lat, b0, 0.0));
00655 }
00656 lat = 0.0;
00657 printf (" %05.1f", position_angle (lat, lat, b0, 0.0));
00658 for (lat = 15.0; lat <= 60.0; lat += 15.0) {
00659 printf (" %05.1f", position_angle (lat, lat, b0, 0.0));
00660 printf (" %05.1f", position_angle (lat, -lat, b0, 0.0));
00661 }
00662 printf ("\n");
00663 }
00664 return 0;
00665 }
00666
00667 int hmi15_pack_list (double clon, double b0, int radial) {
00668 float lat, lon, loncm, lim;
00669
00670 if (b0 < -3.625) {
00671 lat = -75.0;
00672 printf (" %+05.1f", lat);
00673 lat = -67.5;
00674 lim = 60.0;
00675 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00676 printf (" %+05.1f", lat);
00677 lat = -60.0;
00678 lim = 75.0;
00679 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00680 printf (" %+05.1f", lat);
00681 lat = -52.5;
00682 lim = 75.0;
00683 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00684 printf (" %+05.1f", lat);
00685 lim = 70.0;
00686 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
00687 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00688 printf (" %+05.1f", lat);
00689 }
00690 lim = 75.0;
00691 for (lat = -30.0; lat <= -15.0; lat += 7.5) {
00692 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00693 printf (" %+05.1f", lat);
00694 }
00695 lim = 67.5;
00696 for (lat = -7.5; lat <= 30.0; lat += 7.5) {
00697 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00698 printf (" %+05.1f", lat);
00699 }
00700 lim = 60.0;
00701 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
00702 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00703 printf (" %+05.1f", lat);
00704 }
00705 lat = 52.5;
00706 lim = 50.0;
00707 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00708 printf (" %+05.1f", lat);
00709 lat = 60.0;
00710 lim = 45.0;
00711 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00712 printf (" %+05.1f", lat);
00713 lat = 67.5;
00714 lim = 20.0;
00715 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00716 printf (" %+05.1f", lat);
00717 printf ("\n");
00718
00719 lat = -75.0;
00720 printf (" %05.1f", clon);
00721 lat = -67.5;
00722 lim = 60.0;
00723 for (loncm = -lim; loncm <= lim; loncm += 20.0) {
00724 lon = clon + loncm;
00725 while (lon < 0.0) lon += 360.0;
00726 while (lon >= 360.0) lon -= 360.0;
00727 printf (" %05.1f", lon);
00728 }
00729 lat = -60.0;
00730 lim = 75.0;
00731 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
00732 lon = clon + loncm;
00733 while (lon < 0.0) lon += 360.0;
00734 while (lon >= 360.0) lon -= 360.0;
00735 printf (" %05.1f", lon);
00736 }
00737 lat = -52.5;
00738 lim = 75.0;
00739 for (loncm = -lim; loncm <= lim; loncm += 12.5) {
00740 lon = clon + loncm;
00741 while (lon < 0.0) lon += 360.0;
00742 while (lon >= 360.0) lon -= 360.0;
00743 printf (" %05.1f", lon);
00744 }
00745 lim = 70.0;
00746 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
00747 for (loncm = -lim; loncm <= lim; loncm += 10.0) {
00748 lon = clon + loncm;
00749 while (lon < 0.0) lon += 360.0;
00750 while (lon >= 360.0) lon -= 360.0;
00751 printf (" %05.1f", lon);
00752 }
00753 }
00754 lim = 75.0;
00755 for (lat = -30.0; lat <= -15.0; lat += 7.5) {
00756 for (loncm = -lim; loncm <= lim; loncm += 7.5) {
00757 lon = clon + loncm;
00758 while (lon < 0.0) lon += 360.0;
00759 while (lon >= 360.0) lon -= 360.0;
00760 printf (" %05.1f", lon);
00761 }
00762 }
00763 lim = 67.5;
00764 for (lat = -7.5; lat <= 30.0; lat += 7.5) {
00765 for (loncm = -lim; loncm <= lim; loncm += 7.5) {
00766 lon = clon + loncm;
00767 while (lon < 0.0) lon += 360.0;
00768 while (lon >= 360.0) lon -= 360.0;
00769 printf (" %05.1f", lon);
00770 }
00771 }
00772 lim = 60.0;
00773 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
00774 for (loncm = -lim; loncm <= lim; loncm += 10.0) {
00775 lon = clon + loncm;
00776 while (lon < 0.0) lon += 360.0;
00777 while (lon >= 360.0) lon -= 360.0;
00778 printf (" %05.1f", lon);
00779 }
00780 }
00781 lat = 52.5;
00782 lim = 50.0;
00783 for (loncm = -lim; loncm <= lim; loncm += 12.5) {
00784 lon = clon + loncm;
00785 while (lon < 0.0) lon += 360.0;
00786 while (lon >= 360.0) lon -= 360.0;
00787 printf (" %05.1f", lon);
00788 }
00789 lat = 60.0;
00790 lim = 45.0;
00791 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
00792 lon = clon + loncm;
00793 while (lon < 0.0) lon += 360.0;
00794 while (lon >= 360.0) lon -= 360.0;
00795 printf (" %05.1f", lon);
00796 }
00797 lat = 67.5;
00798 lim = 20.0;
00799 for (loncm = -lim; loncm <= lim; loncm += 20.0) {
00800 lon = clon + loncm;
00801 while (lon < 0.0) lon += 360.0;
00802 while (lon >= 360.0) lon -= 360.0;
00803 printf (" %05.1f", lon);
00804 }
00805 printf ("\n");
00806 if (radial) {
00807
00808 lat = -75.0;
00809 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00810 lat = -67.5;
00811 lim = 60.0;
00812 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00813 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00814 lat = -60.0;
00815 lim = 75.0;
00816 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00817 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00818 lat = -52.5;
00819 lim = 75.0;
00820 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00821 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00822 lim = 70.0;
00823 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
00824 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00825 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00826 }
00827 lim = 75.0;
00828 for (lat = -30.0; lat <= -15.0; lat += 7.5) {
00829 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00830 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00831 }
00832 lim = 67.5;
00833 for (lat = -7.5; lat <= 30.0; lat += 7.5) {
00834 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00835 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00836 }
00837 lim = 60.0;
00838 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
00839 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00840 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00841 }
00842 lat = 52.5;
00843 lim = 50.0;
00844 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00845 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00846 lat = 60.0;
00847 lim = 45.0;
00848 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00849 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00850 lat = 67.5;
00851 lim = 20.0;
00852 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00853 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
00854 printf ("\n");
00855
00856 lat = -75.0;
00857 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00858 lat = -67.5;
00859 lim = 60.0;
00860 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00861 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00862 lat = -60.0;
00863 lim = 75.0;
00864 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00865 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00866 lat = -52.5;
00867 lim = 75.0;
00868 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00869 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00870 lim = 70.0;
00871 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
00872 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00873 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00874 }
00875 lim = 75.0;
00876 for (lat = -30.0; lat <= -15.0; lat += 7.5) {
00877 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00878 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00879 }
00880 lim = 67.5;
00881 for (lat = -7.5; lat <= 30.0; lat += 7.5) {
00882 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00883 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00884 }
00885 lim = 60.0;
00886 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
00887 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00888 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00889 }
00890 lat = 52.5;
00891 lim = 50.0;
00892 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00893 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00894 lat = 60.0;
00895 lim = 45.0;
00896 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00897 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00898 lat = 67.5;
00899 lim = 20.0;
00900 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00901 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
00902 printf ("\n");
00903 }
00904 } else if (b0 > 3.625) {
00905 lat = -67.5;
00906 lim = 20.0;
00907 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00908 printf (" %+05.1f", lat);
00909 lat = -60.0;
00910 lim = 45.0;
00911 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00912 printf (" %+05.1f", lat);
00913 lat = -52.5;
00914 lim = 50.0;
00915 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00916 printf (" %+05.1f", lat);
00917 lim = 60.0;
00918 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
00919 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00920 printf (" %+05.1f", lat);
00921 }
00922 lim = 67.5;
00923 for (lat = -30.0; lat <= 7.5; lat += 7.5) {
00924 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00925 printf (" %+05.1f", lat);
00926 }
00927 lim = 75.0;
00928 for (lat = 15.0; lat <= 30.0; lat += 7.5) {
00929 for (loncm = -lim; loncm <= lim; loncm += 7.5)
00930 printf (" %+05.1f", lat);
00931 }
00932 lim = 70.0;
00933 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
00934 for (loncm = -lim; loncm <= lim; loncm += 10.0)
00935 printf (" %+05.1f", lat);
00936 }
00937 lat = 52.5;
00938 lim = 75.0;
00939 for (loncm = -lim; loncm <= lim; loncm += 12.5)
00940 printf (" %+05.1f", lat);
00941 lat = 60.0;
00942 lim = 75.0;
00943 for (loncm = -lim; loncm <= lim; loncm += 15.0)
00944 printf (" %+05.1f", lat);
00945 lat = 67.5;
00946 lim = 60.0;
00947 for (loncm = -lim; loncm <= lim; loncm += 20.0)
00948 printf (" %+05.1f", lat);
00949 lat = 75.0;
00950 printf (" %+05.1f", lat);
00951 printf ("\n");
00952
00953 lat = -67.5;
00954 lim = 20.0;
00955 for (loncm = -lim; loncm <= lim; loncm += 20.0) {
00956 lon = clon + loncm;
00957 while (lon < 0.0) lon += 360.0;
00958 while (lon >= 360.0) lon -= 360.0;
00959 printf (" %05.1f", lon);
00960 }
00961 lat = -60.0;
00962 lim = 45.0;
00963 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
00964 lon = clon + loncm;
00965 while (lon < 0.0) lon += 360.0;
00966 while (lon >= 360.0) lon -= 360.0;
00967 printf (" %05.1f", lon);
00968 }
00969 lat = -52.5;
00970 lim = 50.0;
00971 for (loncm = -lim; loncm <= lim; loncm += 12.5) {
00972 lon = clon + loncm;
00973 while (lon < 0.0) lon += 360.0;
00974 while (lon >= 360.0) lon -= 360.0;
00975 printf (" %05.1f", lon);
00976 }
00977 lim = 60.0;
00978 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
00979 for (loncm = -lim; loncm <= lim; loncm += 10.0) {
00980 lon = clon + loncm;
00981 while (lon < 0.0) lon += 360.0;
00982 while (lon >= 360.0) lon -= 360.0;
00983 printf (" %05.1f", lon);
00984 }
00985 }
00986 lim = 67.5;
00987 for (lat = -30.0; lat <= 7.5; lat += 7.5) {
00988 for (loncm = -lim; loncm <= lim; loncm += 7.5) {
00989 lon = clon + loncm;
00990 while (lon < 0.0) lon += 360.0;
00991 while (lon >= 360.0) lon -= 360.0;
00992 printf (" %05.1f", lon);
00993 }
00994 }
00995 lim = 75.0;
00996 for (lat = 15.0; lat <= 30.0; lat += 7.5) {
00997 for (loncm = -lim; loncm <= lim; loncm += 7.5) {
00998 lon = clon + loncm;
00999 while (lon < 0.0) lon += 360.0;
01000 while (lon >= 360.0) lon -= 360.0;
01001 printf (" %05.1f", lon);
01002 }
01003 }
01004 lim = 70.0;
01005 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01006 for (loncm = -lim; loncm <= lim; loncm += 10.0) {
01007 lon = clon + loncm;
01008 while (lon < 0.0) lon += 360.0;
01009 while (lon >= 360.0) lon -= 360.0;
01010 printf (" %05.1f", lon);
01011 }
01012 }
01013 lat = 52.5;
01014 lim = 75.0;
01015 for (loncm = -lim; loncm <= lim; loncm += 12.5) {
01016 lon = clon + loncm;
01017 while (lon < 0.0) lon += 360.0;
01018 while (lon >= 360.0) lon -= 360.0;
01019 printf (" %05.1f", lon);
01020 }
01021 lat = 60.0;
01022 lim = 75.0;
01023 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
01024 lon = clon + loncm;
01025 while (lon < 0.0) lon += 360.0;
01026 while (lon >= 360.0) lon -= 360.0;
01027 printf (" %05.1f", lon);
01028 }
01029 lat = 67.5;
01030 lim = 60.0;
01031 for (loncm = -lim; loncm <= lim; loncm += 20.0) {
01032 lon = clon + loncm;
01033 while (lon < 0.0) lon += 360.0;
01034 while (lon >= 360.0) lon -= 360.0;
01035 printf (" %05.1f", lon);
01036 }
01037 lat = 75.0;
01038 printf (" %05.1f", clon);
01039 printf ("\n");
01040 if (radial) {
01041
01042 lat = -67.5;
01043 lim = 20.0;
01044 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01045 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01046 lat = -60.0;
01047 lim = 45.0;
01048 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01049 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01050 lat = -52.5;
01051 lim = 50.0;
01052 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01053 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01054 lim = 60.0;
01055 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
01056 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01057 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01058 }
01059 lim = 67.5;
01060 for (lat = -30.0; lat <= 7.5; lat += 7.5) {
01061 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01062 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01063 }
01064 lim = 75.0;
01065 for (lat = 15.0; lat <= 30.0; lat += 7.5) {
01066 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01067 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01068 }
01069 lim = 70.0;
01070 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01071 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01072 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01073 }
01074 lat = 52.5;
01075 lim = 75.0;
01076 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01077 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01078 lat = 60.0;
01079 lim = 75.0;
01080 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01081 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01082 lat = 67.5;
01083 lim = 60.0;
01084 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01085 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01086 lat = 75.0;
01087 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01088 printf ("\n");
01089
01090 lat = -67.5;
01091 lim = 20.0;
01092 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01093 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01094 lat = -60.0;
01095 lim = 45.0;
01096 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01097 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01098 lat = -52.5;
01099 lim = 50.0;
01100 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01101 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01102 lim = 60.0;
01103 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
01104 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01105 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01106 }
01107 lim = 67.5;
01108 for (lat = -30.0; lat <= 7.5; lat += 7.5) {
01109 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01110 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01111 }
01112 lim = 75.0;
01113 for (lat = 15.0; lat <= 30.0; lat += 7.5) {
01114 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01115 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01116 }
01117 lim = 70.0;
01118 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01119 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01120 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01121 }
01122 lat = 52.5;
01123 lim = 75.0;
01124 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01125 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01126 lat = 60.0;
01127 lim = 75.0;
01128 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01129 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01130 lat = 67.5;
01131 lim = 60.0;
01132 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01133 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01134 lat = 75.0;
01135 printf (" %05.1f", position_angle (lat, 0.0, b0, 0.0));
01136 printf ("\n");
01137 }
01138 } else {
01139
01140 lat = -67.5;
01141 lim = 40.0;
01142 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01143 printf (" %+05.1f", lat);
01144 lat = -60.0;
01145 lim = 60.0;
01146 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01147 printf (" %+05.1f", lat);
01148 lat = -52.5;
01149 lim = 62.5;
01150 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01151 printf (" %+05.1f", lat);
01152 lim = 70.0;
01153 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
01154 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01155 printf (" %+05.1f", lat);
01156 }
01157 lim = 67.5;
01158 for (lat = -30.0; lat <= 30.0; lat += 7.5) {
01159 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01160 printf (" %+05.1f", lat);
01161 }
01162 lim = 70.0;
01163 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01164 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01165 printf (" %+05.1f", lat);
01166 }
01167 lat = 52.5;
01168 lim = 62.5;
01169 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01170 printf (" %+05.1f", lat);
01171 lat = 60.0;
01172 lim = 60.0;
01173 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01174 printf (" %+05.1f", lat);
01175 lat = 67.5;
01176 lim = 40.0;
01177 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01178 printf (" %+05.1f", lat);
01179 printf ("\n");
01180
01181 lat = -67.5;
01182 lim = 40.0;
01183 for (loncm = -lim; loncm <= lim; loncm += 20.0) {
01184 lon = clon + loncm;
01185 while (lon < 0.0) lon += 360.0;
01186 while (lon >= 360.0) lon -= 360.0;
01187 printf (" %05.1f", lon);
01188 }
01189 lat = -60.0;
01190 lim = 60.0;
01191 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
01192 lon = clon + loncm;
01193 while (lon < 0.0) lon += 360.0;
01194 while (lon >= 360.0) lon -= 360.0;
01195 printf (" %05.1f", lon);
01196 }
01197 lat = -52.5;
01198 lim = 62.5;
01199 for (loncm = -lim; loncm <= lim; loncm += 12.5) {
01200 lon = clon + loncm;
01201 while (lon < 0.0) lon += 360.0;
01202 while (lon >= 360.0) lon -= 360.0;
01203 printf (" %05.1f", lon);
01204 }
01205 lim = 70.0;
01206 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
01207 for (loncm = -lim; loncm <= lim; loncm += 10.0) {
01208 lon = clon + loncm;
01209 while (lon < 0.0) lon += 360.0;
01210 while (lon >= 360.0) lon -= 360.0;
01211 printf (" %05.1f", lon);
01212 }
01213 }
01214 lim = 67.5;
01215 for (lat = -30.0; lat <= 30.0; lat += 7.5) {
01216 for (loncm = -lim; loncm <= lim; loncm += 7.5) {
01217 lon = clon + loncm;
01218 while (lon < 0.0) lon += 360.0;
01219 while (lon >= 360.0) lon -= 360.0;
01220 printf (" %05.1f", lon);
01221 }
01222 }
01223 lim = 70.0;
01224 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01225 for (loncm = -lim; loncm <= lim; loncm += 10.0) {
01226 lon = clon + loncm;
01227 while (lon < 0.0) lon += 360.0;
01228 while (lon >= 360.0) lon -= 360.0;
01229 printf (" %05.1f", lon);
01230 }
01231 }
01232 lat = 52.5;
01233 lim = 62.5;
01234 for (loncm = -lim; loncm <= lim; loncm += 12.5) {
01235 lon = clon + loncm;
01236 while (lon < 0.0) lon += 360.0;
01237 while (lon >= 360.0) lon -= 360.0;
01238 printf (" %05.1f", lon);
01239 }
01240 lat = 60.0;
01241 lim = 60.0;
01242 for (loncm = -lim; loncm <= lim; loncm += 15.0) {
01243 lon = clon + loncm;
01244 while (lon < 0.0) lon += 360.0;
01245 while (lon >= 360.0) lon -= 360.0;
01246 printf (" %05.1f", lon);
01247 }
01248 lat = 67.5;
01249 lim = 40.0;
01250 for (loncm = -lim; loncm <= lim; loncm += 20.0) {
01251 lon = clon + loncm;
01252 while (lon < 0.0) lon += 360.0;
01253 while (lon >= 360.0) lon -= 360.0;
01254 printf (" %05.1f", lon);
01255 }
01256 printf ("\n");
01257 if (radial) {
01258
01259 lat = -67.5;
01260 lim = 40.0;
01261 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01262 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01263 lat = -60.0;
01264 lim = 60.0;
01265 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01266 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01267 lat = -52.5;
01268 lim = 62.5;
01269 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01270 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01271 lim = 70.0;
01272 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
01273 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01274 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01275 }
01276 lim = 67.5;
01277 for (lat = -30.0; lat <= 30.0; lat += 7.5) {
01278 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01279 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01280 }
01281 lim = 70.0;
01282 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01283 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01284 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01285 }
01286 lat = 52.5;
01287 lim = 62.5;
01288 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01289 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01290 lat = 60.0;
01291 lim = 60.0;
01292 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01293 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01294 lat = 67.5;
01295 lim = 40.0;
01296 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01297 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01298 printf ("\n");
01299
01300 lat = -67.5;
01301 lim = 40.0;
01302 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01303 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01304 lat = -60.0;
01305 lim = 60.0;
01306 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01307 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01308 lat = -52.5;
01309 lim = 62.5;
01310 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01311 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01312 lim = 70.0;
01313 for (lat = -45.0; lat <= -37.5; lat += 7.5) {
01314 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01315 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01316 }
01317 lim = 67.5;
01318 for (lat = -30.0; lat <= 30.0; lat += 7.5) {
01319 for (loncm = -lim; loncm <= lim; loncm += 7.5)
01320 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01321 }
01322 lim = 70.0;
01323 for (lat = 37.5; lat <= 45.0; lat += 7.5) {
01324 for (loncm = -lim; loncm <= lim; loncm += 10.0)
01325 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01326 }
01327 lat = 52.5;
01328 lim = 62.5;
01329 for (loncm = -lim; loncm <= lim; loncm += 12.5)
01330 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01331 lat = 60.0;
01332 lim = 60.0;
01333 for (loncm = -lim; loncm <= lim; loncm += 15.0)
01334 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01335 lat = 67.5;
01336 lim = 40.0;
01337 for (loncm = -lim; loncm <= lim; loncm += 20.0)
01338 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01339 printf ("\n");
01340 }
01341 }
01342
01343 return 0;
01344 }
01345
01346 int hmi15_cm_list (double b0) {
01347 float lat, latmin, latmax;
01348
01349 latmin = -67.5;
01350 latmax = 67.5;
01351 if (b0 < -3.625) latmin = -75.0;
01352 if (b0 > 3.625) latmax = 75.0;
01353 for (lat = latmin; lat <= latmax; lat += 7.5) printf (" %+05.1f", lat);
01354 printf ("\n");
01355 return 0;
01356 }
01357
01358 int hmi15_eq_list (double clon, int stony) {
01359 float lon, loncm;
01360
01361 if (stony) {
01362 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5) printf (" %+05.1f", loncm);
01363 } else {
01364 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5) {
01365 lon = clon + loncm;
01366 while (lon < 0.0) lon += 360.0;
01367 while (lon >= 360.0) lon -= 360.0;
01368 printf (" %05.1f", lon);
01369 }
01370 }
01371 printf ("\n");
01372 return 0;
01373 }
01374
01375 int hmi15_stgrg_list (double clon, double b0, int stony, int radial) {
01376 float lat, latmin, latmax, lon, loncm;
01377
01378 latmin = -67.5;
01379 latmax = 67.5;
01380 if (b0 < -3.625) latmin = -75.0;
01381 if (b0 > 3.625) latmax = 75.0;
01382
01383 for (lat = latmin; lat < 0.0; lat += 7.5) printf (" %+05.1f", lat);
01384 lat = 0.0;
01385 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5) printf (" %+05.1f", lat);
01386 for (lat = 7.5; lat <= latmax; lat += 7.5) printf (" %+05.1f", lat);
01387 printf ("\n");
01388
01389 if (stony) {
01390 for (lat = latmin; lat < 0.0; lat += 7.5) printf (" %+05.1f", 0.0);
01391 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5) printf (" %+05.1f", loncm);
01392 for (lat = 7.5; lat <= latmax; lat += 7.5) printf (" %+05.1f", 0.0);
01393 } else {
01394 for (lat = latmin; lat < 0.0; lat += 7.5) printf (" %05.1f", clon);
01395 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5) {
01396 lon = clon + loncm;
01397 while (lon < 0.0) lon += 360.0;
01398 while (lon >= 360.0) lon -= 360.0;
01399 printf (" %05.1f", lon);
01400 }
01401 for (lat = 7.5; lat <= latmax; lat += 7.5) printf (" %05.1f", clon);
01402 }
01403 printf ("\n");
01404 if (radial) {
01405 for (lat = latmin; lat < 0.0; lat += 7.5)
01406 printf (" %05.2f", arc_distance (lat, 0.0, b0, 0.0));
01407 lat = 0.0;
01408 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5)
01409 printf (" %05.2f", arc_distance (lat, loncm, b0, 0.0));
01410 for (lat = 7.5; lat <= latmax; lat += 7.5)
01411 printf (" %05.2f", arc_distance (lat, 0.0, b0, 0.0));
01412 printf ("\n");
01413
01414 for (lat = latmin; lat < 0.0; lat += 7.5)
01415 printf (" %05.1f", position_angle (lat, 0.0, b0, 0.0));
01416 lat = 0.0;
01417 for (loncm = -67.5; loncm <= 67.5; loncm += 7.5)
01418 printf (" %05.1f", position_angle (lat, loncm, b0, 0.0));
01419 for (lat = 7.5; lat <= latmax; lat += 7.5)
01420 printf (" %05.1f", position_angle (lat, 0.0, b0, 0.0));
01421 printf ("\n");
01422 }
01423 return 0;
01424 }
01425
01426 int hmi5_pack_list (double clon, double b0) {
01427 float limit[X25_85N + 1], latv[X25_85N + 1], step[X25_85N + 1];
01428 float lat, lon, loncm, lim;
01429 int nlat;
01430
01431 for (nlat = X25_85S; nlat <= X25_85N; nlat++)
01432 latv[nlat] = -85.0 + 2.5 * nlat;
01433 for (nlat = X25_85S; nlat <= X25_75S; nlat++)
01434 step[nlat] = 10.0;
01435 for (nlat = X25_725S; nlat <= X25_675S; nlat++)
01436 step[nlat] = 7.5;
01437 for (nlat = X25_65S; nlat <= X25_425S; nlat++)
01438 step[nlat] = 5.0;
01439 for (nlat = X25_40S; nlat <= X25_40N; nlat++)
01440 step[nlat] = 2.5;
01441 for (nlat = X25_425N; nlat <= X25_65N; nlat++)
01442 step[nlat] = 5.0;
01443 for (nlat = X25_675N; nlat <= X25_725N; nlat++)
01444 step[nlat] = 7.5;
01445 for (nlat = X25_75N; nlat <= X25_85N; nlat++)
01446 step[nlat] = 10.0;
01447
01448 if (b0 < -3.625) {
01449 limit[X25_85S] = 50.0;
01450 for (nlat = X25_825S; nlat <= X25_75S; nlat++)
01451 limit[nlat] = 70.0;
01452 for (nlat = X25_725S; nlat <= X25_425S; nlat++)
01453 limit[nlat] = 75.0;
01454 for (nlat = X25_40S; nlat <= X25_125S; nlat++)
01455 limit[nlat] = 80.0;
01456 for (nlat = X25_10S; nlat <= X25_075N; nlat++)
01457 limit[nlat] = 77.5;
01458 for (nlat = X25_10N; nlat <= X25_20N; nlat++)
01459 limit[nlat] = 75.0;
01460 for (nlat = X25_225N; nlat <= X25_30N; nlat++)
01461 limit[nlat] = 72.5;
01462 for (nlat = X25_325N; nlat <= X25_375N; nlat++)
01463 limit[nlat] = 70.0;
01464 limit[X25_40N] = 67.5;
01465 limit[X25_425N] = 65.0;
01466 for (nlat = X25_45N; nlat <= X25_55N; nlat++)
01467 limit[nlat] = 60.0;
01468 limit[X25_575N] = 55.0;
01469 for (nlat = X25_60N; nlat <= X25_625N; nlat++)
01470 limit[nlat] = 50.0;
01471 limit[X25_65N] = 40.0;
01472 limit[X25_675N] = 30.0;
01473 limit[X25_70N] = 22.5;
01474 limit[X25_725N] = 7.5;
01475 for (nlat = X25_75N; nlat <= X25_85N; nlat++)
01476 limit[nlat] = -1;
01477 } else if (b0 > 3.625) {
01478 for (nlat = X25_85S; nlat <= X25_75S; nlat++)
01479 limit[nlat] = -1;
01480 limit[X25_725S] = 7.5;
01481 limit[X25_70S] = 22.5;
01482 limit[X25_675S] = 30.0;
01483 limit[X25_65S] = 40.0;
01484 for (nlat = X25_625S; nlat <= X25_60S; nlat++)
01485 limit[nlat] = 50.0;
01486 limit[X25_575S] = 55.0;
01487 for (nlat = X25_55S; nlat <= X25_45S; nlat++)
01488 limit[nlat] = 60.0;
01489 limit[X25_425S] = 65.0;
01490 limit[X25_40S] = 67.5;
01491 for (nlat = X25_375S; nlat <= X25_325S; nlat++)
01492 limit[nlat] = 70.0;
01493 for (nlat = X25_30S; nlat <= X25_225S; nlat++)
01494 limit[nlat] = 72.5;
01495 for (nlat = X25_20S; nlat <= X25_10S; nlat++)
01496 limit[nlat] = 75.0;
01497 for (nlat = X25_075S; nlat <= X25_10N; nlat++)
01498 limit[nlat] = 77.5;
01499 for (nlat = X25_125N; nlat <= X25_40N; nlat++)
01500 limit[nlat] = 80.0;
01501 for (nlat = X25_425N; nlat <= X25_725N; nlat++)
01502 limit[nlat] = 75.0;
01503 for (nlat = X25_75N; nlat <= X25_825N; nlat++)
01504 limit[nlat] = 70.0;
01505 limit[X25_85N] = 50.0;
01506 } else {
01507 for (nlat = X25_85S; nlat <= X25_825S; nlat++)
01508 limit[nlat] = -1;
01509 limit[X25_80S] = limit[X25_80N] = 0.0;
01510 limit[X25_775S] = limit[X25_775N] = 30.0;
01511 limit[X25_75S] = limit[X25_75N] = 40.0;
01512 limit[X25_725S] = limit[X25_725N] = 45.0;
01513 for (nlat = X25_70S; nlat <= X25_675S; nlat++)
01514 limit[nlat] = 52.5;
01515 limit[X25_65S] = limit[X25_65N] = 60.0;
01516 for (nlat = X25_625S; nlat <= X25_525S; nlat++)
01517 limit[nlat] = 65.0;
01518 for (nlat = X25_50S; nlat <= X25_425S; nlat++)
01519 limit[nlat] = 70.0;
01520 for (nlat = X25_40S; nlat <= X25_275S; nlat++)
01521 limit[nlat] = 75.0;
01522 for (nlat = X25_25S; nlat <= X25_25N; nlat++)
01523 limit[nlat] = 77.5;
01524 for (nlat = X25_275N; nlat <= X25_40N; nlat++)
01525 limit[nlat] = 75.0;
01526 for (nlat = X25_425N; nlat <= X25_50N; nlat++)
01527 limit[nlat] = 70.0;
01528 for (nlat = X25_525N; nlat <= X25_625N; nlat++)
01529 limit[nlat] = 65.0;
01530 for (nlat = X25_675N; nlat <= X25_70N; nlat++)
01531 limit[nlat] = 52.5;
01532 for (nlat = X25_825N; nlat <= X25_85N; nlat++)
01533 limit[nlat] = -1;
01534 }
01535
01536 for (nlat = X25_85S; nlat <= X25_55S; nlat++) {
01537 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01538 printf (" %+05.1f", latv[nlat]);
01539 }
01540 printf ("\n");
01541 for (nlat = X25_85S; nlat <= X25_55S; nlat++) {
01542 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01543 lon = clon + loncm;
01544 while (lon < 0.0) lon += 360.0;
01545 while (lon >= 360.0) lon -= 360.0;
01546 printf (" %05.1f", lon);
01547 }
01548 }
01549 printf ("\n");
01550
01551
01552 for (nlat = X25_525S; nlat <= X25_40S; nlat++) {
01553 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01554 printf (" %+05.1f", latv[nlat]);
01555 }
01556 printf ("\n");
01557 for (nlat = X25_525S; nlat <= X25_40S; nlat++) {
01558 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01559 lon = clon + loncm;
01560 while (lon < 0.0) lon += 360.0;
01561 while (lon >= 360.0) lon -= 360.0;
01562 printf (" %05.1f", lon);
01563 }
01564 }
01565 printf ("\n");
01566
01567 for (nlat = X25_375S; nlat <= X25_30S; nlat++) {
01568 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01569 printf (" %+05.1f", latv[nlat]);
01570 }
01571 printf ("\n");
01572 for (nlat = X25_375S; nlat <= X25_30S; nlat++) {
01573 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01574 lon = clon + loncm;
01575 while (lon < 0.0) lon += 360.0;
01576 while (lon >= 360.0) lon -= 360.0;
01577 printf (" %05.1f", lon);
01578 }
01579 }
01580 printf ("\n");
01581
01582 for (nlat = X25_275S; nlat <= X25_20S; nlat++) {
01583 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01584 printf (" %+05.1f", latv[nlat]);
01585 }
01586 printf ("\n");
01587 for (nlat = X25_275S; nlat <= X25_20S; nlat++) {
01588 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01589 lon = clon + loncm;
01590 while (lon < 0.0) lon += 360.0;
01591 while (lon >= 360.0) lon -= 360.0;
01592 printf (" %05.1f", lon);
01593 }
01594 }
01595 printf ("\n");
01596
01597 for (nlat = X25_175S; nlat <= X25_10S; nlat++) {
01598 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01599 printf (" %+05.1f", latv[nlat]);
01600 }
01601 printf ("\n");
01602 for (nlat = X25_175S; nlat <= X25_10S; nlat++) {
01603 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01604 lon = clon + loncm;
01605 while (lon < 0.0) lon += 360.0;
01606 while (lon >= 360.0) lon -= 360.0;
01607 printf (" %05.1f", lon);
01608 }
01609 }
01610 printf ("\n");
01611
01612 for (nlat = X25_075S; nlat <= X25_05S; nlat++) {
01613 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01614 printf (" %+05.1f", latv[nlat]);
01615 }
01616 printf ("\n");
01617 for (nlat = X25_075S; nlat <= X25_05S; nlat++) {
01618 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01619 lon = clon + loncm;
01620 while (lon < 0.0) lon += 360.0;
01621 while (lon >= 360.0) lon -= 360.0;
01622 printf (" %05.1f", lon);
01623 }
01624 }
01625 printf ("\n");
01626
01627 for (nlat = X25_025S; nlat <= X25_025N; nlat++) {
01628 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01629 printf (" %+05.1f", latv[nlat]);
01630 }
01631 printf ("\n");
01632 for (nlat = X25_025S; nlat <= X25_025N; nlat++) {
01633 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01634 lon = clon + loncm;
01635 while (lon < 0.0) lon += 360.0;
01636 while (lon >= 360.0) lon -= 360.0;
01637 printf (" %05.1f", lon);
01638 }
01639 }
01640 printf ("\n");
01641
01642 for (nlat = X25_05N; nlat <= X25_075N; nlat++) {
01643 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01644 printf (" %+05.1f", latv[nlat]);
01645 }
01646 printf ("\n");
01647 for (nlat = X25_05N; nlat <= X25_075N; nlat++) {
01648 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01649 lon = clon + loncm;
01650 while (lon < 0.0) lon += 360.0;
01651 while (lon >= 360.0) lon -= 360.0;
01652 printf (" %05.1f", lon);
01653 }
01654 }
01655 printf ("\n");
01656
01657 for (nlat = X25_10N; nlat <= X25_175N; nlat++) {
01658 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01659 printf (" %+05.1f", latv[nlat]);
01660 }
01661 printf ("\n");
01662 for (nlat = X25_10N; nlat <= X25_175N; nlat++) {
01663 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01664 lon = clon + loncm;
01665 while (lon < 0.0) lon += 360.0;
01666 while (lon >= 360.0) lon -= 360.0;
01667 printf (" %05.1f", lon);
01668 }
01669 }
01670 printf ("\n");
01671
01672 for (nlat = X25_20N; nlat <= X25_275N; nlat++) {
01673 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01674 printf (" %+05.1f", latv[nlat]);
01675 }
01676 printf ("\n");
01677 for (nlat = X25_20N; nlat <= X25_275N; nlat++) {
01678 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01679 lon = clon + loncm;
01680 while (lon < 0.0) lon += 360.0;
01681 while (lon >= 360.0) lon -= 360.0;
01682 printf (" %05.1f", lon);
01683 }
01684 }
01685 printf ("\n");
01686
01687 for (nlat = X25_30N; nlat <= X25_375N; nlat++) {
01688 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01689 printf (" %+05.1f", latv[nlat]);
01690 }
01691 printf ("\n");
01692 for (nlat = X25_30N; nlat <= X25_375N; nlat++) {
01693 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01694 lon = clon + loncm;
01695 while (lon < 0.0) lon += 360.0;
01696 while (lon >= 360.0) lon -= 360.0;
01697 printf (" %05.1f", lon);
01698 }
01699 }
01700 printf ("\n");
01701
01702 for (nlat = X25_40N; nlat <= X25_525N; nlat++) {
01703 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01704 printf (" %+05.1f", latv[nlat]);
01705 }
01706 printf ("\n");
01707 for (nlat = X25_40N; nlat <= X25_525N; nlat++) {
01708 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01709 lon = clon + loncm;
01710 while (lon < 0.0) lon += 360.0;
01711 while (lon >= 360.0) lon -= 360.0;
01712 printf (" %05.1f", lon);
01713 }
01714 }
01715 printf ("\n");
01716
01717 for (nlat = X25_55N; nlat <= X25_85N; nlat++) {
01718 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat])
01719 printf (" %+05.1f", latv[nlat]);
01720 }
01721 printf ("\n");
01722 for (nlat = X25_55N; nlat <= X25_85N; nlat++) {
01723 for (loncm = -limit[nlat]; loncm <= limit[nlat]; loncm += step[nlat]) {
01724 lon = clon + loncm;
01725 while (lon < 0.0) lon += 360.0;
01726 while (lon >= 360.0) lon -= 360.0;
01727 printf (" %05.1f", lon);
01728 }
01729 }
01730 printf ("\n");
01731
01732
01733 return 0;
01734 }
01735
01736 int hmi5_cm_list (double b0) {
01737 float lat, latmin, latmax;
01738
01739 latmin = -67.5;
01740 latmax = 67.5;
01741 if (b0 < -3.625) {
01742 latmin = -85.0;
01743 latmax = 72.5;
01744 } else if (b0 > 3.625) {
01745 latmin = -72.5;
01746 latmax = 85.0;
01747 } else {
01748 latmin = -80.0;
01749 latmax = 80.0;
01750 }
01751 for (lat = latmin; lat <= latmax; lat += 2.5) printf (" %+05.1f", lat);
01752 printf ("\n");
01753 return 0;
01754 }
01755
01756 int hmi5_eq_list (double clon, int stony) {
01757 float lon, loncm;
01758
01759 if (stony) {
01760 for (loncm = -77.5; loncm <= 77.5; loncm += 2.5) printf (" %+05.1f", loncm);
01761 } else {
01762 for (loncm = -77.5; loncm <= 77.5; loncm += 2.5) {
01763 lon = clon + loncm;
01764 while (lon < 0.0) lon += 360.0;
01765 while (lon >= 360.0) lon -= 360.0;
01766 printf (" %05.1f", lon);
01767 }
01768 }
01769 printf ("\n");
01770 return 0;
01771 }
01772
01773 int hmi5_stgrg_list (double clon, double b0, int stony) {
01774 float lat, latmin, latmax, lon, loncm;
01775
01776 latmin = -67.5;
01777 latmax = 67.5;
01778 if (b0 < -3.625) {
01779 latmin = -85.0;
01780 latmax = 72.5;
01781 } else if (b0 > 3.625) {
01782 latmin = -72.5;
01783 latmax = 85.0;
01784 } else {
01785 latmin = -80.0;
01786 latmax = 80.0;
01787 }
01788
01789 for (lat = latmin; lat < 0.0; lat += 2.5) printf (" %+05.1f", lat);
01790 lat = 0.0;
01791 for (loncm = -77.5; loncm <= 77.5; loncm += 2.5) printf (" %+05.1f", lat);
01792 for (lat = 2.5; lat <= latmax; lat += 2.5) printf (" %+05.1f", lat);
01793 printf ("\n");
01794
01795 if (stony) {
01796 for (lat = latmin; lat < 0.0; lat += 2.5) printf (" %+05.1f", 0.0);
01797 for (loncm = -77.5; loncm <= 77.5; loncm += 2.5) printf (" %+05.1f", loncm);
01798 for (lat = 2.5; lat <= latmax; lat += 2.5) printf (" %+05.1f", 0.0);
01799 } else {
01800 for (lat = latmin; lat < 0.0; lat += 2.5) printf (" %05.1f", clon);
01801 for (loncm = -77.5; loncm <= 77.5; loncm += 2.5) {
01802 lon = clon + loncm;
01803 while (lon < 0.0) lon += 360.0;
01804 while (lon >= 360.0) lon -= 360.0;
01805 printf (" %05.1f", lon);
01806 }
01807 for (lat = 2.5; lat <= latmax; lat += 2.5) printf (" %05.1f", clon);
01808 }
01809 printf ("\n");
01810 return 0;
01811 }
01812
01813 void hmi_transit_list (int size, float *lat, int *trlat, int latct, float clon,
01814 int lonspan, int ct) {
01815 float lonmax, lonmin;
01816 int n;
01817
01818 lonmax = clon + 0.5 * lonspan;
01819 lonmin = clon - 0.5 * lonspan;
01820 while (lonmax > 360.0) lonmax -= 360.0;
01821 while (lonmin < 0.0) lonmin += 360.0;
01822 printf ("%d %.2f %.2f %d", size, lonmax, lonmin, ct);
01823 for (n = 0; n < latct; n++) {
01824 if (trlat[n] == lonspan) printf (" %+05.1f", lat[n]);
01825 }
01826 printf ("\n");
01827 }
01828
01829 int main (int argc, char **argv) {
01830 ModuleArgs_t *arg = module_args;
01831 CmdParams_t *params = &cmdparams;
01832 TIME modt;
01833 double ephem[EPHEM_SIZE];
01834 double b0, cl;
01835 double au, vr, vn, vw;
01836 double degrad = 180.0 / M_PI;
01837 float lat25[L25_825N + 1], lat75[L75_75N + 1], lat150[L150_60N + 1];
01838 int trlat25[L25_825N + 1], trlat75[L75_75N + 1], trlat150[L150_60N + 1];
01839 int ct[181];
01840 int cr, latct, lonspc, lonstp, n, nmin, nmax;
01841 int dosp25 = 0, dosp75 = 0, dosp150 = 0;
01842 char tbuf[64];
01843 enum grid_choice {DISCROSS, RD_SYN05, RD_SYN15, RD_SYN30, TD_SYN20, TD_SYN24,
01844 TD_SYN24PLUS, MDI_DP, MDI_SP, RD_PLUS05, RD_PLUS15, RD_PLUS30,
01845 RD_X05, RD_X15, RD_X30, RD_CM05, RD_CM15, RD_CM30, RD_EQ05, RD_EQ15,
01846 RD_EQ30, TARGETS, LAST_CHOICE};
01847 int trackct = 0, track5ct = 0, track16ct = 0, track32ct = 0;
01848
01849 int status = cmdparams_parse (params, argc, argv);
01850 if (status == CMDPARAMS_QUERYMODE) {
01851 cmdparams_usage (argv[0]);
01852 return 0;
01853 } else if (status == CMDPARAMS_NODEFAULT) {
01854 fprintf (stderr, "For usage, type %s [-H|--help]\n", argv[0]);
01855 return 0;
01856 } else if (status < 0) {
01857 fprintf (stderr, "Error: Command line parsing failed. Aborting.\n");
01858 fprintf (stderr, "For usage, type %s [-H|--help]\n", argv[0]);
01859 return 1;
01860 }
01861
01862 TIME tmid = params_get_time (params, "time");
01863 int target_grid = params_get_int (params, "grid");
01864 int relB0 = cmdparams_isflagset (params, "B");
01865 int formdi = cmdparams_isflagset (params, "M");
01866 int stony = cmdparams_isflagset (params, "c");
01867 int radial = cmdparams_isflagset (params, "r");
01868 int verbose = cmdparams_isflagset (params, "v");
01869 char *tstr = strdup (params_get_str (params, "time"));
01870
01871 int do_dense_pack = target_grid == MDI_DP;
01872 int do_struc_pack = target_grid == MDI_SP;
01873 int do_hmi30_pack = target_grid == RD_SYN30;
01874 int do_hmi15_pack = target_grid == RD_SYN15;
01875 int do_hmi5_pack = target_grid == RD_SYN05;
01876 int do_timed_grid20 = target_grid == TD_SYN20;
01877 int do_timed_grid24 = target_grid == TD_SYN24;
01878 int do_timed_grid24p = target_grid == TD_SYN24PLUS;
01879 int do_cm30 = target_grid == RD_CM30;
01880 int do_cm15 = target_grid == RD_CM15;
01881 int do_cm05 = target_grid == RD_CM05;
01882 int do_eq30 = target_grid == RD_EQ30;
01883 int do_eq15 = target_grid == RD_EQ15;
01884 int do_eq05 = target_grid == RD_EQ05;
01885 int do_stgrg30 = target_grid == RD_PLUS30;
01886 int do_stgrg15 = target_grid == RD_PLUS15;
01887 int do_stgrg05 = target_grid == RD_PLUS05;
01888 int do_stand30 = target_grid == RD_X30;
01889 int do_stand15 = target_grid == RD_X15;
01890 int do_stand05 = target_grid == RD_X05;
01891
01892 if (radial) {
01893 if (do_dense_pack || do_struc_pack || do_hmi5_pack || do_timed_grid20 ||
01894 do_timed_grid24 || do_timed_grid24p || do_cm30 || do_cm15 || do_cm05 ||
01895 do_eq30 || do_eq15 || do_eq05 || do_stgrg05) {
01896 fprintf (stderr,
01897 "radial distance and angle reporting not implemented for this target list\n");
01898 return (1);
01899 }
01900 }
01901
01902 lonstp = (do_dense_pack || do_struc_pack || do_hmi15_pack|| do_cm15 || do_eq15) ? 150 :
01903 (do_hmi30_pack|| do_eq30 || do_cm30) ? 300 : \
01904 (do_timed_grid20 || do_timed_grid24 || do_timed_grid24p) ? 1 : 25;
01905
01906 if (sscanf (tstr, "%d:%lf", &cr, &cl) != 2) {
01907
01908 if (sscanf (tstr, "CT%lf", &cl) != 1) {
01909
01910 if (time_is_invalid (tmid)) {
01911 if (strcmp (tstr, "now-120deg")) {
01912 printf ("unrecognized time \"%s\"\n", tstr);
01913 return 1;
01914 }
01915
01916 tmid = CURRENT_SYSTEM_TIME;
01917 if (verbose)
01918 fprintf (stderr, "finding time corresponding to 120 deg in past: ");
01919 sprint_time (tbuf, tmid, "Z", -1);
01920 if (formdi) {
01921 sprint_time (tbuf, tmid, "Z", -1);
01922 fprintf (stderr, "\nWarning: requested time %s outside range of SOHO ephemris\n",
01923 tbuf);
01924 } else {
01925 calc_sun_ephemeris (tmid, ephem, 0.0, 0.0);
01926 cl = 360.0 - fmod (ephem[EPHEM_L0], 360.0);
01927 }
01928 cr = carrington_rots (tmid, formdi);
01929 cl += 120.0;
01930 if (cl >= 360.0) {
01931 cl -= 360.0;
01932 cr--;
01933 }
01934 if (verbose) fprintf (stderr, "%d:%05.1f\n", cr, cl);
01935 }
01936 } else {
01937
01938 cr = cl;
01939 cl = 360.0 * (1.0 + cr - cl);
01940
01941 tmid = (formdi) ? SOHO_meridian_crossing (cl, cr) :
01942 earth_meridian_crossing (cl, cr);
01943 if (verbose) {
01944 sprint_time (tbuf, tmid, "Z", -1);
01945 fprintf (stderr, "requested crossing occurs at %s\n", tbuf);
01946 }
01947 }
01948 } else {
01949
01950 tmid = (formdi) ? SOHO_meridian_crossing (cl, cr) :
01951 earth_meridian_crossing (cl, cr);
01952 if (verbose) {
01953 sprint_time (tbuf, tmid, "Z", -1);
01954 fprintf (stderr, "requested crossing occurs at %s\n", tbuf);
01955 }
01956 }
01957 if (formdi) soho_ephemeris (tmid, &au, &b0, &cl, &vr, &vn, &vw, &modt);
01958 else {
01959 calc_sun_ephemeris (tmid, ephem, 0.0, 0.0);
01960 cl = 360.0 - fmod (ephem[EPHEM_L0], 360.0);
01961 b0 = degrad * ephem[EPHEM_B0];
01962 }
01963 cr = carrington_rots (tmid, formdi);
01964
01965 lonspc = 10.0 * (cl + 0.05 * lonstp);
01966 if (lonspc % lonstp > 0) lonspc -= lonspc % lonstp;
01967 cl = 0.1 * lonspc;
01968 if (cl >= 360.0) {
01969 cl -= 360.0;
01970 cr--;
01971 }
01972
01973 if (do_dense_pack) return dense_pack_list (cl);
01974 if (do_struc_pack) return struc_pack_list (cl);
01975 if (do_hmi30_pack) return hmi30_pack_list (cl, b0, radial);
01976 if (do_hmi15_pack) return hmi15_pack_list (cl, b0, radial);
01977 if (do_hmi5_pack) return hmi5_pack_list (cl, b0);
01978 if (do_timed_grid20) return (relB0) ? timed_grid_list (cl, b0, 20.0, stony) :
01979 timed_grid_list (cl, 0.0, 20.0, stony);
01980 if (do_timed_grid24) return (relB0) ? timed_grid_list (cl, b0, 24.0, stony) :
01981 timed_grid_list (cl, 0.0, 24.0, stony);
01982 if (do_timed_grid24p) return (relB0) ? timed_grid_list_plus (cl, b0, stony) :
01983 timed_grid_list_plus (cl, 0.0, stony);
01984 if (do_cm30) return hmi30_cm_list ();
01985 if (do_cm15) return hmi15_cm_list (b0);
01986 if (do_cm05) return hmi5_cm_list (b0);
01987 if (do_eq30) return hmi30_eq_list (cl, stony);
01988 if (do_eq15) return hmi15_eq_list (cl, stony);
01989 if (do_eq05) return hmi5_eq_list (cl, stony);
01990 if (do_stgrg30) return hmi30_stgrg_list (cl, b0, stony, radial);
01991 if (do_stgrg15) return hmi15_stgrg_list (cl, b0, stony, radial);
01992 if (do_stgrg05) return hmi5_stgrg_list (cl, b0, stony);
01993 if (do_stand30) return hmi30_stand_list (cl, b0, stony, radial);
01994 if (do_stand15 || do_stand05) {
01995 fprintf (stderr, "Error: selected grid option is unimplemented\n");
01996 return 1;
01997 }
01998
01999 if (verbose) {
02000 fprintf (stderr, "target time adjusted to %d:%05.1f ", cr, cl);
02001 sprint_time (tbuf, tmid, "Z", -1);
02002 fprintf (stderr, ": %s, B0 = %.3f\n", tbuf, b0);
02003 }
02004
02005 for (n = L25_825S; n <= L25_825N; n++) {
02006 trlat25[n] = 0;
02007 lat25[n] = -82.5 + n * 2.5;
02008 }
02009 for (n = L75_75S; n <= L75_75N; n++) {
02010 trlat75[n] = 0;
02011 lat75[n] = -75.0 + n * 7.5;
02012 }
02013 for (n = L150_60S; n <= L150_60N; n++) {
02014 trlat150[n] = 0;
02015 lat150[n] = -60.0 + n * 15;
02016 }
02017
02018 if (lonspc % 450 == 0) {
02019
02020 dosp75 = 1;
02021 if (b0 < -3.625) trlat75[L75_75S] = 90;
02022 else if (b0 > 3.625) trlat75[L75_75N] = 90;
02023 }
02024 if (lonspc % 300 == 0) {
02025
02026 dosp150 = 1;
02027 if (b0 < -3.625) trlat150[L150_60S] = 100;
02028 else if (b0 <= 3.625) trlat150[L150_60S] = trlat150[L150_60N] = 65;
02029 else trlat150[L150_60N] = 100;
02030 }
02031 if (lonspc % 200 == 0) {
02032
02033 dosp75 = 1;
02034 if (b0 < -3.625) trlat75[L75_675S] = 120;
02035 else if (b0 <= 3.625) trlat75[L75_675S] = trlat75[L75_675N] = 75;
02036 else trlat75[L75_675N] = 120;
02037 }
02038 if (lonspc % 150 == 0) {
02039
02040 dosp150 = dosp75 = 1;
02041 trlat150[L150_000] = 130;
02042 if (b0 < -3.625) {
02043 trlat150[L150_15S] = 130;
02044 trlat150[L150_15N] = 120;
02045 trlat150[L150_30S] = 130;
02046 trlat150[L150_30N] = 110;
02047 trlat150[L150_45S] = 125;
02048 trlat150[L150_45N] = 85;
02049 trlat75[L75_60S] = 135;
02050 trlat75[L75_60N] = 70;
02051 } else if (b0 <= 3.625) {
02052 trlat150[L150_15S] = trlat150[L150_15N] = 130;
02053 trlat150[L150_30S] = trlat150[L150_30N] = 120;
02054 trlat150[L150_45S] = trlat150[L150_45N] = 105;
02055 trlat150[L150_60S] = trlat150[L150_60N] = 65;
02056 trlat75[L75_60S] = trlat75[L75_60N] = 105;
02057 } else {
02058 trlat150[L150_15N] = 130;
02059 trlat150[L150_15S] = 120;
02060 trlat150[L150_30N] = 130;
02061 trlat150[L150_30S] = 110;
02062 trlat150[L150_45N] = 125;
02063 trlat150[L150_45S] = 85;
02064 trlat75[L75_60N] = 135;
02065 trlat75[L75_60S] = 70;
02066 }
02067 }
02068 if (lonspc % 120 == 0) {
02069
02070 dosp75 = 1;
02071 if (b0 < -3.625) {
02072 trlat75[L75_525S] = 140;
02073 trlat75[L75_525N] = 95;
02074 } else if (b0 <= 3.625) {
02075 trlat75[L75_525S] = trlat75[L75_525N] = 120;
02076 } else {
02077 trlat75[L75_525S] = 95;
02078 trlat75[L75_525N] = 140;
02079 }
02080 }
02081 if (lonspc % 100 == 0) {
02082
02083 dosp75 = dosp25 = 1;
02084 if (b0 < -3.625) {
02085 trlat75[L75_45S] = trlat75[L75_375S] = 145;
02086 trlat75[L75_375N] = 120;
02087 trlat75[L75_45N] = 110;
02088 } else if (b0 <= 3.625) {
02089 trlat75[L75_45S] = trlat75[L75_45N] = 130;
02090 trlat75[L75_375S] = trlat75[L75_375N] = 135;
02091 } else {
02092 trlat75[L75_45S] = 110;
02093 trlat75[L75_375S] = 120;
02094 trlat75[L75_375N] = trlat75[L75_45N] = 145;
02095 }
02096
02097 if (b0 < -3.625) {
02098 trlat25[L25_825S] = 90;
02099 trlat25[L25_80S] = 115;
02100 trlat25[L25_775S] = 130;
02101 trlat25[L25_75S] = 135;
02102 } else if (b0 <= 3.625) {
02103 trlat25[L25_75S] = trlat25[L25_75N] = 65;
02104 } else {
02105 trlat25[L25_825N] = 90;
02106 trlat25[L25_80N] = 115;
02107 trlat25[L25_775N] = 130;
02108 trlat25[L25_75N] = 135;
02109 }
02110 }
02111 if (lonspc % 75 == 0) {
02112
02113 dosp75 = dosp25 = 1;
02114 for (n = L75_075S; n <= L75_075N; n++) trlat75[n] = 150;
02115 if (b0 < -3.625) {
02116 trlat75[L75_30S] = 145;
02117 trlat75[L75_225S] = 150;
02118 trlat75[L75_15S] = trlat75[L75_075S] = 145;
02119 trlat75[L75_000] = 145;
02120 trlat75[L75_075N] = trlat75[L75_15N] = 140;
02121 trlat75[L75_225N] = 135;
02122 trlat75[L75_30N] = 130;
02123 } else if (b0 <= 3.625) {
02124 for (n = L75_15S; n <= L75_15N; n++) trlat75[n] = 145;
02125 trlat75[L75_30S] = trlat75[L75_225S] = 140;
02126 trlat75[L75_225N] = trlat75[L75_30N] = 140;
02127 } else {
02128 trlat75[L75_30N] = 145;
02129 trlat75[L75_225N] = 150;
02130 trlat75[L75_15N] = trlat75[L75_075N] = 145;
02131 trlat75[L75_000] = 145;
02132 trlat75[L75_075S] = trlat75[L75_15S] = 140;
02133 trlat75[L75_225S] = 135;
02134 trlat75[L75_30S] = 130;
02135 }
02136
02137 if (b0 < -3.625) {
02138 trlat25[L25_725S] = 140;
02139 trlat25[L25_70S] = 145;
02140 trlat25[L25_675S] = 150;
02141 trlat25[L25_675N] = 55;
02142 trlat25[L25_70N] = 20;
02143 } else if (b0 <= 3.625) {
02144 trlat25[L25_725S] = trlat25[L25_725N] = 85;
02145 trlat25[L25_70S] = trlat25[L25_70N] = 100;
02146 trlat25[L25_675S] = trlat25[L25_675N] = 110;
02147 } else {
02148 trlat25[L25_70S] = 20;
02149 trlat25[L25_675S] = 55;
02150 trlat25[L25_675N] = 150;
02151 trlat25[L25_70N] = 145;
02152 trlat25[L25_725N] = 140;
02153 }
02154 }
02155 if (lonspc % 50 == 0) {
02156
02157 dosp25 = 1;
02158 if (b0 < -3.625) {
02159 trlat25[L25_65S] = 150;
02160 for (n = L25_625S; n <= L25_575S; n++) trlat25[n] = 155;
02161 for (n = L25_55S; n <= L25_425S; n++) trlat25[n] = 160;
02162 trlat25[L25_425N] = trlat25[L25_45N] = 130;
02163 trlat25[L25_475N] = 125;
02164 trlat25[L25_50N] = 120;
02165 trlat25[L25_525N] = 115;
02166 trlat25[L25_55N] = 110;
02167 trlat25[L25_575N] = 105;
02168 trlat25[L25_60N] = 95;
02169 trlat25[L25_625N] = 90;
02170 trlat25[L25_65N] = 75;
02171 } else if (b0 <= 3.625) {
02172 trlat25[L25_65S] = trlat25[L25_65N] = 120;
02173 trlat25[L25_625S] = trlat25[L25_625N] = 125;
02174 trlat25[L25_60S] = trlat25[L25_60N] = 130;
02175 trlat25[L25_575S] = trlat25[L25_575N] = 130;
02176 trlat25[L25_55S] = trlat25[L25_55N] = 135;
02177 for (n = L25_525S; n <= L25_475S; n++) trlat25[n] = 140;
02178 for (n = L25_45S; n <= L25_425S; n++) trlat25[n] = 145;
02179 for (n = L25_425N; n <= L25_425N; n++) trlat25[n] = 145;
02180 for (n = L25_475N; n <= L25_525N; n++) trlat25[n] = 140;
02181 } else {
02182 trlat25[L25_65S] = 75;
02183 trlat25[L25_625S] = 90;
02184 trlat25[L25_60S] = 95;
02185 trlat25[L25_575S] = 105;
02186 trlat25[L25_55S] = 110;
02187 trlat25[L25_525S] = 115;
02188 trlat25[L25_50S] = 120;
02189 trlat25[L25_475S] = 125;
02190 trlat25[L25_425S] = trlat25[L25_45S] = 130;
02191 for (n = L25_425N; n <= L25_55N; n++) trlat25[n] = 160;
02192 for (n = L25_575N; n <= L25_625N; n++) trlat25[n] = 155;
02193 trlat25[L25_65N] = 150;
02194 }
02195
02196
02197
02198 }
02199 if (lonspc % 25 == 0) {
02200
02201 dosp25 = 1;
02202 for (n = L25_05S; n <= L25_05N; n++) trlat25[n] = 155;
02203 if (b0 < -3.625) {
02204 for (n = L25_40S; n <= L25_175S; n++) trlat25[n] = 160;
02205 for (n = L25_15S; n <= L25_05N; n++) trlat25[n] = 155;
02206 for (n = L25_075N; n <= L25_175N; n++) trlat25[n] = 150;
02207 for (n = L25_20N; n <= L25_275N; n++) trlat25[n] = 145;
02208 for (n = L25_30N; n <= L25_35N; n++) trlat25[n] = 140;
02209 trlat25[L25_375N] = trlat25[L25_40N] = 135;
02210 } else if (b0 <= 3.625) {
02211 trlat25[L25_40S] = trlat25[L25_40N] = 145;
02212 for (n = L25_375S; n <= L25_225S; n++) trlat25[n] = 150;
02213 for (n = L25_20S; n <= L25_20N; n++) trlat25[n] = 155;
02214 for (n = L25_225N; n <= L25_375N; n++) trlat25[n] = 150;
02215 } else {
02216 for (n = L25_40N; n >= L25_175N; n--) trlat25[n] = 160;
02217 for (n = L25_15N; n >= L25_05S; n--) trlat25[n] = 155;
02218 for (n = L25_075S; n >= L25_175S; n--) trlat25[n] = 150;
02219 for (n = L25_20S; n >= L25_275S; n--) trlat25[n] = 145;
02220 for (n = L25_30S; n >= L25_35S; n--) trlat25[n] = 140;
02221 trlat25[L25_375S] = trlat25[L25_40S] = 135;
02222 }
02223 }
02224
02225 if (!dosp25 && !dosp75 && !dosp150) {
02226 fprintf (stderr, "requested longitude %.1f not on any standard cadence\n",
02227 cl);
02228 return 1;
02229 }
02230
02231 latct = L150_60N + 1;
02232 nmin = 180;
02233 nmax = 0;
02234 for (n = nmax; n <= nmin; n++) ct[n] = 0;
02235 for (n = 0; n < latct; n++) {
02236 if (trlat150[n]) {
02237 if (trlat150[n] < nmin) nmin = trlat150[n];
02238 if (trlat150[n] > nmax) nmax = trlat150[n];
02239 ct[trlat150[n]]++;
02240 }
02241 }
02242 for (n = nmin; n <= nmax; n++) {
02243 if (ct[n]) {
02244 hmi_transit_list (30, lat150, trlat150, latct, cl, n, ct[n]);
02245 trackct += ct[n];
02246 track32ct += ct[n];
02247 }
02248 }
02249
02250 latct = L75_75N + 1;
02251 nmin = 180;
02252 nmax = 0;
02253 for (n = nmax; n <= nmin; n++) ct[n] = 0;
02254 for (n = 0; n < latct; n++) {
02255 if (trlat75[n]) {
02256 if (trlat75[n] < nmin) nmin = trlat75[n];
02257 if (trlat75[n] > nmax) nmax = trlat75[n];
02258 ct[trlat75[n]]++;
02259 }
02260 }
02261 for (n = nmin; n <= nmax; n++) {
02262 if (ct[n]) {
02263 hmi_transit_list (15, lat75, trlat75, latct, cl, n, ct[n]);
02264 trackct += ct[n];
02265 track16ct += ct[n];
02266 }
02267 }
02268
02269 latct = L25_825N + 1;
02270 nmin = 180;
02271 nmax = 0;
02272 for (n = nmax; n <= nmin; n++) ct[n] = 0;
02273 for (n = 0; n < latct; n++) {
02274 if (trlat25[n]) {
02275 if (trlat25[n] < nmin) nmin = trlat25[n];
02276 if (trlat25[n] > nmax) nmax = trlat25[n];
02277 ct[trlat25[n]]++;
02278 }
02279 }
02280
02281 for (n = nmin; n <= nmax; n++) {
02282 if (ct[n]) {
02283 hmi_transit_list (5, lat25, trlat25, latct, cl, n, ct[n]);
02284 trackct += ct[n];
02285 track5ct += ct[n];
02286 }
02287 }
02288
02289 if (trackct && verbose)
02290 fprintf (stderr, "%d:%05.1f\t%3d %3d %3d\n", cr, cl, track32ct, track16ct,
02291 track5ct);
02292 return 0;
02293 }
02294
02295
02296
02297
02298
02299
02300
02301
02302
02303
02304
02305
02306
02307
02308
02309
02310
02311
02312
02313
02314
02315
02316
02317
02318
02319
02320
02321
02322
02323
02324
02325
02326
02327
02328
02329
02330
02331
02332
02333
02334
02335
02336
02337
02338
02339
02340
02341
02342
02343
02344
02345
02346
02347
02348
02349
02350