// FIXME: need to update lighting
// and solar system
current_options.set_time_offset(time);
- current_options.set_time_offset_type(SG_TIME_GMT_ABSOLUTE);
+ current_options.set_time_offset_type(fgOPTIONS::FG_TIME_GMT_ABSOLUTE);
globals->get_time_params()->init( cur_fdm_state->get_Longitude(),
cur_fdm_state->get_Latitude(),
current_options.get_fg_root() );
// Okay, we now have six possible scenarios
switch ( current_options.get_time_offset_type() ) {
- case SG_TIME_SYS_OFFSET:
+ case fgOPTIONS::FG_TIME_SYS_OFFSET:
globals->set_warp( current_options.get_time_offset() );
break;
- case SG_TIME_GMT_OFFSET:
+ case fgOPTIONS::FG_TIME_GMT_OFFSET:
globals->set_warp( current_options.get_time_offset() -
(currGMT - systemLocalTime) );
break;
- case SG_TIME_LAT_OFFSET:
+ case fgOPTIONS::FG_TIME_LAT_OFFSET:
globals->set_warp( current_options.get_time_offset() -
(aircraftLocalTime - systemLocalTime) );
break;
- case SG_TIME_SYS_ABSOLUTE:
+ case fgOPTIONS::FG_TIME_SYS_ABSOLUTE:
globals->set_warp( current_options.get_time_offset() - cur_time );
//printf("warp = %d\n", warp);
break;
- case SG_TIME_GMT_ABSOLUTE:
+ case fgOPTIONS::FG_TIME_GMT_ABSOLUTE:
globals->set_warp( current_options.get_time_offset() - currGMT );
break;
- case SG_TIME_LAT_ABSOLUTE:
+ case fgOPTIONS::FG_TIME_LAT_ABSOLUTE:
globals->set_warp( current_options.get_time_offset() -
(aircraftLocalTime - systemLocalTime) -
cur_time );
network_olk(false)
{
// set initial values/defaults
- time_offset_type = SG_TIME_SYS_OFFSET;
+ time_offset_type = FG_TIME_SYS_OFFSET;
char* envp = ::getenv( "FG_ROOT" );
if ( envp != NULL ) {
tile_diameter = tile_radius * 2 + 1;
} else if ( arg.find( "--time-offset" ) != string::npos ) {
time_offset = parse_time_offset( (arg.substr(14)) );
- //time_offset_type = SG_TIME_SYS_OFFSET;
+ //time_offset_type = FG_TIME_SYS_OFFSET;
} else if ( arg.find( "--time-match-real") != string::npos ) {
//time_offset = parse_time_offset(arg.substr(18));
- time_offset_type = SG_TIME_SYS_OFFSET;
+ time_offset_type = FG_TIME_SYS_OFFSET;
} else if ( arg.find( "--time-match-local") != string::npos ) {
//time_offset = parse_time_offset(arg.substr(18));
- time_offset_type = SG_TIME_LAT_OFFSET;
+ time_offset_type = FG_TIME_LAT_OFFSET;
} else if ( arg.find( "--start-date-sys=") != string::npos ) {
time_offset = parse_date( (arg.substr(17)) );
- time_offset_type = SG_TIME_SYS_ABSOLUTE;
+ time_offset_type = FG_TIME_SYS_ABSOLUTE;
} else if ( arg.find( "--start-date-lat=") != string::npos ) {
time_offset = parse_date( (arg.substr(17)) );
- time_offset_type = SG_TIME_LAT_ABSOLUTE;
+ time_offset_type = FG_TIME_LAT_ABSOLUTE;
} else if ( arg.find( "--start-date-gmt=") != string::npos ) {
time_offset = parse_date( (arg.substr(17)) );
- time_offset_type = SG_TIME_GMT_ABSOLUTE;
+ time_offset_type = FG_TIME_GMT_ABSOLUTE;
} else if ( arg == "--hud-tris" ) {
tris_or_culled = 0;
FG_AUTO_COORD_ENABLED = 2
};
+ enum fgTimingOffsetType {
+ FG_TIME_SYS_OFFSET = 0,
+ FG_TIME_GMT_OFFSET = 1,
+ FG_TIME_LAT_OFFSET = 2,
+ FG_TIME_SYS_ABSOLUTE = 3,
+ FG_TIME_GMT_ABSOLUTE = 4,
+ FG_TIME_LAT_ABSOLUTE = 5
+ };
+
private:
// The flight gear "root" directory
// Time options
int time_offset; // Use this value to change time.
- sgTimingOffsetType time_offset_type; // Will be set to one of the
- // SG_TIME_* enums, to deterine how
+ fgTimingOffsetType time_offset_type; // Will be set to one of the
+ // FG_TIME_* enums, to deterine how
// time_offset should be used
// Serial port configuration strings
inline int get_tris_or_culled() const { return tris_or_culled; }
inline int get_time_offset() const { return time_offset; }
- inline sgTimingOffsetType get_time_offset_type() const {
+ inline fgTimingOffsetType get_time_offset_type() const {
return time_offset_type;
};
inline void set_units (int value) { units = value; }
inline void set_tris_or_culled (int value) { tris_or_culled = value; }
inline void set_time_offset (int value) { time_offset = value; }
- inline void set_time_offset_type (sgTimingOffsetType value) {
+ inline void set_time_offset_type (fgTimingOffsetType value) {
time_offset_type = value;
}
inline void cycle_view_mode() {