<root>
<document schema='101' license='1,monie jacobsen,YUWNEC' title='' description='' target='PIC16.33E.MIAC (dsPIC)' >
	<config data='' clkspd='140000000' simspd='1' usewdt='0' constif='0' />
	<plugins >
		<dll_dbg_icd enabled='0' >
			<data name='debug' value='1' />
			<data name='userpins' value='0' />
			<data name='speed' value='0' />
			<data name='usev9' value='0' />
			<data name='breaks' value='8' />
			<data name='stacks' value='8' />
			<data name='clkport' value='1' />
			<data name='clkbit' value='6' />
			<data name='dataport' value='1' />
			<data name='databit' value='7' />
			<data name='ghostype' value='0' />
			<data name='monitor' value='1' />
			<data name='ictloop' value='0' />
			<data name='ictrate' value='20000' />
			<data name='ictmask' value='0' />
			<data name='anlpres' value='19' />
			<data name='digmask1' value='-1' />
			<data name='digmask2' value='-1' />
		</dll_dbg_icd>
		<dll_models enabled='1' />
		<dll_upgrader enabled='1' />
		<dll_webhelp enabled='1' />
	</plugins>
	<supplement use='0' head='' body='' />
	<debug >
		<watch expr='sim_switch' />
		<watch expr='latitude' />
		<watch expr='longitude' />
	</debug>
	<ghost >
		<FK2 >
			<data name='FK2D0' port='4294967295' pin='4294967295' />
			<data name='FK2D1' port='4294967295' pin='4294967295' />
			<data name='FK2D2' port='4294967295' pin='4294967295' />
			<data name='FK2D3' port='4294967295' pin='4294967295' />
			<data name='FK2D4' port='4294967295' pin='4294967295' />
			<data name='FK2D5' port='4294967295' pin='4294967295' />
			<data name='FK2D6' port='4294967295' pin='4294967295' />
			<data name='FK2D7' port='4294967295' pin='4294967295' />
			<data name='FK2D8' port='4294967295' pin='4294967295' />
			<data name='FK2D9' port='4294967295' pin='4294967295' />
			<data name='FK2D10' port='4294967295' pin='4294967295' />
			<data name='FK2D11' port='4294967295' pin='4294967295' />
			<data name='FK2D12' port='4294967295' pin='4294967295' />
			<data name='FK2D13' port='4294967295' pin='4294967295' />
			<data name='FK2D14' port='4294967295' pin='4294967295' />
			<data name='FK2D15' port='4294967295' pin='4294967295' />
			<data name='FK2A0' port='4294967295' pin='4294967295' />
			<data name='FK2A1' port='4294967295' pin='4294967295' />
			<data name='FK2A2' port='4294967295' pin='4294967295' />
			<data name='FK2A3' port='4294967295' pin='4294967295' />
			<data name='FK2A4' port='4294967295' pin='4294967295' />
			<data name='FK2A5' port='4294967295' pin='4294967295' />
		</FK2>
		<ICD >
			<data name='AnalogPrescaleValue' value='19' />
			<data name='DigitalSampleRate' value='100000' />
			<data name='BreakpointCount' value='8' />
			<data name='CallStackDepthCount' value='8' />
			<data name='ClockPort' value='4095' />
			<data name='ClockPin' value='0' />
			<data name='DataPort' value='4095' />
			<data name='DataPin' value='0' />
			<data name='UseDefaultPins' value='1' />
			<data name='WrapEnabled' value='1' />
			<data name='CommsDelayOverridden' value='0' />
			<data name='CommsDelay' value='2' />
			<data name='CalculatedCommsDelay' value='2' />
		</ICD>
		<pins >
			<digital A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
			<analog A='0' B='0' C='0' D='0' E='0' F='0' G='0' H='0' I='0' J='0' K='0' L='0' M='0' N='0' O='0' P='0' Q='0' R='0' S='0' T='0' U='0' V='0' W='0' X='0' Y='0' Z='0' />
		</pins>
	</ghost>
	<components >
		<settings autoimg='1' center='1' unitscale='0' fixedscale='0' fixedx='1' fixedy='1' fixedz='1' headcode='0' />
		<definition guid='d4d3344a-d493-4c62-b47a-51cb02c34379' vstate='40' vmin='0' vmaj='1' srcleaf='' visiblename='' description='' category='' catenable='1' author='' manuname='' manucode='' sysinfo='0' keywords='' dynamic='1' iconpath='' />
		<component class_type='root' codename='panel' x='0' y='0' z='0' xsz='1' ysz='1' zsz='1' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='0' poslock='0' >
			<resources />
			<properties />
			<values />
			<events />
			<apis />
			<variables >
				<variable public='0' >
					<def class_type='variable' name='MONTH' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='AzimuthStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='5' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='HOUR_FP' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='the2' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ElevationStr' type='T8' description='' isconst='0' isinit='0' usrinit='&quot;&quot;' setinit='' >
						<array size='4' />
					</def>
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MINS' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='the1' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='pi' type='f32' description='' isconst='0' isinit='1' usrinit='3.1415927410125732421875' setinit='3.14159265358979323846' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='HOURS' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LAT' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mnanom' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='false' type='b1' description='' isconst='1' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ha' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='REAL_YEAR' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='deg2rad' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='DAY' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='twopi' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='lat_new' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='EL' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='DAYS' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SECS' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='YEAR' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='dec' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='ra' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='lmst' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='az' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='neg_pi' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='mnlong' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='num' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='leap' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='temp1' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='sine' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='gmst' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='delta' type='s16' description='' isconst='0' isinit='1' usrinit='0' setinit='0' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='MIN_FP' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='delta_FP' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='p' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='eclong' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='arcsine' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='term5' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='oblqec' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='elc' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='term4' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='term3' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='term2' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='SEC_FP' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='term1' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='true' type='b1' description='' isconst='1' isinit='1' usrinit='1' setinit='1' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='LONG' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='cosine' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='arc_theta' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
				<variable public='0' >
					<def class_type='variable' name='time' type='f32' description='' isconst='0' isinit='1' usrinit='0.0' setinit='0.00' />
				</variable>
			</variables>
			<macros >
				<macro >
					<flowline name='PrintDecimal' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<param name='number' type='u8' description='' isconst='0' isinit='0' usrinit='0' setinit='' />
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='.number &lt; 10' swap='0' >
							<flowline >
								<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintNumber' >
									<argument exp='&apos;0&apos;' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintNumber' >
							<argument exp='.number' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='arctangent' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='arc_theta' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Convert angle to radians' />
							<exp exp='p = .arc_theta' />
						</command>
						<command class_type='comment' title='' comment='arcsinx=x+(x^3)/6 +3(x^5)/40 + 15(x^7)/336 +105(x^9)/3456 +945(x^11)/42240 + .......' textarea='12,0,1523,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 3 and divide by 3' />
							<exp exp='term1 = fmul (p,p)' />
							<exp exp='term1 = fmul (term1,p)' />
							<exp exp='term1 = fdiv (term1,3)' />
						</command>
						<command class_type='calculation' title='8' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 5 and divide by 5' />
							<exp exp='term2 = fmul (p,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fdiv (term2,5)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 7 and divide by 7' />
							<exp exp='term3 = fmul (p,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fdiv (term3,7)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 9 and divide by 9' />
							<exp exp='term4 = fmul (p,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fdiv (term4,9)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 11 and divide by 11' />
							<exp exp='term5 = fmul (p,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fdiv (term5,11)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// p - term1 + term2 - term3 + term4 - term5' />
							<exp exp='term1 = fsub (p,term1)' />
							<exp exp='term1 = fadd (term1,term2)' />
							<exp exp='term1 = fsub (term1,term3)' />
							<exp exp='term1 = fadd (term1,term4)' />
							<exp exp='.Return = fsub (term1,term5)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Solar_position' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Beregning' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='twopi = 2 * pi' />
							<exp exp='deg2rad = pi / 180' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='DAY = DAY + 20 * (MONTH - 1) + DAY' />
						</command>
						<command class_type='comment' title='' comment='Leap year checking..' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='((YEAR MOD 4) = 0) OR ((REAL_year MOD 400) != 0) AND (DAY &gt;= 60)' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='DAY = DAY + 1' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='comment' title='' comment='%% Get Julian date - 2400000' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  HOUR_FP = int2float (HOUR)
