-- EHSDI Compass Rose

-- Fixed Elements
local	lubber_line_T					= create_mpcd_textured_box( 109, 951, 165, 1007)
		lubber_line_T.name				= "lubber_line_T"
		lubber_line_T.init_pos			= {0, 0.85, 0}
		lubber_line_T.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Centered"}, {"ac_hdg_true"}}
Add_MPCD_VIDEO_Element(lubber_line_T)

local	lubber_line_M					= create_mpcd_textured_box( 135, 951, 139, 1007)
		lubber_line_M.name				= "lubber_line_M"
		lubber_line_M.init_pos			= {0, 0.85, 0}
		lubber_line_M.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Centered"}}
Add_MPCD_VIDEO_Element(lubber_line_M)

local	lubber_line_T					= create_mpcd_textured_box( 109, 951, 165, 1007)
		lubber_line_T.name				= "lubber_line_T"
		lubber_line_T.init_pos			= {0, 0.7, 0}
		lubber_line_T.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Decentered"}, {"ac_hdg_true"}}
Add_MPCD_VIDEO_Element(lubber_line_T)

local	lubber_line_M					= create_mpcd_textured_box( 135, 951, 139, 1007)
		lubber_line_M.name				= "lubber_line_M"
		lubber_line_M.init_pos			= {0, 0.7, 0}
		lubber_line_M.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Decentered"}}
Add_MPCD_VIDEO_Element(lubber_line_M)

-- Moving Symbols
local	gt_pointer						= create_mpcd_textured_box( 118, 748, 140, 811, nil, 1130)
		gt_pointer.name					= "gt_pointer"
		gt_pointer.init_pos				= {0, 0, 0}
		gt_pointer.controllers			= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Centered"}, {"ac_grd_trk_pointer"}}
Add_MPCD_VIDEO_Element(gt_pointer)

local	gt_pointer_d					= create_mpcd_textured_box( 118, 748, 140, 811, nil, 1360)
		gt_pointer_d.name				= "gt_pointer_d"
		gt_pointer_d.init_pos			= {0, -0.725, 0}
		gt_pointer_d.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Decentered"}, {"ac_grd_trk_pointer"}}
Add_MPCD_VIDEO_Element(gt_pointer_d)

local	gt_pointer_trk					= create_mpcd_textured_box( 855, 4, 877, 380, nil, 380)
		gt_pointer_trk.name				= "gt_pointer_trk"
		gt_pointer_trk.init_pos			= {0, 0, 0}
		gt_pointer_trk.controllers		= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Centered"}, {"ac_grd_trk_line"}, {"ac_grd_trk_pointer"}}
Add_MPCD_VIDEO_Element(gt_pointer_trk)

local	gt_pointer_trk_d				= create_mpcd_textured_box( 855, 4, 877, 620, nil, 620)
		gt_pointer_trk_d.name			= "gt_pointer_trk_d"
		gt_pointer_trk_d.init_pos		= {0, -0.725, 0}
		gt_pointer_trk_d.controllers	= {{"EHSD_MAP_EHSI"}, {"EHSD_CR_Decentered"}, {"ac_grd_trk_line"}, {"ac_grd_trk_pointer"}}
Add_MPCD_VIDEO_Element(gt_pointer_trk_d)

-- Moving Elements
MPCD_center				= CreateElement "ceSimple"
MPCD_center.name		= "MPCD_center"
MPCD_center.init_pos	= {0, 0, 0}
MPCD_center.controllers	= {{"EHSD_Compass_Rose_Center", -0.05}}
Add_MPCD_VIDEO_Element(MPCD_center)

for i = 1, 35 do
	j = i % 3
	
	if j ~= 0 then
		local	compass_rose_dots					= create_mpcd_textured_box( 190, 766, 206, 782)
				compass_rose_dots.name				= "compass_rose_" .. string.format("%02d", i)
				compass_rose_dots.init_pos			= {0, 0, 0}
				compass_rose_dots.parent_element	= MPCD_center.name
				compass_rose_dots.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", i * 10, 0.09}}
		Add_MPCD_VIDEO_Element(compass_rose_dots)
	end
