HP 35S: Length of Sunlight During a Day
Source: Total Daily Amount of Solar Radiation  HP 67/97 Energy Conservation Pac, December 1978, Author: Hewlett Packard
(This is a slight variation instead of a direct port)
Input
You are prompted for D and L where:
D = the number of days from March 21, a 365 day year is assumed
L = latitude (North as positive, South as negative), entered as D.MMSS (degreesminutesseconds) format
Output
Approximate number of hours of sunlight, in hours, minutes, seconds
Examples
Los Angeles, April 17: latitude of 34°03' N, 27 days after March 21
D = 27, L = 34.03, answer is approximately 12.573501 (12 hours, 57 minutes, 35.01 seconds)
Rome, September 1: latitude 41°51' N, 164 days after March 21
D = 164, L = 41.52, answer is approximately 12.532269 (12 hours, 53 minutes, 22.69 seconds)
Sydney, June 21: latitude 33°51'31" S, 92 days after March 21
D = 92, L = 33.5131, answer is approximately 9.443922 (9 hours, 44 minutes, 39.22 seconds)
Formulas
This version uses the estimate of sun declination:
D = 23.45 sin(d * 0.9856°)
Since 360/365.25 ≈ 0.985626283368
θ = acos(tan L × tan D)
L = 24 * θ in radians ÷ π
Program
S001 LBL S
S002 DEG
S003 INPUT D
S004 0.9856
S005 ×
S006 SIN
S007 23.45
S008 ×
S009 INPUT L
S010 HMS→
S011 TAN
S012 x<>y
S013 TAN
S014 ×
S015 +/
S016 ACOS
S017 >RAD
S018 24
S019 ×
S020 π
S021 ÷
S022 >HMS
S023 RTN
This blog is property of Edward Shore. 2013
A blog is that is all about mathematics and calculators, two of my passions in life.
Sunday, May 19, 2013
HP 35S: Approximate Length of Sunlight During a Day
Subscribe to:
Post Comments (Atom)
HP Prime and HP 41C/DM 41L: Sum of Two Squares
HP Prime and HP 41C/DM 41L: Sum of Two Squares Introduction Given a positive integer n, can we find two nonnegative integers x and y...

Casio fx991EX Classwiz Review Casio FX991EX The next incarnation of the fx991 line of Casio calculators is the fx991 EX. ...

HP Prime: Basic CAS Commands for Polynomials and Rational Expressions Define the following variables: poly: a polynomial o...

The Odds of Hitting it Big The number of possible combinations is fairly easy to calculate. You multiply the number symbols each slot has ...
Cool post Eddie.
ReplyDeleteNow I know I'll have plenty of daylight this weekend to play ham radio.
Look for an ARRL Field Day event near you.
http://www.arrl.org/fielddaylocator
Scott
KD5NJR
kd5njr@gmail.com
I will have to check it out, thanks Scott!
ReplyDeleteEddie