//  MIN_FP = int2float (MIN)
//  SEC_FP = int2float (SEC)
//  HOUR_FP = HOUR_FP + fdiv (MIN_FP,60) + fdiv (SEC_FP,3600)
//  delta = REAL_YEAR - 1949
//  leap = delta / 4
//  delta = delta * 365 + leap + DAYS
//  delta_FP = int2float (delta)
//  delta_FP = fadd (32916.5,delta_FP)
//  HOUR_FP = fdiv (HOUR_FP,24)
//  delta_FP = fadd (delta_FP,HOUR_FP)
//  time = fsub (delta_FP,51545)
//  DISP_STR = FloatToString$ (time)
FCV_HOUR_FP = flt_fromi(FCV_HOUR);
FCV_MIN_FP = flt_fromi(FCV_MIN);
FCV_SEC_FP = flt_fromi(FCV_SEC);
FCV_HOUR_FP = flt_add(flt_add(FCV_HOUR_FP, flt_div(FCV_MIN_FP, 60)), flt_div(FCV_SEC_FP, 3600));
FCV_DELTA = FCV_REAL_YEAR - 1949;
FCV_LEAP = FCV_DELTA / 4;
FCV_DELTA = FCV_DELTA * 365 + FCV_LEAP + FCV_DAYS;
FCV_DELTA_FP = flt_fromi(FCV_DELTA);
FCV_DELTA_FP = flt_add(32916.5, FCV_DELTA_FP);
FCV_HOUR_FP = flt_div(FCV_HOUR_FP, 24);
FCV_DELTA_FP = flt_add(FCV_DELTA_FP, FCV_HOUR_FP);
FCV_TIME = flt_sub(FCV_DELTA_FP, 51545);
FCI_FLOAT_TO_STRING(FCV_TIME, 6, FCV_DISP_STR,FCSZ_DISP_STR);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='HOUR_FP = int2float (HOURS)' />
							<exp exp='MIN_FP = int2float (MINS)' />
							<exp exp='SEC_FP = int2float (SECS)' />
							<exp exp='HOUR_FP = HOUR_FP + fdiv (MIN_FP,60) + fdiv (SEC_FP,3600)' />
							<exp exp='delta = REAL_YEAR - 1949' />
							<exp exp='leap = delta / 4' />
							<exp exp='delta = delta * 365 + leap + DAYS' />
							<exp exp='delta_FP = int2float (delta)' />
							<exp exp='delta_FP = fadd (32916.5,delta_FP)' />
							<exp exp='delta_FP = fadd (delta_FP,fdiv (HOUR_FP,24))' />
							<exp exp='time = fsub (delta_FP,51545)' />
							<exp exp='' />
						</command>
						<command class_type='comment' title='' comment='% Ecliptic coordinates
