----------------------------
-- TPOD DATA DISPLAY PAGE --
----------------------------

-- GLOBAL VALUES
local	tpod_utc_time				= CreateElement "ceStringPoly"
		tpod_utc_time.name			= "tpod_utc_time"
		tpod_utc_time.material		= mpcd_tpod_font
		tpod_utc_time.init_pos		= mpcd_btn_18_pos
		tpod_utc_time.alignment		= "CenterCenter"
		tpod_utc_time.formats		= {"%02d:%02d:%02d"}
		tpod_utc_time.stringdefs	= MPCD_data2_font_size
		tpod_utc_time.controllers	= {{"tpod_zulu_time"}}
Add_MPCD_Element(tpod_utc_time)

local	tpod_sensor_mode				= CreateElement "ceStringPoly"
		tpod_sensor_mode.name			= "tpod_sensor_mode"
		tpod_sensor_mode.material		= mpcd_tpod_font
		tpod_sensor_mode.init_pos		= {-0.33, 0.75, 0}
		tpod_sensor_mode.alignment		= "LeftCenter"
		tpod_sensor_mode.formats		= {"%s"}
		tpod_sensor_mode.stringdefs		= MPCD_data2_font_size
		tpod_sensor_mode.controllers	= {{"tpod_hotas_mode"}}
Add_MPCD_Element(tpod_sensor_mode)


local	tpod_lsr_code				= CreateElement "ceStringPoly"
		tpod_lsr_code.name			= "tpod_lsr_code"
		tpod_lsr_code.material		= mpcd_tpod_font
		tpod_lsr_code.init_pos		= {-0.18, 0.75, 0}
		tpod_lsr_code.alignment		= "LeftCenter"
		tpod_lsr_code.formats		= {"%04d"}
		tpod_lsr_code.stringdefs	= MPCD_data2_font_size
		tpod_lsr_code.controllers	= {{"tpod_lsr_code"}}
Add_MPCD_Element(tpod_lsr_code)

local	tpod_aqi_range				= CreateElement "ceStringPoly"
		tpod_aqi_range.name			= "tpod_aqi_range"
		tpod_aqi_range.material		= mpcd_tpod_font
		tpod_aqi_range.init_pos		= {-0.93, -0.75, 0}
		tpod_aqi_range.alignment	= "LeftCenter"
		tpod_aqi_range.formats		= {"%1.f"}
		tpod_aqi_range.stringdefs	= MPCD_data2_font_size
		tpod_aqi_range.controllers	= {{"tpod_aqi_rng"}}
Add_MPCD_Element(tpod_aqi_range)

-- DESIGNATION DATA
local	tpod_desg_data				= CreateElement "ceStringPoly"
		tpod_desg_data.name			= "tpod_desg_source"
		tpod_desg_data.material		= mpcd_tpod_font
		tpod_desg_data.init_pos		= {0.40, -0.45, 0}
		tpod_desg_data.alignment	= "LeftCenter"
		tpod_desg_data.formats		= {"%s"}
		tpod_desg_data.stringdefs	= MPCD_data2_font_size
		tpod_desg_data.controllers	= {{"TPOD_is_Operational"}, {"tpod_desg_source"}}
Add_MPCD_Element(tpod_desg_data)

local	tpod_oper_mode				= CreateElement "ceStringPoly"
		tpod_oper_mode.name			= "tpod_oprtl_mode"
		tpod_oper_mode.material		= mpcd_tpod_font
		tpod_oper_mode.init_pos		= {0.40, -0.55, 0}
		tpod_oper_mode.alignment	= "LeftCenter"
		tpod_oper_mode.formats		= {"%s"}
		tpod_oper_mode.stringdefs	= MPCD_data2_font_size
		tpod_oper_mode.controllers	= {{"tpod_oper_state"}}
Add_MPCD_Element(tpod_oper_mode)


-- TARGET DATA
local	tpod_tgt_mgrs				= CreateElement "ceStringPoly"
		tpod_tgt_mgrs.name			= "tpod_tgt_mgrs"
		tpod_tgt_mgrs.material		= mpcd_tpod_font
		tpod_tgt_mgrs.init_pos		= {0.35, 0.65, 0}
		tpod_tgt_mgrs.alignment		= "RightCenter"
		tpod_tgt_mgrs.formats		= {"%s"}
		tpod_tgt_mgrs.stringdefs	= MPCD_data2_font_size
		tpod_tgt_mgrs.controllers	= {{"tpod_has_tgt"}, {"tpod_tgt_mgrs"}}
