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>
48 #include <FDM/UIUCModel/uiuc_aircraftdir.h>
50 # include <NetworkOLK/network.h>
52 #include <Time/fg_time.hxx>
55 #include "options.hxx"
58 FG_USING_NAMESPACE(std);
61 extern void fgReshape( int width, int height );
64 atof( const string& str )
68 // -dw- if ::atof is called, then we get an infinite loop
69 return std::atof( str.c_str() );
71 return ::atof( str.c_str() );
76 atoi( const string& str )
79 // -dw- if ::atoi is called, then we get an infinite loop
80 return std::atoi( str.c_str() );
82 return ::atoi( str.c_str() );
87 // Defined the shared options class here
88 fgOPTIONS current_options;
92 fgOPTIONS::fgOPTIONS() :
93 // starting longitude in degrees (west = -)
94 // starting latitude in degrees (south = -)
96 // Default initial position is Globe, AZ (P13)
100 // North of the city of Globe
104 // North of the city of Globe
108 // Near where I used to live in Globe, AZ
112 // 10125 Jewell St. NE
116 // Near KHSP (Hot Springs, VA)
117 // lon(-79.8338964 + 0.01),
118 // lat( 37.9514564 + 0.008),
120 // (SEZ) SEDONA airport
121 // lon(-111.7884614 + 0.01),
122 // lat( 34.8486289 - 0.015),
124 // Jim Brennon's Kingmont Observatory
125 // lon(-121.1131667),
128 // Huaras, Peru (S09d 31.871' W077d 31.498')
132 // Eclipse Watching w73.5 n10 (approx) 18:00 UT
137 // lon(-90.1953055556),
138 // lat( 45.4511388889),
140 // starting altitude in meters (this will be reset to ground level
141 // if it is lower than the terrain
144 // Initial Orientation
145 heading(270.0), // heading (yaw) angle in degress (Psi)
146 roll(0.0), // roll angle in degrees (Phi)
147 pitch(0.424), // pitch angle in degrees (Theta)
149 // Initialize current options velocities to 0.0
150 uBody(0.0), vBody(0.0), wBody(0.0),
158 control_mode(FG_JOYSTICK),
159 auto_coordination(FG_AUTO_COORD_NOT_SPECIFIED),
166 // Flight Model options
167 flight_model( FGInterface::FG_LARCSIM ),
169 model_hz( NEW_DEFAULT_MODEL_HZ ),
173 fog(FG_FOG_NICEST), // nicest
175 clouds_asl(5000*FEET_TO_METER),
184 view_mode(FG_VIEW_PILOT),
190 units(FG_UNITS_FEET),
198 // set initial values/defaults
199 time_offset_type=FG_TIME_SYS_OFFSET;
200 char* envp = ::getenv( "FG_ROOT" );
202 if ( envp != NULL ) {
203 // fg_root could be anywhere, so default to environmental
204 // variable $FG_ROOT if it is set.
207 // Otherwise, default to a random compiled in location if
208 // $FG_ROOT is not set. This can still be overridden from the
209 // command line or a config file.
212 fg_root = "\\FlightGear";
213 #elif defined( MACOS )
220 airport_id = ""; // default airport id
221 net_id = "Johnney"; // default pilot's name
223 // initialize port config string list
224 channel_options_list.clear();
228 fgOPTIONS::toggle_panel() {
230 FGTime *t = FGTime::cur_time_params;
232 int toggle_pause = t->getPause();
235 t->togglePauseMode();
238 panel_status = false;
239 if ( current_panel != NULL )
240 current_panel->setVisibility(false);
243 if ( current_panel != NULL )
244 current_panel->setVisibility(true);
246 if ( panel_status ) {
249 fov *= (1.0 / 0.4232);
251 fgReshape( xsize, ysize);
254 t->togglePauseMode();
258 fgOPTIONS::parse_time(const string& time_in) {
259 char *time_str, num[256];
260 double hours, minutes, seconds;
265 time_str = (char *)time_in.c_str();
267 // printf("parse_time(): %s\n", time_str);
270 if ( strlen(time_str) ) {
271 if ( time_str[0] == '+' ) {
274 } else if ( time_str[0] == '-' ) {
279 // printf("sign = %d\n", sign);
282 if ( strlen(time_str) ) {
284 while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
285 num[i] = time_str[0];
289 if ( time_str[0] == ':' ) {
294 // printf("hours = %.2lf\n", hours);
300 if ( strlen(time_str) ) {
302 while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
303 num[i] = time_str[0];
307 if ( time_str[0] == ':' ) {
312 // printf("minutes = %.2lf\n", minutes);
314 result += minutes / 60.0;
318 if ( strlen(time_str) ) {
320 while ( (time_str[0] != ':') && (time_str[0] != '\0') ) {
321 num[i] = time_str[0];
327 // printf("seconds = %.2lf\n", seconds);
329 result += seconds / 3600.0;
332 return(sign * result);
336 long int fgOPTIONS::parse_date( const string& date)
339 char * date_str, num[256];
341 // initialize to zero
348 gmt.tm_isdst = 0; // ignore daylight savings time for the moment
349 date_str = (char *)date.c_str();
351 if ( strlen(date_str) ) {
353 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
354 num[i] = date_str[0];
358 if ( date_str[0] == ':' ) {
362 gmt.tm_year = atoi(num) - 1900;
365 if ( strlen(date_str) ) {
367 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
368 num[i] = date_str[0];
372 if ( date_str[0] == ':' ) {
376 gmt.tm_mon = atoi(num) -1;
379 if ( strlen(date_str) ) {
381 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
382 num[i] = date_str[0];
386 if ( date_str[0] == ':' ) {
390 gmt.tm_mday = atoi(num);
393 if ( strlen(date_str) ) {
395 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
396 num[i] = date_str[0];
400 if ( date_str[0] == ':' ) {
404 gmt.tm_hour = atoi(num);
407 if ( strlen(date_str) ) {
409 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
410 num[i] = date_str[0];
414 if ( date_str[0] == ':' ) {
418 gmt.tm_min = atoi(num);
421 if ( strlen(date_str) ) {
423 while ( (date_str[0] != ':') && (date_str[0] != '\0') ) {
424 num[i] = date_str[0];
428 if ( date_str[0] == ':' ) {
432 gmt.tm_sec = atoi(num);
434 time_t theTime = FGTime::cur_time_params->get_gmt(gmt.tm_year,
440 //printf ("Date is %s\n", ctime(&theTime));
441 //printf ("in seconds that is %d\n", theTime);
447 // parse degree in the form of [+/-]hhh:mm:ss
448 void fgOPTIONS::parse_control( const string& mode ) {
449 if ( mode == "joystick" ) {
450 control_mode = FG_JOYSTICK;
451 } else if ( mode == "mouse" ) {
452 control_mode = FG_MOUSE;
454 control_mode = FG_KEYBOARD;
459 /// parse degree in the form of [+/-]hhh:mm:ss
461 fgOPTIONS::parse_degree( const string& degree_str) {
462 double result = parse_time( degree_str );
464 // printf("Degree = %.4f\n", result);
470 // parse time offset command line option
472 fgOPTIONS::parse_time_offset( const string& time_str) {
475 // printf("time offset = %s\n", time_str);
478 result = (int)rint(parse_time(time_str) * 3600.0);
480 result = (int)(parse_time(time_str) * 3600.0);
483 // printf("parse_time_offset(): %d\n", result);
489 // Parse --tile-diameter=n type option
492 fgOPTIONS::parse_tile_radius( const string& arg ) {
493 int radius = atoi( arg );
495 if ( radius < FG_RADIUS_MIN ) { radius = FG_RADIUS_MIN; }
496 if ( radius > FG_RADIUS_MAX ) { radius = FG_RADIUS_MAX; }
498 // printf("parse_tile_radius(): radius = %d\n", radius);
504 // Parse --fdm=abcdefg type option
506 fgOPTIONS::parse_fdm( const string& fm ) {
507 // cout << "fdm = " << fm << endl;
509 if ( fm == "balloon" ) {
510 return FGInterface::FG_BALLOONSIM;
511 } else if ( fm == "external" ) {
512 return FGInterface::FG_EXTERNAL;
513 } else if ( fm == "jsb" ) {
514 return FGInterface::FG_JSBSIM;
515 } else if ( (fm == "larcsim") || (fm == "LaRCsim") ) {
516 return FGInterface::FG_LARCSIM;
517 } else if ( fm == "magic" ) {
518 return FGInterface::FG_MAGICCARPET;
520 FG_LOG( FG_GENERAL, FG_ALERT, "Unknown fdm = " << fm );
524 // we'll never get here, but it makes the compiler happy.
529 // Parse --fov=x.xx type option
531 fgOPTIONS::parse_fov( const string& arg ) {
532 double fov = atof(arg);
534 if ( fov < FG_FOV_MIN ) { fov = FG_FOV_MIN; }
535 if ( fov > FG_FOV_MAX ) { fov = FG_FOV_MAX; }
537 // printf("parse_fov(): result = %.4f\n", fov);
543 // Parse I/O channel option
545 // Format is "--protocol=medium,direction,hz,medium_options,..."
547 // protocol = { native, nmea, garmin, fgfs, rul, pve, etc. }
548 // medium = { serial, socket, file, etc. }
549 // direction = { in, out, bi }
550 // hz = number of times to process channel per second (floating
551 // point values are ok.
553 // Serial example "--nmea=serial,dir,hz,device,baud" where
555 // device = OS device name of serial line to be open()'ed
556 // baud = {300, 1200, 2400, ..., 230400}
558 // Socket exacmple "--native=socket,dir,hz,machine,port" where
560 // machine = machine name or ip address if client (leave empty if server)
561 // port = port, leave empty to let system choose
563 // File example "--garmin=file,dir,hz,filename" where
565 // filename = file system file name
568 fgOPTIONS::parse_channel( const string& type, const string& channel_str ) {
569 // cout << "Channel string = " << channel_str << endl;
571 channel_options_list.push_back( type + "," + channel_str );
577 // Parse a single option
578 int fgOPTIONS::parse_option( const string& arg ) {
580 if ( (arg == "--help") || (arg == "-h") ) {
581 // help/usage request
582 return(FG_OPTIONS_HELP);
583 } else if ( arg == "--disable-game-mode") {
585 } else if ( arg == "--enable-game-mode" ) {
587 } else if ( arg == "--disable-splash-screen" ) {
588 splash_screen = false;
589 } else if ( arg == "--enable-splash-screen" ) {
590 splash_screen = true;
591 } else if ( arg == "--disable-intro-music" ) {
593 } else if ( arg == "--enable-intro-music" ) {
595 } else if ( arg == "--disable-mouse-pointer" ) {
597 } else if ( arg == "--enable-mouse-pointer" ) {
599 } else if ( arg == "--disable-pause" ) {
601 } else if ( arg == "--enable-pause" ) {
603 } else if ( arg.find( "--control=") != string::npos ) {
604 parse_control( arg.substr(10) );
605 } else if ( arg == "--disable-auto-coordination" ) {
606 auto_coordination = FG_AUTO_COORD_DISABLED;
607 } else if ( arg == "--enable-auto-coordination" ) {
608 auto_coordination = FG_AUTO_COORD_ENABLED;
609 } else if ( arg == "--disable-hud" ) {
611 } else if ( arg == "--enable-hud" ) {
613 } else if ( arg == "--disable-panel" ) {
614 panel_status = false;
615 if ( current_panel != NULL )
616 current_panel->setVisibility(false);
617 } else if ( arg == "--enable-panel" ) {
619 if ( current_panel != NULL )
620 current_panel->setVisibility(true);
622 } else if ( arg == "--disable-sound" ) {
624 } else if ( arg == "--enable-sound" ) {
626 } else if ( arg.find( "--airport-id=") != string::npos ) {
627 airport_id = arg.substr( 13 );
628 } else if ( arg.find( "--lon=" ) != string::npos ) {
629 lon = parse_degree( arg.substr(6) );
630 } else if ( arg.find( "--lat=" ) != string::npos ) {
631 lat = parse_degree( arg.substr(6) );
632 } else if ( arg.find( "--altitude=" ) != string::npos ) {
633 if ( units == FG_UNITS_FEET ) {
634 altitude = atof( arg.substr(11) ) * FEET_TO_METER;
636 altitude = atof( arg.substr(11) );
638 } else if ( arg.find( "--uBody=" ) != string::npos ) {
639 if ( units == FG_UNITS_FEET ) {
640 uBody = atof( arg.substr(8) );
642 uBody = atof( arg.substr(8) ) * FEET_TO_METER;
644 } else if ( arg.find( "--vBody=" ) != string::npos ) {
645 if ( units == FG_UNITS_FEET ) {
646 vBody = atof( arg.substr(8) );
648 vBody = atof( arg.substr(8) ) * FEET_TO_METER;
650 } else if ( arg.find( "--wBody=" ) != string::npos ) {
651 if ( units == FG_UNITS_FEET ) {
652 wBody = atof( arg.substr(8) );
654 wBody = atof( arg.substr(8) ) * FEET_TO_METER;
656 } else if ( arg.find( "--heading=" ) != string::npos ) {
657 heading = atof( arg.substr(10) );
658 } else if ( arg.find( "--roll=" ) != string::npos ) {
659 roll = atof( arg.substr(7) );
660 } else if ( arg.find( "--pitch=" ) != string::npos ) {
661 pitch = atof( arg.substr(8) );
662 } else if ( arg.find( "--fg-root=" ) != string::npos ) {
663 fg_root = arg.substr( 10 );
664 } else if ( arg.find( "--fdm=" ) != string::npos ) {
665 flight_model = parse_fdm( arg.substr(6) );
666 } else if ( arg.find( "--aircraft=" ) != string::npos ) {
667 aircraft = arg.substr(11);
668 } else if ( arg.find( "--aircraft-dir=" ) != string::npos ) {
669 aircraft_dir = arg.substr(15); // (UIUC)
670 } else if ( arg.find( "--model-hz=" ) != string::npos ) {
671 model_hz = atoi( arg.substr(11) );
672 } else if ( arg.find( "--speed=" ) != string::npos ) {
673 speed_up = atoi( arg.substr(8) );
674 } else if ( arg == "--fog-disable" ) {
675 fog = FG_FOG_DISABLED;
676 } else if ( arg == "--fog-fastest" ) {
677 fog = FG_FOG_FASTEST;
678 } else if ( arg == "--fog-nicest" ) {
680 } else if ( arg == "--disable-clouds" ) {
682 } else if ( arg == "--enable-clouds" ) {
684 } else if ( arg.find( "--clouds-asl=" ) != string::npos ) {
685 if ( units == FG_UNITS_FEET ) {
686 clouds_asl = atof( arg.substr(13) ) * FEET_TO_METER;
688 clouds_asl = atof( arg.substr(13) );
690 } else if ( arg.find( "--fov=" ) != string::npos ) {
691 fov = parse_fov( arg.substr(6) );
692 } else if ( arg == "--disable-fullscreen" ) {
694 } else if ( arg== "--enable-fullscreen") {
696 } else if ( arg == "--shading-flat") {
698 } else if ( arg == "--shading-smooth") {
700 } else if ( arg == "--disable-skyblend") {
702 } else if ( arg== "--enable-skyblend" ) {
704 } else if ( arg == "--disable-textures" ) {
706 } else if ( arg == "--enable-textures" ) {
708 } else if ( arg == "--disable-wireframe" ) {
710 } else if ( arg == "--enable-wireframe" ) {
712 } else if ( arg.find( "--geometry=" ) != string::npos ) {
713 bool geometry_ok = true;
714 string geometry = arg.substr( 11 );
715 string::size_type i = geometry.find('x');
717 if (i != string::npos) {
718 xsize = atoi(geometry.substr(0, i));
719 ysize = atoi(geometry.substr(i+1));
720 // cout << "Geometry is " << xsize << 'x' << ysize << '\n';
725 if ( xsize <= 0 || ysize <= 0 ) {
731 if ( !geometry_ok ) {
732 FG_LOG( FG_GENERAL, FG_ALERT, "Unknown geometry: " << geometry );
733 FG_LOG( FG_GENERAL, FG_ALERT,
734 "Setting geometry to " << xsize << 'x' << ysize << '\n');
736 } else if ( arg == "--units-feet" ) {
737 units = FG_UNITS_FEET;
738 } else if ( arg == "--units-meters" ) {
739 units = FG_UNITS_METERS;
740 } else if ( arg.find( "--tile-radius=" ) != string::npos ) {
741 tile_radius = parse_tile_radius( arg.substr(14) );
742 tile_diameter = tile_radius * 2 + 1;
743 } else if ( arg.find( "--time-offset" ) != string::npos ) {
744 time_offset = parse_time_offset( (arg.substr(14)) );
745 //time_offset_type = FG_TIME_SYS_OFFSET;
746 } else if ( arg.find( "--time-match-real") != string::npos ) {
747 //time_offset = parse_time_offset(arg.substr(18));
748 time_offset_type = FG_TIME_SYS_OFFSET;
749 } else if ( arg.find( "--time-match-local") != string::npos ) {
750 //time_offset = parse_time_offset(arg.substr(18));
751 time_offset_type = FG_TIME_LAT_OFFSET;
752 } else if ( arg.find( "--start-date-sys=") != string::npos ) {
753 time_offset = parse_date( (arg.substr(17)) );
754 time_offset_type = FG_TIME_SYS_ABSOLUTE;
755 } else if ( arg.find( "--start-date-lat=") != string::npos ) {
756 time_offset = parse_date( (arg.substr(17)) );
757 time_offset_type = FG_TIME_LAT_ABSOLUTE;
758 } else if ( arg.find( "--start-date-gmt=") != string::npos ) {
759 time_offset = parse_date( (arg.substr(17)) );
760 time_offset_type = FG_TIME_GMT_ABSOLUTE;
762 } else if ( arg == "--hud-tris" ) {
764 } else if ( arg == "--hud-culled" ) {
766 } else if ( arg.find( "--native=" ) != string::npos ) {
767 parse_channel( "native", arg.substr(9) );
768 } else if ( arg.find( "--garmin=" ) != string::npos ) {
769 parse_channel( "garmin", arg.substr(9) );
770 } else if ( arg.find( "--nmea=" ) != string::npos ) {
771 parse_channel( "nmea", arg.substr(7) );
772 } else if ( arg.find( "--pve=" ) != string::npos ) {
773 parse_channel( "pve", arg.substr(6) );
774 } else if ( arg.find( "--rul=" ) != string::npos ) {
775 parse_channel( "rul", arg.substr(6) );
776 } else if ( arg.find( "--joyclient=" ) != string::npos ) {
777 parse_channel( "joyclient", arg.substr(12) );
778 #ifdef FG_NETWORK_OLK
779 } else if ( arg == "--disable-network-olk" ) {
781 } else if ( arg== "--enable-network-olk") {
783 } else if ( arg == "--net-hud" ) {
785 } else if ( arg.find( "--net-id=") != string::npos ) {
786 net_id = arg.substr( 9 );
789 FG_LOG( FG_GENERAL, FG_ALERT, "Unknown option '" << arg << "'" );
790 return FG_OPTIONS_ERROR;
793 return FG_OPTIONS_OK;
797 // Parse the command line options
798 int fgOPTIONS::parse_command_line( int argc, char **argv ) {
802 FG_LOG(FG_GENERAL, FG_INFO, "Processing command line arguments");
805 FG_LOG( FG_GENERAL, FG_DEBUG, "argv[" << i << "] = " << argv[i] );
807 result = parse_option(argv[i]);
808 if ( (result == FG_OPTIONS_HELP) || (result == FG_OPTIONS_ERROR) ) {
815 return(FG_OPTIONS_OK);
819 // Parse config file options
820 int fgOPTIONS::parse_config_file( const string& path ) {
821 fg_gzifstream in( path );
823 return(FG_OPTIONS_ERROR);
825 FG_LOG( FG_GENERAL, FG_INFO, "Processing config file: " << path );
829 while ( ! in.eof() ) {
832 while ( in.get(c) && c != '\0' ) {
837 #ifdef GETLINE_NEEDS_TERMINATOR
838 getline( in, line, '\n' );
839 #elif defined (MACOS)
840 getline( in, line, '\r' );
845 if ( parse_option( line ) == FG_OPTIONS_ERROR ) {
846 FG_LOG( FG_GENERAL, FG_ALERT,
847 "Config file parse error: " << path << " '"
854 return FG_OPTIONS_OK;
858 // Print usage message
859 void fgOPTIONS::usage ( void ) {
860 cout << "Usage: fg [ options ... ]" << endl;
863 cout << "General Options:" << endl;
864 cout << "\t--help -h: print usage" << endl;
865 cout << "\t--fg-root=path: specify the root path for all the data files"
867 cout << "\t--disable-game-mode: disable full-screen game mode" << endl;
868 cout << "\t--enable-game-mode: enable full-screen game mode" << endl;
869 cout << "\t--disable-splash-screen: disable splash screen" << endl;
870 cout << "\t--enable-splash-screen: enable splash screen" << endl;
871 cout << "\t--disable-intro-music: disable introduction music" << endl;
872 cout << "\t--enable-intro-music: enable introduction music" << endl;
873 cout << "\t--disable-mouse-pointer: disable extra mouse pointer" << endl;
874 cout << "\t--enable-mouse-pointer: enable extra mouse pointer (i.e. for"
876 cout << "\t\tfull screen voodoo/voodoo-II based cards.)" << endl;
877 cout << "\t--disable-pause: start out in an active state" << endl;
878 cout << "\t--enable-pause: start out in a paused state" << endl;
879 cout << "\t--control=mode: primary control mode "
880 << "(joystick, keyboard, mouse)" << endl;
883 cout << "Features:" << endl;
884 cout << "\t--disable-hud: disable heads up display" << endl;
885 cout << "\t--enable-hud: enable heads up display" << endl;
886 cout << "\t--disable-panel: disable instrument panel" << endl;
887 cout << "\t--enable-panel: enable instrumetn panel" << endl;
888 cout << "\t--disable-sound: disable sound effects" << endl;
889 cout << "\t--enable-sound: enable sound effects" << endl;
892 cout << "Flight Model:" << endl;
893 cout << "\t--fdm=abcd: selects the core flight model code." << endl;
894 cout << "\t\tcan be one of jsb, larcsim, magic, or external" << endl;
895 cout << "\t--aircraft=abcd: aircraft model to load" << endl;
896 cout << "\t--model-hz=n: run the FDM this rate (iterations per second)"
898 cout << "\t--speed=n: run the FDM this much faster than real time" << endl;
901 cout <<"Aircraft model directory" << endl;
902 cout <<"\t--aircraft-dir=<path> path is relative to the path of the executable" << endl;
905 cout << "Initial Position and Orientation:" << endl;
906 cout << "\t--airport-id=ABCD: specify starting postion by airport id"
908 cout << "\t--lon=degrees: starting longitude in degrees (west = -)"
910 cout << "\t--lat=degrees: starting latitude in degrees (south = -)"
912 cout << "\t--altitude=feet: starting altitude in feet" << endl;
913 cout << "\t\t(unless --units-meters specified" << endl;
914 cout << "\t--heading=degrees: heading (yaw) angle in degress (Psi)"
916 cout << "\t--roll=degrees: roll angle in degrees (Phi)" << endl;
917 cout << "\t--pitch=degrees: pitch angle in degrees (Theta)" << endl;
918 cout << "\t--uBody=feet per second: velocity along the body X axis"
920 cout << "\t--vBody=feet per second: velocity along the body Y axis"
922 cout << "\t--wBody=feet per second: velocity along the body Z axis"
924 cout << "\t\t(unless --units-meters specified" << endl;
927 cout << "Rendering Options:" << endl;
928 cout << "\t--fog-disable: disable fog/haze" << endl;
929 cout << "\t--fog-fastest: enable fastest fog/haze" << endl;
930 cout << "\t--fog-nicest: enable nicest fog/haze" << endl;
931 cout << "\t--enable-clouds: enable demo cloud layer" << endl;
932 cout << "\t--disable-clouds: disable demo cloud layer" << endl;
933 cout << "\t--clouds-asl=xxx: specify altitude of cloud layer above sea level" << endl;
934 cout << "\t--fov=xx.x: specify initial field of view angle in degrees"
936 cout << "\t--disable-fullscreen: disable fullscreen mode" << endl;
937 cout << "\t--enable-fullscreen: enable fullscreen mode" << endl;
938 cout << "\t--shading-flat: enable flat shading" << endl;
939 cout << "\t--shading-smooth: enable smooth shading" << endl;
940 cout << "\t--disable-skyblend: disable sky blending" << endl;
941 cout << "\t--enable-skyblend: enable sky blending" << endl;
942 cout << "\t--disable-textures: disable textures" << endl;
943 cout << "\t--enable-textures: enable textures" << endl;
944 cout << "\t--disable-wireframe: disable wireframe drawing mode" << endl;
945 cout << "\t--enable-wireframe: enable wireframe drawing mode" << endl;
946 cout << "\t--geometry=WWWxHHH: window geometry: 640x480, 800x600, etc."
950 cout << "Scenery Options:" << endl;
951 cout << "\t--tile-radius=n: specify tile radius, must be 1 - 4" << endl;
954 cout << "Hud Options:" << endl;
955 cout << "\t--units-feet: Hud displays units in feet" << endl;
956 cout << "\t--units-meters: Hud displays units in meters" << endl;
957 cout << "\t--hud-tris: Hud displays number of triangles rendered" << endl;
958 cout << "\t--hud-culled: Hud displays percentage of triangles culled"
962 cout << "Time Options:" << endl;
963 cout << "\t--time-offset=[+-]hh:mm:ss: add this time offset" << endl;
964 cout << "\t--time-match-real: Synchronize real-world and FlightGear" << endl
965 << "\t\ttime. Can be used in combination with --time-offset." << endl;
966 cout << "\t--time-match-local:Synchronize local real-world and " << endl
967 << "\t\tFlightGear time" << endl;
968 cout << "\t--start-date-sys=yyyy:mm:dd:hh:mm:ss: specify a starting" << endl
969 << "\t\tdate/time. Uses your system time " << endl;
970 cout << "\t--start-date-gmt=yyyy:mm:dd:hh:mm:ss: specify a starting" << endl
971 << "\t\tdate/time. Uses Greenwich Mean Time" << endl;
972 cout << "\t--start-date-lat=yyyy:mm:dd:hh:mm:ss: specify a starting" << endl
973 << "\t\tdate/time. Uses Local Aircraft Time" << endl;
974 #ifdef FG_NETWORK_OLK
977 cout << "Network Options:" << endl;
978 cout << "\t--net-hud: Hud displays network info" << endl;
979 cout << "\t--net-id=name: specify your own callsign" << endl;
985 fgOPTIONS::~fgOPTIONS( void ) {