Esempio n. 1
0
	def __init__(self):
		
		self.global_time = 0.0 #Used for timing reasons. 
		self.prev_time = 0.0 #Used for delta time calc in comp function.
		self.count = 0
		self.comp_time = 0.0 #Used for timer for comp_second function.
		self.quit_flag = False #If True then RJGlass will exit
		self.attitude = attitude_c()
		
		self.FMS = FMS_control.FMS_c(self)
		self.declutter = declutter_c()
		self.airspeed = airspeed_c()
		self.aileron_pos= data_obj(0)
		self.elev_trim = data_obj(0)	
		self.FMA = FMA_c() #Flight Mode Announciator
		self.AP = autopilot.AP_c(self.attitude, self.global_time, self)
		self.AP.aileron_pos = event_obj(0)
		self.AP.elevtrim_pos = event_obj(0)
		#self.radar_alt = 0 # Integer
		self.ias_bug = 220 #Integer
		self.altimeter = altimeter_c()
		self.flaps = flaps_c()
		self.fuel = fuel_c()
		self.gear = Gear_c()
		self.brakes = Brakes_c()
		self.trim = Trim_c()
		self.APU = APU_c()
		self.onground = data_obj(1)
		self.total_weight = data_obj(0)
		self.OAT = data_obj(25.0)
		self.HSI = HSI_c()
		self.NAV = NAV_c()
	#	self.ADF1 = ADF_c("ADF1")
	#	self.ADF2 = ADF_c("ADF2")
		self.ND = ND_c()
		self.VSI = data_obj(-800)
		
		self.Eng_1 = Engine_c(1)
		self.Eng_2 = Engine_c(2)
		
		self.Com_1 = Radio_c(1,True)
		self.Com_2 = Radio_c(2,False)
		self.Nav_1 = Radio_c(1,False)
		self.Nav_2 = Radio_c(2,False)
		
		self.swap_com1 = event_obj(0)
		self.swap_com2 = event_obj(0)
		self.swap_nav1 = event_obj(0)
		self.swap_nav2 = event_obj(0)

		self.whole_inc_com1 = event_obj(0)
		self.fract_inc_com1 = event_obj(0)
		self.whole_dec_com1 = event_obj(0)
		self.fract_dec_com1 = event_obj(0)
		
		self.whole_inc_com2 = event_obj(0)
		self.fract_inc_com2 = event_obj(0)
		self.whole_dec_com2 = event_obj(0)
		self.fract_dec_com2 = event_obj(0)
		
		self.whole_inc_nav1 = event_obj(0)
		self.fract_inc_nav1 = event_obj(0)
		self.whole_dec_nav1 = event_obj(0)
		self.fract_dec_nav1 = event_obj(0)
		
		self.whole_inc_nav2 = event_obj(0)
		self.fract_inc_nav2 = event_obj(0)
		self.whole_dec_nav2 = event_obj(0)
		self.fract_dec_nav2 = event_obj(0)

		self.TEST = event_obj(32000)
		self.TEST4 = data_obj(100)
		self.TEST2 = event_obj(100)
		#self.LatLong = (math.radians(41.9217),math.radians(-84.0825))
		self.Latitude = data_obj(math.radians(37.613))
		self.Longitude = data_obj(math.radians(-122.357))
		self.PFD_pickle = PFD_pickle_c(self)
		self.EICAS_pickle = EICAS_pickle_c(self)
#		self.LatLong = (0.73675821079214898, -1.4550227732038261)
		#Frame Timer Variables
		self.clock = time.time() 
		
		self.count2 = 0 #counter used to determine clock cycle
		self.frame_time = 0.01 #Time between frames. 1 / frame_time = FPS (frames per second)
		self.nodata = False
		self.nodata_time = 0
		#Initialize sounds
		self.callouts = sounds.init_callouts(True)
		#Dynamic variable for testing
		self.dynamic_value = 0
		self.dynamic_step = 1
		
		#self.glass.__init__(self)
		self.variables = variable.variable_c(self) #Must be at end.
		self.events = event.event_c(self)