Horizontal sundial calculations: Difference between revisions
Content added Content deleted
Alextretyak (talk | contribs) (Added 11l) |
|||
Line 12: | Line 12: | ||
Wikipedia: A [[wp:sundial|sundial]] is a device that measures time by the position of the [[wp:Sun|Sun]]. In common designs such as the horizontal sundial, the sun casts a [[wp:shadow|shadow]] from its ''style'' (also called its [[wp:Gnomon|Gnomon]], a thin rod or a sharp, straight edge)<!-- The style is the time telling edge of the gnomon, Waugh,1973 p29--> onto a flat surface marked with lines indicating the hours of the day (also called the [[wp:Sundial#Terminology|dial face]] or dial plate). As the sun moves across the sky, the shadow-edge progressively aligns with different hour-lines on the plate. Such designs rely on the style being aligned with the axis of the Earth's rotation. Hence, if such a sundial is to tell the correct time, the style must point towards [[wp:true north|true north]] (not the [[wp:North Magnetic Pole|north]] or [[wp:Magnetic South Pole|south magnetic pole]]) and the style's angle with horizontal must equal the sundial's geographical [[wp:latitude|latitude]]. |
Wikipedia: A [[wp:sundial|sundial]] is a device that measures time by the position of the [[wp:Sun|Sun]]. In common designs such as the horizontal sundial, the sun casts a [[wp:shadow|shadow]] from its ''style'' (also called its [[wp:Gnomon|Gnomon]], a thin rod or a sharp, straight edge)<!-- The style is the time telling edge of the gnomon, Waugh,1973 p29--> onto a flat surface marked with lines indicating the hours of the day (also called the [[wp:Sundial#Terminology|dial face]] or dial plate). As the sun moves across the sky, the shadow-edge progressively aligns with different hour-lines on the plate. Such designs rely on the style being aligned with the axis of the Earth's rotation. Hence, if such a sundial is to tell the correct time, the style must point towards [[wp:true north|true north]] (not the [[wp:North Magnetic Pole|north]] or [[wp:Magnetic South Pole|south magnetic pole]]) and the style's angle with horizontal must equal the sundial's geographical [[wp:latitude|latitude]]. |
||
<br><br> |
<br><br> |
||
=={{header|11l}}== |
|||
{{trans|Python}} |
|||
<lang 11l>V lat = Float(input(‘Enter latitude => ’)) |
|||
V lng = Float(input(‘Enter longitude => ’)) |
|||
V ref = Float(input(‘Enter legal meridian => ’)) |
|||
print() |
|||
V slat = sin(radians(lat)) |
|||
print(‘ sine of latitude: #.3’.format(slat)) |
|||
print(‘ diff longitude: #.3’.format(lng - ref)) |
|||
print() |
|||
print(‘Hour, sun hour angle, dial hour line angle from 6am to 6pm’) |
|||
L(h) -6 .. 6 |
|||
V hra = 15.0 * h |
|||
hra -= lng - ref |
|||
V hla = degrees(atan(slat * tan(radians(hra)))) |
|||
print(‘HR=#3; HRA=#3.3; HLA=#3.3’.format(h, hra, hla))</lang> |
|||
{{out}} |
|||
<pre> |
|||
Enter latitude => -4.95 |
|||
Enter longitude => -150.5 |
|||
Enter legal meridian => -150 |
|||
sine of latitude: -0.086 |
|||
diff longitude: -0.500 |
|||
Hour, sun hour angle, dial hour line angle from 6am to 6pm |
|||
HR= -6; HRA=-89.500; HLA= 84.225 |
|||
HR= -5; HRA=-74.500; HLA= 17.283 |
|||
HR= -4; HRA=-59.500; HLA= 8.334 |
|||
HR= -3; HRA=-44.500; HLA= 4.847 |
|||
HR= -2; HRA=-29.500; HLA= 2.795 |
|||
HR= -1; HRA=-14.500; HLA= 1.278 |
|||
HR= 0; HRA= 0.500; HLA= -0.043 |
|||
HR= 1; HRA= 15.500; HLA= -1.371 |
|||
HR= 2; HRA= 30.500; HLA= -2.910 |
|||
HR= 3; HRA= 45.500; HLA= -5.018 |
|||
HR= 4; HRA= 60.500; HLA= -8.671 |
|||
HR= 5; HRA= 75.500; HLA=-18.451 |
|||
HR= 6; HRA= 90.500; HLA= 84.225 |
|||
</pre> |
|||
=={{header|Ada}}== |
=={{header|Ada}}== |