Add_MPCD_Element(tpod_tgt_mgrs)

local	tpod_tgt_lat				= CreateElement "ceStringPoly"
		tpod_tgt_lat.name			= "tpod_tgt_lat"
		tpod_tgt_lat.material		= mpcd_tpod_font
		tpod_tgt_lat.init_pos		= {0.40, 0.75, 0}
		tpod_tgt_lat.alignment		= "LeftCenter"
		tpod_tgt_lat.formats		= {"%s%3d %02d.%03d"}
		tpod_tgt_lat.stringdefs		= MPCD_data2_font_size
		tpod_tgt_lat.controllers	= {{"tpod_has_tgt"}, {"tpod_tgt_lat"}}
Add_MPCD_Element(tpod_tgt_lat)

local	tpod_tgt_lon				= CreateElement "ceStringPoly"
		tpod_tgt_lon.name			= "tpod_tgt_lon"
		tpod_tgt_lon.material		= mpcd_tpod_font
		tpod_tgt_lon.init_pos		= {0.40, 0.65, 0}
		tpod_tgt_lon.alignment		= "LeftCenter"
		tpod_tgt_lon.formats		= {"%s%03d %02d.%03d"}
		tpod_tgt_lon.stringdefs		= MPCD_data2_font_size
		tpod_tgt_lon.controllers	= {{"tpod_has_tgt"}, {"tpod_tgt_lon"}}
Add_MPCD_Element(tpod_tgt_lon)

local	tpod_tgt_hgt				= CreateElement "ceStringPoly"
		tpod_tgt_hgt.name			= "tpod_tgt_hgt"
		tpod_tgt_hgt.material		= mpcd_tpod_font
		tpod_tgt_hgt.init_pos		= {0.40, 0.55, 0}
		tpod_tgt_hgt.alignment		= "LeftCenter"
		tpod_tgt_hgt.formats		= {"ELV %6dF"}
		tpod_tgt_hgt.stringdefs		= MPCD_data2_font_size
		tpod_tgt_hgt.controllers	= {{"tpod_has_tgt"}, {"tpod_tgt_hgt"}}
Add_MPCD_Element(tpod_tgt_hgt)

--
local	tpod_compass_N					= create_tpod_textured_box( 52, 22, 90, 60)
		tpod_compass_N.name				= "tpod_compass_N"
		tpod_compass_N.init_pos			= {-0.49,  0.30, 0}
		tpod_compass_N.controllers		= {{"TPOD_is_Operational"}}
Add_MPCD_Element(tpod_compass_N)

local	tpod_compass_cross					= create_tpod_textured_box( 11, 120, 29, 282)
		tpod_compass_cross.name				= "tpod_compass_cross"
		tpod_compass_cross.init_pos			= {0.0, 0.0, 0}
		tpod_compass_cross.parent_element	= tpod_compass_N.name
		tpod_compass_cross.controllers		= {{"tpod_ac_HDG", 1.0}}
Add_MPCD_Element(tpod_compass_cross)

local	tpod_compass_cross					= create_tpod_textured_box( 19, 150, 23, 276)
		tpod_compass_cross.name				= "tpod_compass_cross_beam"
		tpod_compass_cross.init_pos			= {0, 0.0, 0}
		tpod_compass_cross.parent_element	= "tpod_compass_cross"
		tpod_compass_cross.controllers		= {{"tpod_ac_ALT", -1.0}}
Add_MPCD_Element(tpod_compass_cross)

local	tpod_CH_size				= CreateElement "ceStringPoly"
		tpod_CH_size.name			= "tpod_CH_size"
		tpod_CH_size.material		= mpcd_tpod_font
		tpod_CH_size.init_pos		= {0.35, 0.06, 0}
		tpod_CH_size.alignment		= "RightCenter"
		tpod_CH_size.formats		= {"%1.fM"}
		tpod_CH_size.stringdefs		= MPCD_data2_font_size
		tpod_CH_size.controllers	= {{"TPOD_is_Operational"}, {"tpod_CH_size"}}
Add_MPCD_Element(tpod_CH_size)

