1 // options.cxx -- class to handle command line options
3 // Written by Curtis Olson, started April 1998.
5 // Copyright (C) 1998 Curtis L. Olson - curt@me.umn.edu
7 // This program is free software; you can redistribute it and/or
8 // modify it under the terms of the GNU General Public License as
9 // published by the Free Software Foundation; either version 2 of the
10 // License, or (at your option) any later version.
12 // This program is distributed in the hope that it will be useful, but
13 // WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 // General Public License for more details.
17 // You should have received a copy of the GNU General Public License
18 // along with this program; if not, write to the Free Software
19 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28 #if defined(FX) && defined(XMESA)
29 bool global_fullscreen = true;
32 #include <simgear/compiler.h>
34 #include <math.h> // rint()
36 #include <stdlib.h> // atof(), atoi()
41 #include <simgear/constants.h>
42 #include <simgear/debug/logstream.hxx>
43 #include <simgear/misc/fgstream.hxx>
45 #include <Include/general.hxx>
46 #include <Cockpit/cockpit.hxx>
47 #include <FDM/flight.hxx>
49 # include <NetworkOLK/network.h>
51 #include <Time/fg_time.hxx>
54 #include "options.hxx"
57 FG_USING_NAMESPACE(std);
60 extern void fgReshape( int width, int height );
63 atof( const string& str )
67 // -dw- if ::atof is called, then we get an infinite loop
68 return std::atof( str.c_str() );
70 return ::atof( str.c_str() );
75 atoi( const string& str )
78 // -dw- if ::atoi is called, then we get an infinite loop
79 return std::atoi( str.c_str() );
81 return ::atoi( str.c_str() );
85 // Defined the shared options class here
86 fgOPTIONS current_options;
90 fgOPTIONS::fgOPTIONS() :
91 // starting longitude in degrees (west = -)
92 // starting latitude in degrees (south = -)
94 // Default initial position is Globe, AZ (P13)
98 // North of the city of Globe
102 // North of the city of Globe
106 // Near where I used to live in Globe, AZ
110 // 10125 Jewell St. NE
114 // Near KHSP (Hot Springs, VA)
115 // lon(-79.8338964 + 0.01),
116 // lat( 37.9514564 + 0.008),
118 // (SEZ) SEDONA airport
119 // lon(-111.7884614 + 0.01),
120 // lat( 34.8486289 - 0.015),
122 // Jim Brennon's Kingmont Observatory
123 // lon(-121.1131667),
126 // Huaras, Peru (S09d 31.871' W077d 31.498')
130 // Eclipse Watching w73.5 n10 (approx) 18:00 UT
135 // lon(-90.1953055556),
136 // lat( 45.4511388889),
138 // starting altitude in meters (this will be reset to ground level
139 // if it is lower than the terrain
142 // Initial Orientation
143 heading(270.0), // heading (yaw) angle in degress (Psi)
144 roll(0.0), // roll angle in degrees (Phi)
145 pitch(0.424), // pitch angle in degrees (Theta)
147 // Initialize current options velocities to 0.0
148 uBody(0.0), vBody(0.0), wBody(0.0),
156 control_mode(FG_JOYSTICK),
157 auto_coordination(FG_AUTO_COORD_NOT_SPECIFIED),
164 // Flight Model options
165 flight_model( FGInterface::FG_LARCSIM ),
167 model_hz( NEW_DEFAULT_MODEL_HZ ),
171 fog(FG_FOG_NICEST), // nicest
173 clouds_asl(5000*FEET_TO_METER),
182 view_mode(FG_VIEW_PILOT),
188 units(FG_UNITS_FEET),
196 // set initial values/defaults
197 time_offset_type=FG_TIME_SYS_OFFSET;
198 char* envp = ::getenv( "FG_ROOT" );
200 if ( envp != NULL ) {
201 // fg_root could be anywhere, so default to environmental
202 // variable $FG_ROOT if it is set.
205 // Otherwise, default to a random compiled in location if
206 // $FG_ROOT is not set. This can still be overridden from the
207 // command line or a config file.
210 fg_root = "\\FlightGear";
211 #elif defined( MACOS )
218 airport_id = ""; // default airport id
219 net_id = "Johnney"; // default pilot's name
221 // initialize port config string list
222 channel_options_list.clear();
226 fgOPTIONS::toggle_panel() {
228 FGTime *t = FGTime::cur_time_params;
230 int toggle_pause = t->getPause();
233 t->togglePauseMode();
236 panel_status = false;
240 if ( panel_status ) {
241 if( FGPanel::OurPanel == 0)
245 fov *= (1.0 / 0.4232);
247 fgReshape( xsize, ysize);
250 t->togglePauseMode();
254 fgOPTIONS::parse_time(const string& time_in) {
255 char *time_str, num[256];
256 double hours, minutes, seconds;
261 time_str = (char *)time_in.c_str();
263 // printf("parse_time(): %s\n", time_str);
266 if ( strlen(time_str) ) {
267 if ( time_str[0] == '+' ) {
270 } else if ( time_str[0] == '-' ) {
275 // printf("sign = %d\n", sign);
278 if ( strlen(time_str) ) {
280 while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
281 num[i] = time_str[0];
285 if ( time_str[0] == ':' ) {
290 // printf("hours = %.2lf\n", hours);
296 if ( strlen(time_str) ) {
298 while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
299 num[i] = time_str[0];
303 if ( time_str[0] == ':' ) {
308 // printf("minutes = %.2lf\n", minutes);
310 result += minutes / 60.0;
314 if ( strlen(time_str) ) {
316 while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
317 num[i] = time_str[0];
323 // printf("seconds = %.2lf\n", seconds);
325 result += seconds / 3600.0;
328 return(sign * result);
332 long int fgOPTIONS::parse_date( const string& date)
335 char * date_str, num[256];
337 // initialize to zero
344 gmt.tm_isdst = 0; // ignore daylight savings time for the moment
345 date_str = (char *)date.c_str();
347 if ( strlen(date_str) ) {
349 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
350 num[i] = date_str[0];
354 if ( date_str[0] == ':' ) {
358 gmt.tm_year = atoi(num) - 1900;
361 if ( strlen(date_str) ) {
363 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
364 num[i] = date_str[0];
368 if ( date_str[0] == ':' ) {
372 gmt.tm_mon = atoi(num) -1;
375 if ( strlen(date_str) ) {
377 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
378 num[i] = date_str[0];
382 if ( date_str[0] == ':' ) {
386 gmt.tm_mday = atoi(num);
389 if ( strlen(date_str) ) {
391 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
392 num[i] = date_str[0];
396 if ( date_str[0] == ':' ) {
400 gmt.tm_hour = atoi(num);
403 if ( strlen(date_str) ) {
405 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
406 num[i] = date_str[0];
410 if ( date_str[0] == ':' ) {
414 gmt.tm_min = atoi(num);
417 if ( strlen(date_str) ) {
419 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
420 num[i] = date_str[0];
424 if ( date_str[0] == ':' ) {
428 gmt.tm_sec = atoi(num);
430 time_t theTime = FGTime::cur_time_params->get_gmt(gmt.tm_year,
436 //printf ("Date is %s\n", ctime(&theTime));
437 //printf ("in seconds that is %d\n", theTime);
443 // parse degree in the form of [+/-]hhh:mm:ss
444 void fgOPTIONS::parse_control( const string& mode ) {
445 if ( mode == "joystick" ) {
446 control_mode = FG_JOYSTICK;
447 } else if ( mode == "mouse" ) {
448 control_mode = FG_MOUSE;
450 control_mode = FG_KEYBOARD;
455 /// parse degree in the form of [+/-]hhh:mm:ss
457 fgOPTIONS::parse_degree( const string& degree_str) {
458 double result = parse_time( degree_str );
460 // printf("Degree = %.4f\n", result);
466 // parse time offset command line option
468 fgOPTIONS::parse_time_offset( const string& time_str) {
471 // printf("time offset = %s\n", time_str);
474 result = (int)rint(parse_time(time_str) * 3600.0);
476 result = (int)(parse_time(time_str) * 3600.0);
479 // printf("parse_time_offset(): %d\n", result);
485 // Parse --tile-diameter=n type option
488 fgOPTIONS::parse_tile_radius( const string& arg ) {
489 int radius = atoi( arg );
491 if ( radius < FG_RADIUS_MIN ) { radius = FG_RADIUS_MIN; }
492 if ( radius > FG_RADIUS_MAX ) { radius = FG_RADIUS_MAX; }
494 // printf("parse_tile_radius(): radius = %d\n", radius);
500 // Parse --fdm=abcdefg type option
502 fgOPTIONS::parse_fdm( const string& fm ) {
503 // cout << "fdm = " << fm << endl;
505 if ( fm == "balloon" ) {
506 return FGInterface::FG_BALLOONSIM;
507 } else if ( fm == "external" ) {
508 return FGInterface::FG_EXTERNAL;
509 } else if ( fm == "jsb" ) {
510 return FGInterface::FG_JSBSIM;
511 } else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
512 return FGInterface::FG_LARCSIM;
513 } else if ( fm == "magic" ) {
514 return FGInterface::FG_MAGICCARPET;
516 FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
520 // we'll never get here, but it makes the compiler happy.
525 // Parse --fov=x.xx type option
527 fgOPTIONS::parse_fov( const string& arg ) {
528 double fov = atof(arg);
530 if ( fov < FG_FOV_MIN ) { fov = FG_FOV_MIN; }
531 if ( fov > FG_FOV_MAX ) { fov = FG_FOV_MAX; }
533 // printf("parse_fov(): result = %.4f\n", fov);
539 // Parse I/O channel option
541 // Format is "--protocol=medium,direction,hz,medium_options,..."
543 // protocol = { native, nmea, garmin, fgfs, rul, pve, etc. }
544 // medium = { serial, socket, file, etc. }
545 // direction = { in, out, bi }
546 // hz = number of times to process channel per second (floating
547 // point values are ok.
549 // Serial example "--nmea=serial,dir,hz,device,baud" where
551 // device = OS device name of serial line to be open()'ed
552 // baud = {300, 1200, 2400, ..., 230400}
554 // Socket exacmple "--native=socket,dir,hz,machine,port" where
556 // machine = machine name or ip address if client (leave empty if server)
557 // port = port, leave empty to let system choose
559 // File example "--garmin=file,dir,hz,filename" where
561 // filename = file system file name
564 fgOPTIONS::parse_channel( const string& type, const string& channel_str ) {
565 // cout << "Channel string = " << channel_str << endl;
567 channel_options_list.push_back( type + "," + channel_str );
573 // Parse a single option
574 int fgOPTIONS::parse_option( const string& arg ) {
576 if ( (arg == "--help") || (arg == "-h") ) {
577 // help/usage request
578 return(FG_OPTIONS_HELP);
579 } else if ( arg == "--disable-game-mode") {
581 } else if ( arg == "--enable-game-mode" ) {
583 } else if ( arg == "--disable-splash-screen" ) {
584 splash_screen = false;
585 } else if ( arg == "--enable-splash-screen" ) {
586 splash_screen = true;
587 } else if ( arg == "--disable-intro-music" ) {
589 } else if ( arg == "--enable-intro-music" ) {
591 } else if ( arg == "--disable-mouse-pointer" ) {
593 } else if ( arg == "--enable-mouse-pointer" ) {
595 } else if ( arg == "--disable-pause" ) {
597 } else if ( arg == "--enable-pause" ) {
599 } else if ( arg.find( "--control=") != string::npos ) {
600 parse_control( arg.substr(10) );
601 } else if ( arg == "--disable-auto-coordination" ) {
602 auto_coordination = FG_AUTO_COORD_DISABLED;
603 } else if ( arg == "--enable-auto-coordination" ) {
604 auto_coordination = FG_AUTO_COORD_ENABLED;
605 } else if ( arg == "--disable-hud" ) {
607 } else if ( arg == "--enable-hud" ) {
609 } else if ( arg == "--disable-panel" ) {
610 panel_status = false;
611 } else if ( arg == "--enable-panel" ) {
614 } else if ( arg == "--disable-sound" ) {
616 } else if ( arg == "--enable-sound" ) {
618 } else if ( arg.find( "--airport-id=") != string::npos ) {
619 airport_id = arg.substr( 13 );
620 } else if ( arg.find( "--lon=" ) != string::npos ) {
621 lon = parse_degree( arg.substr(6) );
622 } else if ( arg.find( "--lat=" ) != string::npos ) {
623 lat = parse_degree( arg.substr(6) );
624 } else if ( arg.find( "--altitude=" ) != string::npos ) {
625 if ( units == FG_UNITS_FEET ) {
626 altitude = atof( arg.substr(11) ) * FEET_TO_METER;
628 altitude = atof( arg.substr(11) );
630 } else if ( arg.find( "--uBody=" ) != string::npos ) {
631 if ( units == FG_UNITS_FEET ) {
632 uBody = atof( arg.substr(8) );
634 uBody = atof( arg.substr(8) ) * FEET_TO_METER;
636 } else if ( arg.find( "--vBody=" ) != string::npos ) {
637 if ( units == FG_UNITS_FEET ) {
638 vBody = atof( arg.substr(8) );
640 vBody = atof( arg.substr(8) ) * FEET_TO_METER;
642 } else if ( arg.find( "--wBody=" ) != string::npos ) {
643 if ( units == FG_UNITS_FEET ) {
644 wBody = atof( arg.substr(8) );
646 wBody = atof( arg.substr(8) ) * FEET_TO_METER;
648 } else if ( arg.find( "--heading=" ) != string::npos ) {
649 heading = atof( arg.substr(10) );
650 } else if ( arg.find( "--roll=" ) != string::npos ) {
651 roll = atof( arg.substr(7) );
652 } else if ( arg.find( "--pitch=" ) != string::npos ) {
653 pitch = atof( arg.substr(8) );
654 } else if ( arg.find( "--fg-root=" ) != string::npos ) {
655 fg_root = arg.substr( 10 );
656 } else if ( arg.find( "--fdm=" ) != string::npos ) {
657 flight_model = parse_fdm( arg.substr(6) );
658 } else if ( arg.find( "--aircraft=" ) != string::npos ) {
659 aircraft = arg.substr(11);
660 } else if ( arg.find( "--model-hz=" ) != string::npos ) {
661 model_hz = atoi( arg.substr(11) );
662 } else if ( arg.find( "--speed=" ) != string::npos ) {
663 speed_up = atoi( arg.substr(8) );
664 } else if ( arg == "--fog-disable" ) {
665 fog = FG_FOG_DISABLED;
666 } else if ( arg == "--fog-fastest" ) {
667 fog = FG_FOG_FASTEST;
668 } else if ( arg == "--fog-nicest" ) {
670 } else if ( arg == "--disable-clouds" ) {
672 } else if ( arg == "--enable-clouds" ) {
674 } else if ( arg.find( "--clouds-asl=" ) != string::npos ) {
675 if ( units == FG_UNITS_FEET ) {
676 clouds_asl = atof( arg.substr(13) ) * FEET_TO_METER;
678 clouds_asl = atof( arg.substr(13) );
680 } else if ( arg.find( "--fov=" ) != string::npos ) {
681 fov = parse_fov( arg.substr(6) );
682 } else if ( arg == "--disable-fullscreen" ) {
684 } else if ( arg== "--enable-fullscreen") {
686 } else if ( arg == "--shading-flat") {
688 } else if ( arg == "--shading-smooth") {
690 } else if ( arg == "--disable-skyblend") {
692 } else if ( arg== "--enable-skyblend" ) {
694 } else if ( arg == "--disable-textures" ) {
696 } else if ( arg == "--enable-textures" ) {
698 } else if ( arg == "--disable-wireframe" ) {
700 } else if ( arg == "--enable-wireframe" ) {
702 } else if ( arg.find( "--geometry=" ) != string::npos ) {
703 bool geometry_ok = true;
704 string geometry = arg.substr( 11 );
705 string::size_type i = geometry.find('x');
707 if (i != string::npos) {
708 xsize = atoi(geometry.substr(0, i));
709 ysize = atoi(geometry.substr(i+1));
710 // cout << "Geometry is " << xsize << 'x' << ysize << '\n';
715 if ( xsize <= 0 || ysize <= 0 ) {
721 if ( !geometry_ok ) {
722 FG_LOG( FG_GENERAL, FG_ALERT, "Unknown geometry: " << geometry );
723 FG_LOG( FG_GENERAL, FG_ALERT,
724 "Setting geometry to " << xsize << 'x' << ysize << '\n');
726 } else if ( arg == "--units-feet" ) {
727 units = FG_UNITS_FEET;
728 } else if ( arg == "--units-meters" ) {
729 units = FG_UNITS_METERS;
730 } else if ( arg.find( "--tile-radius=" ) != string::npos ) {
731 tile_radius = parse_tile_radius( arg.substr(14) );
732 tile_diameter = tile_radius * 2 + 1;
733 } else if ( arg.find( "--time-offset" ) != string::npos ) {
734 time_offset = parse_time_offset( (arg.substr(14)) );
735 //time_offset_type = FG_TIME_SYS_OFFSET;
736 } else if ( arg.find( "--time-match-real") != string::npos ) {
737 //time_offset = parse_time_offset(arg.substr(18));
738 time_offset_type = FG_TIME_SYS_OFFSET;
739 } else if ( arg.find( "--time-match-local") != string::npos ) {
740 //time_offset = parse_time_offset(arg.substr(18));
741 time_offset_type = FG_TIME_LAT_OFFSET;
742 } else if ( arg.find( "--start-date-sys=") != string::npos ) {
743 time_offset = parse_date( (arg.substr(17)) );
744 time_offset_type = FG_TIME_SYS_ABSOLUTE;
745 } else if ( arg.find( "--start-date-lat=") != string::npos ) {
746 time_offset = parse_date( (arg.substr(17)) );
747 time_offset_type = FG_TIME_LAT_ABSOLUTE;
748 } else if ( arg.find( "--start-date-gmt=") != string::npos ) {
749 time_offset = parse_date( (arg.substr(17)) );
750 time_offset_type = FG_TIME_GMT_ABSOLUTE;
752 } else if ( arg == "--hud-tris" ) {
754 } else if ( arg == "--hud-culled" ) {
756 } else if ( arg.find( "--native=" ) != string::npos ) {
757 parse_channel( "native", arg.substr(9) );
758 } else if ( arg.find( "--garmin=" ) != string::npos ) {
759 parse_channel( "garmin", arg.substr(9) );
760 } else if ( arg.find( "--nmea=" ) != string::npos ) {
761 parse_channel( "nmea", arg.substr(7) );
762 } else if ( arg.find( "--pve=" ) != string::npos ) {
763 parse_channel( "pve", arg.substr(6) );
764 } else if ( arg.find( "--rul=" ) != string::npos ) {
765 parse_channel( "rul", arg.substr(6) );
766 #ifdef FG_NETWORK_OLK
767 } else if ( arg == "--disable-network-olk" ) {
769 } else if ( arg== "--enable-network-olk") {
771 } else if ( arg == "--net-hud" ) {
773 } else if ( arg.find( "--net-id=") != string::npos ) {
774 net_id = arg.substr( 9 );
777 FG_LOG( FG_GENERAL, FG_ALERT, "Unknown option '" << arg << "'" );
778 return FG_OPTIONS_ERROR;
781 return FG_OPTIONS_OK;
785 // Parse the command line options
786 int fgOPTIONS::parse_command_line( int argc, char **argv ) {
790 FG_LOG(FG_GENERAL, FG_INFO, "Processing command line arguments");
793 FG_LOG( FG_GENERAL, FG_DEBUG, "argv[" << i << "] = " << argv[i] );
795 result = parse_option(argv[i]);
796 if ( (result == FG_OPTIONS_HELP) || (result == FG_OPTIONS_ERROR) ) {
803 return(FG_OPTIONS_OK);
807 // Parse config file options
808 int fgOPTIONS::parse_config_file( const string& path ) {
809 fg_gzifstream in( path );
811 return(FG_OPTIONS_ERROR);
813 FG_LOG( FG_GENERAL, FG_INFO, "Processing config file: " << path );
817 while ( ! in.eof() ) {
820 while ( in.get(c) && c != '\0' ) {
825 #ifdef GETLINE_NEEDS_TERMINATOR
826 getline( in, line, '\n' );
827 #elif defined (MACOS)
828 getline( in, line, '\r' );
833 if ( parse_option( line ) == FG_OPTIONS_ERROR ) {
834 FG_LOG( FG_GENERAL, FG_ALERT,
835 "Config file parse error: " << path << " '"
842 return FG_OPTIONS_OK;
846 // Print usage message
847 void fgOPTIONS::usage ( void ) {
848 cout << "Usage: fg [ options ... ]" << endl;
851 cout << "General Options:" << endl;
852 cout << "\t--help -h: print usage" << endl;
853 cout << "\t--fg-root=path: specify the root path for all the data files"
855 cout << "\t--disable-game-mode: disable full-screen game mode" << endl;
856 cout << "\t--enable-game-mode: enable full-screen game mode" << endl;
857 cout << "\t--disable-splash-screen: disable splash screen" << endl;
858 cout << "\t--enable-splash-screen: enable splash screen" << endl;
859 cout << "\t--disable-intro-music: disable introduction music" << endl;
860 cout << "\t--enable-intro-music: enable introduction music" << endl;
861 cout << "\t--disable-mouse-pointer: disable extra mouse pointer" << endl;
862 cout << "\t--enable-mouse-pointer: enable extra mouse pointer (i.e. for"
864 cout << "\t\tfull screen voodoo/voodoo-II based cards.)" << endl;
865 cout << "\t--disable-pause: start out in an active state" << endl;
866 cout << "\t--enable-pause: start out in a paused state" << endl;
867 cout << "\t--control=mode: primary control mode "
868 << "(joystick, keyboard, mouse)" << endl;
871 cout << "Features:" << endl;
872 cout << "\t--disable-hud: disable heads up display" << endl;
873 cout << "\t--enable-hud: enable heads up display" << endl;
874 cout << "\t--disable-panel: disable instrument panel" << endl;
875 cout << "\t--enable-panel: enable instrumetn panel" << endl;
876 cout << "\t--disable-sound: disable sound effects" << endl;
877 cout << "\t--enable-sound: enable sound effects" << endl;
880 cout << "Flight Model:" << endl;
881 cout << "\t--fdm=abcd: selects the core flight model code." << endl;
882 cout << "\t\tcan be one of jsb, larcsim, magic, or external" << endl;
883 cout << "\t--aircraft=abcd: aircraft model to load" << endl;
884 cout << "\t--model-hz=n: run the FDM this rate (iterations per second)"
886 cout << "\t--speed=n: run the FDM this much faster than real time" << endl;
889 cout << "Initial Position and Orientation:" << endl;
890 cout << "\t--airport-id=ABCD: specify starting postion by airport id"
892 cout << "\t--lon=degrees: starting longitude in degrees (west = -)"
894 cout << "\t--lat=degrees: starting latitude in degrees (south = -)"
896 cout << "\t--altitude=feet: starting altitude in feet" << endl;
897 cout << "\t\t(unless --units-meters specified" << endl;
898 cout << "\t--heading=degrees: heading (yaw) angle in degress (Psi)"
900 cout << "\t--roll=degrees: roll angle in degrees (Phi)" << endl;
901 cout << "\t--pitch=degrees: pitch angle in degrees (Theta)" << endl;
902 cout << "\t--uBody=feet per second: velocity along the body X axis"
904 cout << "\t--vBody=feet per second: velocity along the body Y axis"
906 cout << "\t--wBody=feet per second: velocity along the body Z axis"
908 cout << "\t\t(unless --units-meters specified" << endl;
911 cout << "Rendering Options:" << endl;
912 cout << "\t--fog-disable: disable fog/haze" << endl;
913 cout << "\t--fog-fastest: enable fastest fog/haze" << endl;
914 cout << "\t--fog-nicest: enable nicest fog/haze" << endl;
915 cout << "\t--enable-clouds: enable demo cloud layer" << endl;
916 cout << "\t--disable-clouds: disable demo cloud layer" << endl;
917 cout << "\t--clouds-asl=xxx: specify altitude of cloud layer above sea level" << endl;
918 cout << "\t--fov=xx.x: specify initial field of view angle in degrees"
920 cout << "\t--disable-fullscreen: disable fullscreen mode" << endl;
921 cout << "\t--enable-fullscreen: enable fullscreen mode" << endl;
922 cout << "\t--shading-flat: enable flat shading" << endl;
923 cout << "\t--shading-smooth: enable smooth shading" << endl;
924 cout << "\t--disable-skyblend: disable sky blending" << endl;
925 cout << "\t--enable-skyblend: enable sky blending" << endl;
926 cout << "\t--disable-textures: disable textures" << endl;
927 cout << "\t--enable-textures: enable textures" << endl;
928 cout << "\t--disable-wireframe: disable wireframe drawing mode" << endl;
929 cout << "\t--enable-wireframe: enable wireframe drawing mode" << endl;
930 cout << "\t--geometry=WWWxHHH: window geometry: 640x480, 800x600, etc."
934 cout << "Scenery Options:" << endl;
935 cout << "\t--tile-radius=n: specify tile radius, must be 1 - 4" << endl;
938 cout << "Hud Options:" << endl;
939 cout << "\t--units-feet: Hud displays units in feet" << endl;
940 cout << "\t--units-meters: Hud displays units in meters" << endl;
941 cout << "\t--hud-tris: Hud displays number of triangles rendered" << endl;
942 cout << "\t--hud-culled: Hud displays percentage of triangles culled"
946 cout << "Time Options:" << endl;
947 cout << "\t--time-offset=[+-]hh:mm:ss: add this time offset" << endl;
948 cout << "\t--time-match-real: Synchronize real-world and FlightGear" << endl
949 << "\t\ttime. Can be used in combination with --time-offset." << endl;
950 cout << "\t--time-match-local:Synchronize local real-world and " << endl
951 << "\t\tFlightGear time" << endl;
952 cout << "\t--start-date-sys=yyyy:mm:dd:hh:mm:ss: specify a starting" << endl
953 << "\t\tdate/time. Uses your system time " << endl;
954 cout << "\t--start-date-gmt=yyyy:mm:dd:hh:mm:ss: specify a starting" << endl
955 << "\t\tdate/time. Uses Greenwich Mean Time" << endl;
956 cout << "\t--start-date-lat=yyyy:mm:dd:hh:mm:ss: specify a starting" << endl
957 << "\t\tdate/time. Uses Local Aircraft Time" << endl;
958 #ifdef FG_NETWORK_OLK
961 cout << "Network Options:" << endl;
962 cout << "\t--net-hud: Hud displays network info" << endl;
963 cout << "\t--net-id=name: specify your own callsign" << endl;
969 fgOPTIONS::~fgOPTIONS( void ) {