end

local	compass_rose_00					= create_mpcd_textured_box( 249, 402, 274, 434)
		compass_rose_00.name			= "compass_rose_00"
		compass_rose_00.init_pos		= {0, 0, 0}
		compass_rose_00.parent_element	= MPCD_center.name
		compass_rose_00.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 00, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_00)

local	compass_rose_03					= create_mpcd_textured_box( 249, 451, 270, 483)
		compass_rose_03.name			= "compass_rose_03"
		compass_rose_03.init_pos		= {0, 0, 0}
		compass_rose_03.parent_element	= MPCD_center.name
		compass_rose_03.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 30, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_03)

local	compass_rose_06					= create_mpcd_textured_box( 246, 504, 269, 536)
		compass_rose_06.name			= "compass_rose_06"
		compass_rose_06.init_pos		= {0, 0, 0}
		compass_rose_06.parent_element	= MPCD_center.name
		compass_rose_06.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 60, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_06)

local	compass_rose_09					= create_mpcd_textured_box( 249, 557, 272, 589)
		compass_rose_09.name			= "compass_rose_09"
		compass_rose_09.init_pos		= {0, 0, 0}
		compass_rose_09.parent_element	= MPCD_center.name
		compass_rose_09.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 90, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_09)

local	compass_rose_12					= create_mpcd_textured_box( 250, 606, 292, 638)
		compass_rose_12.name			= "compass_rose_12"
		compass_rose_12.init_pos		= {0, 0, 0}
		compass_rose_12.parent_element	= MPCD_center.name
		compass_rose_12.controllers	= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 120, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_12)

local	compass_rose_15					= create_mpcd_textured_box( 250, 658, 292, 692)
		compass_rose_15.name			= "compass_rose_15"
		compass_rose_15.init_pos		= {0, 0, 0}
		compass_rose_15.parent_element	= MPCD_center.name
		compass_rose_15.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 150, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_15)

local	compass_rose_18					= create_mpcd_textured_box( 247, 713, 273, 746)
		compass_rose_18.name			= "compass_rose_18"
		compass_rose_18.init_pos		= {0, 0, 0}
		compass_rose_18.parent_element	= MPCD_center.name
		compass_rose_18.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 180, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_18)

local	compass_rose_21					= create_mpcd_textured_box( 247, 769, 286, 802)
		compass_rose_21.name			= "compass_rose_21"
		compass_rose_21.init_pos		= {0, 0, 0}
		compass_rose_21.parent_element	= MPCD_center.name
		compass_rose_21.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 210, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_21)

local	compass_rose_24					= create_mpcd_textured_box( 247, 820, 292, 852)
		compass_rose_24.name			= "compass_rose_24"
		compass_rose_24.init_pos		= {0, 0, 0}
		compass_rose_24.parent_element	= MPCD_center.name
		compass_rose_24.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 240, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_24)

local	compass_rose_27					= create_mpcd_textured_box( 245, 871, 286, 903)
		compass_rose_27.name			= "compass_rose_27"
		compass_rose_27.init_pos		= {0, 0, 0}
		compass_rose_27.parent_element	= MPCD_center.name
		compass_rose_27.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 270, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_27)

local	compass_rose_30					= create_mpcd_textured_box( 247, 926, 292, 959)
		compass_rose_30.name			= "compass_rose_30"
		compass_rose_30.init_pos		= {0, 0, 0}
		compass_rose_30.parent_element	= MPCD_center.name
		compass_rose_30.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 300, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_30)

local	compass_rose_33					= create_mpcd_textured_box( 247, 976, 293, 1009)
		compass_rose_33.name			= "compass_rose_33"
		compass_rose_33.init_pos		= {0, 0, 0}
		compass_rose_33.parent_element	= MPCD_center.name
		compass_rose_33.controllers		= {{"EHSD_MAP_EHSI"}, {"ehsd_compass_rose", 330, 0.045}}
Add_MPCD_VIDEO_Element(compass_rose_33)
