+ if (!strcmp(argv[i], "-h") || !strcmp(argv[i], "--help"))
+ usage();
+ else if (!strcmp(argv[i], "-v") || !strcmp(argv[i], "--verbose"))
+ verbose = true;
+ else if (!strcmp(argv[i], "-r") || !strcmp(argv[i], "--report"))
+ report = true;
+ else if (!strcmp(argv[i], "-c") || !strcmp(argv[i], "--command-line"))
+ report = false;
+ else if (!strcmp(argv[i], "-e") || !strcmp(argv[i], "--elevation")) {
+ if (++i >= argc) {
+ cerr << "-e option used without elevation" << endl;
+ return 1;
+ }
+ elevation = strtod(argv[i], 0);
+ } else {
+ static bool shown = false;
+ if (verbose && !shown) {
+ cerr << "Proxy host: '" << proxy_host << "'" << endl;
+ cerr << "Proxy port: '" << proxy_port << "'" << endl << endl;
+ shown = true;
+ }
+
+ try {
+ SGMetar *m = new SGMetar(argv[i], proxy_host, proxy_port, "", time(0));
+ //SGMetar *m = new SGMetar("2004/01/11 01:20\nLOWG 110120Z AUTO VRB01KT 0050 1600N R35/0600 FG M06/M06 Q1019 88//////\n");