%% Mean longitude' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='mnlong = fadd (280.460,fmul (0.9856474,time))' />
							<exp exp='mnlong = fmod (mnlong,360)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' ccode='//Decision
//Decision: mnlong &lt; 0?
if (flt_lt(FCV_MNLONG, 0))
{
' cmdcolor='3568629' cmdcolor_sec='3568629' exp='mnlong &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  mnlong = fadd (mnlong,360)
FCV_MNLONG = flt_add(FCV_MNLONG, 360);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='mnlong = fadd (mnlong,360)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Mean longitude' />
							<exp exp='mnanom = fadd (357.528,fmul (0.9856003,time))' />
							<exp exp='mnanom = fmod (mnanom,360)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' ccode='//Decision
//Decision: mnlong &lt; 0?
if (flt_lt(FCV_MNLONG, 0))
{
' cmdcolor='3568629' cmdcolor_sec='3568629' exp='mnanom &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  mnlong = fadd (mnlong,360)
FCV_MNLONG = flt_add(FCV_MNLONG, 360);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='mnanom = fadd (mnanom,360)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='//Ecliptic longitude and obliquity of ecliptic' />
							<exp exp='mnanom = fmul (mnanom,deg2rad)' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,423,0' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='sine' />
							<argument exp='mnanom' />
						</command>
						<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  eclong = fmul (1.915,sine)
//  deg = 2 * mnanom
FCV_ECLONG = flt_mul(1.915, FCV_SINE);
FCV_DEG = flt_mul(2, FCV_MNANOM);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='eclong = fmul (1.915,sine)' />
							<exp exp='mnanom = fmul (2,mnanom)' />
							<exp exp='eclong = fadd (eclong,mnlong)' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='sine' />
							<argument exp='mnanom' />
						</command>
						<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  eclong = eclong + (0.020 * sine)
//  eclong = eclong MOD 360
FCV_ECLONG = flt_add(FCV_ECLONG, (flt_mul(0.020, FCV_SINE)));
FCV_ECLONG = flt_rem(FCV_ECLONG, 360);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='eclong = fadd (eclong,fmul (0.020,sine))' />
							<exp exp='eclong = fmod (eclong,360)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' ccode='//Decision
//Decision: mnlong &lt; 0?
if (flt_lt(FCV_MNLONG, 0))
{
' cmdcolor='3568629' cmdcolor_sec='3568629' exp='eclong &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  mnlong = fadd (mnlong,360)
FCV_MNLONG = flt_add(FCV_MNLONG, 360);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='eclong = fadd (eclong,360)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='eclong = fmul (eclong,deg2rad)' />
							<exp exp='oblqec = fsub (23.439,fmul (0.0000004,time))' />
							<exp exp='oblqec = fmul (oblqec,deg2rad)' />
							<exp exp='' />
						</command>
						<command class_type='comment' title='' comment='// Celestial coordinates
// Right ascension and declination' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='sine' />
							<argument exp='eclong' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='cosine' >
							<return exp='cosine' />
							<argument exp='oblqec' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='num = fmul (sine,cosine)' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='cosine' >
							<return exp='cosine' />
							<argument exp='eclong' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='arc_theta = fdiv (num,cosine)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='arc_theta &gt; 1' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='the1 = 0.7' />
									<exp exp='the2 = (the1 - arc_theta) / ((-arc_theta * the1) - 1)' />
								</command>
								<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arctangent' >
									<return exp='ra' />
									<argument exp='the1' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='temp1 = ra' />
								</command>
								<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arctangent' >
									<return exp='ra' />
									<argument exp='the2' />
								</command>
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='ra = ra + temp1' />
								</command>
							</flowline>
							<flowline >
								<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='arc_theta &gt;= -1 AND arc_theta &lt;= 1' swap='0' >
									<flowline >
										<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arctangent' >
											<return exp='ra' />
											<argument exp='arc_theta' />
										</command>
									</flowline>
									<flowline >
										<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='arc_theta &lt; -1' swap='0' >
											<flowline >
												<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='arc_theta = arc_theta * (-1)' />
													<exp exp='the1 = 0.7' />
													<exp exp='the2 = (the1 - arc_theta) / ((-arc_theta * the1) - 1)' />
												</command>
												<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arctangent' >
													<return exp='ra' />
													<argument exp='the1' />
												</command>
												<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='temp1 = ra' />
												</command>
												<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arctangent' >
													<return exp='ra' />
													<argument exp='the2' />
												</command>
												<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
													<exp exp='ra = ra + temp1' />
													<exp exp='ra = ra * (-1)' />
												</command>
											</flowline>
											<flowline />
										</command>
									</flowline>
								</command>
							</flowline>
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='cosine &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='ra = fadd (ra,pi)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='(cosine &gt;= 0) &amp;&amp; (num &lt; 0)' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='ra = fadd (ra,twopi)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='dec = sine' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='sine' />
							<argument exp='oblqec' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='arc_theta = fmul (sine,dec)' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arcsine' >
							<return exp='dec' />
							<argument exp='arc_theta' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,-16,36,-16' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Local coordinates' />
							<exp exp='// Greenwich mean sidereal time' />
							<exp exp='gmst = fmul (0.0657098242,time)' />
							<exp exp='gmst = fadd (gmst,HOUR_FP)' />
							<exp exp='gmst = fadd (6.697375,gmst)' />
							<exp exp='gmst = fmod (gmst,24)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='gmst &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='gmst = fadd (gmst,24)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Local mean sidereal time' />
							<exp exp='lmst = fdiv (LONG,15)' />
							<exp exp='lmst = fadd (gmst,lmst)' />
							<exp exp='' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='lmst = fmod (lmst,24)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='lmst &lt; 0' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='lmst = fadd (lmst,24)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  lmst = fmul (lmst,fmul (15,deg2rad))
//  // Hour angle
//  ha = fsub (lmst,ra)
//  neg_pi = fmul (-1,pi)
FCV_LMST = flt_mul(FCV_LMST, flt_mul(15, FCV_DEG2RAD));
FCV_HA = flt_sub(FCV_LMST, FCV_RA);
FCV_NEG_PI = flt_mul(-1, FCV_PI);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='ha = fmul (15,deg2rad)' />
							<exp exp='lmst = fmul (lmst,ha)' />
							<exp exp='// Hour angle' />
							<exp exp='ha = fsub (lmst,ra)' />
							<exp exp='neg_pi = fmul (-1,pi)' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' ccode='//Decision
//Decision: ha &lt; neg_pi?
if (flt_lt(FCV_HA, FCV_NEG_PI))
{
' cmdcolor='3568629' cmdcolor_sec='3568629' exp='ha &lt; neg_pi' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='ha = fadd (ha,twopi)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' cmdcolor='3568629' cmdcolor_sec='3568629' exp='ha &gt; pi' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='ha = fsub (ha,twopi)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='cosine' >
							<return exp='EL' />
							<argument exp='ha' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' ccode='//Calculation
//Calculation:
//  deg = fmul (lat,deg2rad)
FCV_DEG = flt_mul(FCV_LAT, FCV_DEG2RAD);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='lat_new = fmul (LAT,deg2rad)' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='cosine' >
							<return exp='cosine' />
							<argument exp='lat_new' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='EL = fmul (cosine,EL)' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='cosine' >
							<return exp='cosine' />
							<argument exp='dec' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='EL = fmul (cosine,EL)' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='arc_theta' />
							<argument exp='dec' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='elc = arc_theta' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='sine' />
							<argument exp='lat_new' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='arc_theta = fmul (elc,sine)' />
							<exp exp='arc_theta = fadd (arc_theta,EL)' />
							<exp exp='elc = fdiv (elc,sine)' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arcsine' >
							<return exp='EL' />
							<argument exp='arc_theta' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='sine' >
							<return exp='sine' />
							<argument exp='ha' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='az = fmul (cosine,sine)' />
							<exp exp='az = fmul (-1,az)' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='cosine' >
							<return exp='cosine' />
							<argument exp='EL' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='arc_theta = fdiv (az,cosine)' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arcsine' >
							<return exp='az' />
							<argument exp='arc_theta' />
						</command>
						<command class_type='call' title='Call Macro' textarea='36,0,511,300' cmdcolor='1975743' cmdcolor_sec='1975743' macro='arcsine' >
							<return exp='arcsine' />
							<argument exp='elc' />
						</command>
						<command class_type='decision' title='Decision' textarea='36,0,511,300' ccode='//Decision
//Decision: el &gt;= arcsine?
if (flt_ge(FCV_EL, FCV_ARCSINE))
{
' cmdcolor='3568629' cmdcolor_sec='3568629' exp='EL &gt;= arcsine' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='az = fsub (pi,az)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='decision' title='Decision' cmdcolor='3568629' cmdcolor_sec='3568629' exp='(EL &lt;= arcsine) AND (ha &gt; 0)' swap='0' >
							<flowline >
								<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
									<exp exp='az = fadd (az,twopi)' />
								</command>
							</flowline>
							<flowline />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='EL = fdiv (EL,deg2rad)' />
							<exp exp='ElevationStr = FloatToString$ ((fmul (el,10)))' />
							<exp exp='' />
							<exp exp='' />
							<exp exp='' />
							<exp exp='' />
						</command>
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='az = fdiv (az,deg2rad)' />
							<exp exp='AzimuthStr = FloatToString$ (az)' />
							<exp exp='' />
							<exp exp='' />
							<exp exp='' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='DisplayCursor' >
							<argument exp='0' />
							<argument exp='4' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintString' >
							<argument exp='&quot;Azimuth   : &quot;' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintString' >
							<argument exp='AzimuthStr' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintASCII' >
							<argument exp='223' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='DisplayCursor' >
							<argument exp='0' />
							<argument exp='3' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintString' >
							<argument exp='&quot;Elevation :  &quot;' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintString' >
							<argument exp='ElevationStr' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintASCII' >
							<argument exp='223' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='GPS_Coordinates' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_Latitude' >
							<return exp='LAT' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_Longitude' >
							<return exp='LONG' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintTime' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_UTC_Time' >
							<return exp='SECS' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_UTC_Time' >
							<return exp='MINS' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_UTC_Time' >
							<return exp='HOURS' />
							<argument exp='2' />
						</command>
						<command class_type='calculation' title='Dansk normaltiden UTC+1' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='HOURS = HOURS + 1' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='DisplayCursor' >
							<argument exp='0' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='PrintDecimal' >
							<argument exp='HOURS' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintASCII' >
							<argument exp='&apos;:&apos;' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='PrintDecimal' >
							<argument exp='MINS' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintASCII' >
							<argument exp='&apos;:&apos;' />
						</command>
						<command class_type='call' title='Call Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='PrintDecimal' >
							<argument exp='SECS' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='sine' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='deg' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  p = sine.deg - twopi * (sine.deg &gt; pi)
FCV_P = flt_sub(FCL_DEG, flt_mul(FCV_TWOPI, flt_fromi((flt_gt(FCL_DEG, FCV_PI)))));
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='p = .deg - twopi * (.deg &gt; pi)' />
						</command>
						<command class_type='comment' title='' comment='sinx=x-(x^3)/3! +(x^5)/5! - (x^7)/7! +(x^9)/9! -(x^11)/11! + .......' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='calculation' title='Calculation' textarea='36,0,36,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 3 and divide by 6' />
							<exp exp='term1 = fmul (p,p)' />
							<exp exp='term1 = fmul (term1,p)' />
							<exp exp='term1 = fdiv (term1,6)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 5 and divide by 120' />
							<exp exp='term2 = fmul (p,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fdiv (term2,120)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 7  and divide by 5040' />
							<exp exp='term3 = fmul (p,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fdiv (term3,5040)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 9  and divide by 362880' />
							<exp exp='term4 = fmul (p,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fdiv (term4,362880)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 11  and divide by 39916800' />
							<exp exp='term5 = fmul (p,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fdiv (term5,39916800)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// p - term1 + term2 - term3 + term4 - term5' />
							<exp exp='term1 = fsub (p,term1)' />
							<exp exp='term1 = fadd (term1,term2)' />
							<exp exp='term1 = fsub (term1,term3)' />
							<exp exp='term1 = fadd (term1,term4)' />
							<exp exp='.Return = fsub (term1,term5)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='PrintDate' description='' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_UTC_Date' >
							<return exp='DAY' />
							<argument exp='0' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_UTC_Date' >
							<return exp='MONTH' />
							<argument exp='1' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='ma_gps1' macro='GPS_Read_UTC_Date' >
							<return exp='YEAR' />
							<argument exp='2' />
						</command>
						<command class_type='calculation' title='Beregning' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='REAL_YEAR = 2000 + YEAR' />
						</command>
						<command class_type='call' title='Kald Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='PrintDecimal' >
							<argument exp='DAY' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintASCII' >
							<argument exp='&apos;:&apos;' />
						</command>
						<command class_type='call' title='Kald Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='PrintDecimal' >
							<argument exp='MONTH' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintASCII' >
							<argument exp='&apos;:&apos;' />
						</command>
						<command class_type='call' title='Kald Komponent Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintString' >
							<argument exp='&quot;20&quot;' />
						</command>
						<command class_type='call' title='Kald Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='PrintDecimal' >
							<argument exp='YEAR' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='arcsine' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='arc_theta' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Convert angle to radians' />
							<exp exp='p = .arc_theta' />
						</command>
						<command class_type='comment' title='' comment='arcsinx=x+(x^3)/6 +3(x^5)/40 + 15(x^7)/336 +105(x^9)/3456 +945(x^11)/42240 + .......' textarea='12,0,1548,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='calculation' title='Calculation' textarea='36,0,511,0' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 3 and divide by 6' />
							<exp exp='term1 = fmul (p,p)' />
							<exp exp='term1 = fmul (term1,p)' />
							<exp exp='term1 = fdiv (term1,6)' />
						</command>
						<command class_type='calculation' title='8' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 5 multiply by 3 and divide by 120' />
							<exp exp='term2 = fmul (p,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (3,term2)' />
							<exp exp='term2 = fdiv (term2,40)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 7 multiply by 15 and divide by 336' />
							<exp exp='term3 = fmul (p,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (15,term3)' />
							<exp exp='term3 = fdiv (term3,336)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 9 multiply by 105 and divide by 3456' />
							<exp exp='term4 = fmul (p,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (105,term4)' />
							<exp exp='term4 = fdiv (term4,3456)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 11 multiply by 945 and divide by 42240' />
							<exp exp='term5 = fmul (p,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (945,term5)' />
							<exp exp='term5 = fdiv (term5,42240)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// p + term1 + term2 + term3 + term4 + term5' />
							<exp exp='term1 = fadd (p,term1)' />
							<exp exp='term1 = fadd (term1,term2)' />
							<exp exp='term1 = fadd (term1,term3)' />
							<exp exp='term1 = fadd (term1,term4)' />
							<exp exp='.Return = fadd (term1,term5)' />
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='Main' description='03-03-2017' >
						<return name='Return' type='v0' description='' isconst='0' isinit='0' usrinit='' setinit='' />
						<command class_type='calculation' title='Beregning' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='//Module CAN L to MIAC CL' />
							<exp exp='//Module CAN H to MIAC CH' />
							<exp exp='' />
							<exp exp='// For at aktivere den interne MIAC CAN with resistor 120 ohms,' />
							<exp exp='// One wire between T og CH on MIAC Ardunio' />
						</command>
						<command class_type='calculation' title='Dansk normaltiden UTC+1' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='HOURS = 9' />
							<exp exp='MINS = 26' />
							<exp exp='SECS = 0' />
							<exp exp='DAY = 6' />
							<exp exp='Month = 6' />
							<exp exp='YEAR = 18' />
							<exp exp='REAL_YEAR = 2000 + YEAR' />
						</command>
						<command class_type='calculation' title='GPS Cordinates' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='LAT = 55.121522853078424' />
							<exp exp='LONG = 10.512693524360657' />
						</command>
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='DisplayStart' />
						<command class_type='call' title='Call Component Macro' cmdcolor='1975743' cmdcolor_sec='1975743' component='miac_dspic1' macro='PrintString' >
							<argument exp='&quot;GPS Start up!&quot;' />
						</command>
						<command class_type='loop' title='Loop' cmdcolor='3568629' cmdcolor_sec='3568629' type='0' exp='1' >
							<flowline >
								<command class_type='call' title='Kald Macro' cmdcolor='1975743' cmdcolor_sec='1975743' macro='Solar_position' />
							</flowline>
						</command>
					</flowline>
				</macro>
				<macro >
					<flowline name='cosine' description='' >
						<return name='Return' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<param name='deg' type='f32' description='' isconst='0' isinit='0' usrinit='0.0' setinit='' />
						<command class_type='calculation' title='Calculation' ccode='//Calculation
//Calculation:
//  // Enter angle in degrees
//  deg = 89
//  deg = deg - 360 * (deg &gt;= 180)
//  rad = 0.0174532925 // (pi/180)
//  // Convert angle to radians
//  p = fmul (deg,rad)
FCV_DEG = 89;
FCV_DEG = flt_sub(FCV_DEG, flt_fromi(360 * (flt_ge(FCV_DEG, 180))));
FCV_RAD = 0.0174532925;
FCV_P = flt_mul(FCV_DEG, FCV_RAD);
' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Angle in radians' />
							<exp exp='p = .deg - twopi * (.deg &gt; pi)' />
						</command>
						<command class_type='comment' title='' comment='cosx=1-(x^2)/2! +(x^4)/4! - (x^6)/6! +(x^8)/8! -(x^10)/10! + .......' textarea='12,0,12,0' cmdcolor='1975743' cmdcolor_sec='1975743' />
						<command class_type='calculation' title='Calculation' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise P to the power 2 and divide by 2' />
							<exp exp='term1 = fmul (p,p)' />
							<exp exp='term1 = fdiv (term1,2)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 4 and divide by 24' />
							<exp exp='term2 = fmul (p,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fmul (term2,p)' />
							<exp exp='term2 = fdiv (term2,24)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 6 and divide by 720' />
							<exp exp='term3 = fmul (p,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fmul (term3,p)' />
							<exp exp='term3 = fdiv (term3,720)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 8 and divide by 40320' />
							<exp exp='term4 = fmul (p,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fmul (term4,p)' />
							<exp exp='term4 = fdiv (term4,40320)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// Raise p to the power 10  and divide by 3628800' />
							<exp exp='term5 = fmul (p,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fmul (term5,p)' />
							<exp exp='term5 = fdiv (term5,3628800)' />
						</command>
						<command class_type='calculation' title='Calculation' textarea='36,0,511,300' cmdcolor='7895044' cmdcolor_sec='7895044' >
							<exp exp='// 1 - term1 + term2 - term3 + temr4 - term5' />
							<exp exp='term1 = fsub (1,term1)' />
							<exp exp='term1 = fadd (term1,term2)' />
							<exp exp='term1 = fsub (term1,term3)' />
							<exp exp='term1 = fadd (term1,term4)' />
							<exp exp='.Return = fsub (term1,term5)' />
						</command>
					</flowline>
				</macro>
			</macros>
			<component class_type='ref' guid='bd4a15a6-c326-4762-8573-3e7a6fde7d88' vmin='0' vmaj='1' codename='ma_gps1' x='100' y='0' z='30.25' xsz='70' ysz='90' zsz='60.5' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='MODULE_TYPE' data='006' />
					<value target='ORDINAL' data='000' />
					<value target='CAN_ID' data='96' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
			<component class_type='ref' guid='596e6f4d-d87a-4e8b-b108-c0501127c382' vmin='2' vmaj='1' codename='miac_dspic1' x='-20' y='0' z='28.875' xsz='133' ysz='98.5' zsz='57.75' xang='0' yang='0' zang='0' xquat='0' yquat='0' zquat='0' wquat='1' visible='1' interactive='1' solid='1' layer='1' poslock='0' >
				<resources />
				<properties />
				<values >
					<value target='LCD_X' data='1' />
					<value target='LCD_Y' data='4' />
					<value target='ORIGIN_X' data='3' />
					<value target='ORIGIN_Y' data='8' />
					<value target='ROWS' data='5' />
					<value target='COLS' data='20' />
					<value target='WIDTH' data='6' />
					<value target='HEIGHT' data='10' />
					<value target='TEMP_VAL' data='0b0000000' />
					<value target='GLYPH_COUNT' data='128' />
					<value target='Q1' data='$PORTD.0' />
					<value target='Q2' data='$PORTD.1' />
					<value target='Q3' data='$PORTD.2' />
					<value target='Q4' data='$PORTD.3' />
					<value target='A' data='$PORTD.4' />
					<value target='B' data='$PORTD.5' />
					<value target='C' data='$PORTD.6' />
					<value target='D' data='$PORTD.7' />
					<value target='DISPLAY_COLOUR' data='0xFF5757' />
					<value target='I1' data='$PORTB.0' />
					<value target='I2' data='$PORTB.1' />
					<value target='E1' data='$PORTF.0' />
					<value target='E2' data='$PORTF.1' />
				</values>
				<events />
				<apis />
				<variables />
				<macros />
			</component>
		</component>
	</components>
	<keymap />
	<panel2d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='2105930' img='' style='0' />
		<camera xe='11.3832' ye='9.92021' ze='319.79' xt='11.3832' yt='9.92021' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
	</panel2d>
	<panel3d shadows='0' lighting='2' brightness='0' perspective='0' >
		<background rgb='8409120' img='' style='0' />
		<table rgb='7360576' img='' style='0' size='25' />
		<camera xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey0 xe='0' ye='0' ze='300' xt='0' yt='0' zt='0' xquat='0' yquat='0' zquat='0' wquat='1' />
		<camerakey1 xe='-3.67394e-14' ye='0' ze='-300' xt='0' yt='0' zt='0' xquat='0' yquat='1' zquat='0' wquat='6.12323e-17' />
		<camerakey2 xe='0' ye='-300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.707107' yquat='0' zquat='0' wquat='0.707107' />
		<camerakey3 xe='-3.67394e-14' ye='300' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-4.32978e-17' yquat='0.707107' zquat='0.707107' wquat='4.32978e-17' />
		<camerakey4 xe='-300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='0.5' zquat='0.5' wquat='0.5' />
		<camerakey5 xe='300' ye='-6.66134e-14' ze='6.66134e-14' xt='0' yt='0' zt='0' xquat='-0.5' yquat='-0.5' zquat='-0.5' wquat='0.5' />
		<camerakey6 xe='-173.205' ye='-173.205' ze='173.205' xt='0' yt='0' zt='0' xquat='-0.424708' yquat='0.17592' zquat='0.339851' wquat='0.820473' />
	</panel3d>
	<layout >
		<view type='0' name='Main' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='70' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='Solar_position' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintTime' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='GPS_Coordinates' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintDate' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='PrintDecimal' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='cosine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='arcsine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='sine' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
		<view type='0' name='arctangent' mode='0' placement='LAAAAAAAAAABAAAA---------------------wUAAAAYAAAA1QMAAHEDAAA' zoom='75' scrollx='0' scrolly='0' flags='0' />
	</layout>
</document>
</root>
