home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0" encoding="utf-8" ?>
- <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
- <stack>
- <name>in</name>
- <id>-1</id>
- <cardCount>5</cardCount>
- <cardID>3829</cardID>
- <listID>5319</listID>
- <cantModify><false /></cantModify>
- <cantDelete><false /></cantDelete>
- <cantAbort><false /></cantAbort>
- <cardSize>
- <width>512</width>
- <height>342</height>
- </cardSize>
- <script>on calculate
- set cursor to 4
- repeat with x = 1 to 6
- if card field x is empty then put "0" into card field x
- end repeat
- lock screen
- put the value of cd field "LatDeg" into dlat
- put the value of cd field "LatMin" into mlat
- put the value of cd field "LatSec" into slat
- put the value of cd field "LonDeg" into dlon
- put the value of cd field "LonMin" into mlon
- put the value of cd field "LonSec" into slon
- put (dlat + mlat/60 + slat/3600) into lat -- Calculate latitude
- put (lat*pi/180) into lat
- put (dlon + mlon/60 + slon/3600) into lon -- Calculate longitude
- put (lon*pi/180) into lon
- put (sin(lat)) into sinlat
-
- if hilite of card button 6 is true then
- repeat with x = 2 to 5 -- Determine time zone chosen
- if the hilite of button x is true then put (x-1) into tzone
- end repeat
- put (60 + tzone*15) into zonelon -- Determine local time zone longitude
- put (zonelon*pi/180) into zonelon
- put (zonelon - lon) into deltalon -- Difference in longitudes
- else put 0 into deltalon
- put empty into card field 7
- doMenu "New Card"
- hide menuBar
- set lineSize to 2
- set textFont to "Geneva"
- set textSize to 18
- set textStyle to plain
- choose rectangle tool
- drag from 56,32 to 356,332
- put (atan(0.5)) into thmax
-
- repeat with x = -5 to 5
- choose line tool
- put (deltalon + 15*x*pi/180) into timeang -- Time angle of line
- put (atan(tan(timeang)*sinlat)) into hourang -- Hour angle
- put (hourang*180/pi) & return after card field 7 of card "Calculate"
- if (abs(hourang) <= thmax) then
- put 1 into flag
- put round(206 + 300*tan(hourang)) into newx
- put 32 into newy
- drag from 206,332 to newx,newy -- Draw hour angle
- else
- put 0 into flag
- put round(206 + 150*abs(hourang)/hourang) into newx
- put round(332 - 150/abs(tan(hourang))) into newy
- drag from 206,332 to newx,newy -- Draw hour angle
- end if
- choose text tool
- if flag = 1 then set textAlign to center
- else set textAlign to right
- if flag = 1 then click at newx,(newy - 14)
- else click at (newx + abs(hourang)/hourang*23),newy
- if x = -5 then type "VII"
- else if x = -4 then type "VIII"
- else if x = -3 then type "IX"
- else if x = -2 then type "X"
- else if x = -1 then type "XI"
- else if x = 0 then type "XII"
- else if x = 1 then type "I"
- else if x = 2 then type "II"
- else if x = 3 then type "III"
- else if x = 4 then type "IV"
- else if x = 5 then
- click at (newx + abs(hourang)/hourang*10),newy
- set textAlign to left
- type "V"
- end if
- end repeat
- click at 410,50
- type "Latitude" & return
- type dlat && mlat && slat & return & return
- type "Longitude" & return
- type dlon && mlon && slon & return
- if hilite of card button 6 of card "Calculate" is true then type "Mean"
- else type "Apparent"
- choose browse tool
- show bg button 3
- end calculate
-
- on openStack
- hide message box
- go to card "Instructions"
- end openStack</script>
- <background id="2075" file="background_2075.xml" name="eqn of time" />
- <background id="2783" file="background_2783.xml" name="Sundial" />
- <background id="4400" file="background_4400.xml" name="" />
- <card id="3829" file="card_3829.xml" marked="false" name="Instructions" owner="2783" />
- <card id="5648" file="card_5648.xml" marked="false" name="" owner="2783" />
- <card id="2558" file="card_2558.xml" marked="false" name="Eqn of time" owner="2075" />
- <card id="4119" file="card_4119.xml" marked="false" name="US time zones" owner="4400" />
- <card id="2854" file="card_2854.xml" marked="false" name="Calculate" owner="2783" />
- </stack>
-