local	tpod_ac_TAS					= CreateElement "ceStringPoly"
		tpod_ac_TAS.name			= "tpod_ac_TAS"
		tpod_ac_TAS.material		= mpcd_tpod_font
		tpod_ac_TAS.init_pos		= {-0.70, -0.65, 0}
		tpod_ac_TAS.alignment		= "LeftCenter"
		tpod_ac_TAS.formats			= {"T%3d"}
		tpod_ac_TAS.stringdefs		= MPCD_data2_font_size
		tpod_ac_TAS.controllers		= {{"TPOD_is_Operational"}, {"tpod_ac_TAS"}}
Add_MPCD_Element(tpod_ac_TAS)

local	tpod_ac_BALT				= CreateElement "ceStringPoly"
		tpod_ac_BALT.name			= "tpod_ac_BALT"
		tpod_ac_BALT.material		= mpcd_tpod_font
		tpod_ac_BALT.init_pos		= {0.80, -0.65, 0}
		tpod_ac_BALT.alignment		= "RightCenter"
		tpod_ac_BALT.formats		= {"%1.f"}
		tpod_ac_BALT.stringdefs		= MPCD_data2_font_size
		tpod_ac_BALT.controllers	= {{"TPOD_is_Operational"}, {"tpod_ac_BALT"}}
Add_MPCD_Element(tpod_ac_BALT)

--
local	tpod_tgt_rng_brg				= CreateElement "ceStringPoly"
		tpod_tgt_rng_brg.name			= "tpod_tgt_rng_brg"
		tpod_tgt_rng_brg.material		= mpcd_tpod_font
		tpod_tgt_rng_brg.init_pos		= {-0.80, -0.75, 0}
		tpod_tgt_rng_brg.alignment		= "LeftCenter"
		tpod_tgt_rng_brg.formats		= {"%03d / %1.1f"}
		tpod_tgt_rng_brg.stringdefs		= MPCD_data2_font_size
		tpod_tgt_rng_brg.controllers	= {{"tpod_has_tgt"}, {"tpod_tgt_brg_rng"}}
Add_MPCD_Element(tpod_tgt_rng_brg)

local	tpod_tgt_os_rng_brg				= CreateElement "ceStringPoly"
		tpod_tgt_os_rng_brg.name		= "tpod_tgt_os_rng_brg"
		tpod_tgt_os_rng_brg.material	= mpcd_tpod_font
		tpod_tgt_os_rng_brg.init_pos	= {0.50, -0.75, 0}
		tpod_tgt_os_rng_brg.alignment	= "LeftCenter"
		tpod_tgt_os_rng_brg.formats		= {"%03d / %1.1f"}
		tpod_tgt_os_rng_brg.stringdefs	= MPCD_data2_font_size
		tpod_tgt_os_rng_brg.controllers	= {{"tpod_has_tgt"}, {"tpod_tgt_obrg_orng"}}
Add_MPCD_Element(tpod_tgt_os_rng_brg)

-- TPOD MESSAGES
local	tpod_lsr_fire_mode				= CreateElement "ceStringPoly"
		tpod_lsr_fire_mode.name			= "tpod_lsr_fire_mode"
		tpod_lsr_fire_mode.material		= mpcd_tpod_font
		tpod_lsr_fire_mode.init_pos		= {0.30, -0.45, 0}
		tpod_lsr_fire_mode.alignment	= "RightCenter"
		tpod_lsr_fire_mode.formats		= {"%s"}
		tpod_lsr_fire_mode.stringdefs	= MPCD_data2_font_size
		tpod_lsr_fire_mode.controllers	= {{"tpod_has_tgt"}, {"tpod_lsr_fmode"}, {"tpod_lsr_mstatus"}}
Add_MPCD_Element(tpod_lsr_fire_mode)

local	tpod_lsr_lss_msg				= CreateElement "ceStringPoly"
		tpod_lsr_lss_msg.name			= "tpod_lsr_lss_msg"
		tpod_lsr_lss_msg.material		= mpcd_tpod_font
		tpod_lsr_lss_msg.init_pos		= {-0.10, -0.45, 0}
		tpod_lsr_lss_msg.alignment		= "RightCenter"
		tpod_lsr_lss_msg.formats		= {"%s"}
		tpod_lsr_lss_msg.stringdefs		= MPCD_data2_font_size
		tpod_lsr_lss_msg.controllers	= {{"tpod_has_tgt"}, {"tpod_trk_mode"}}
Add_MPCD_Element(tpod_lsr_lss_msg)

