Showing posts with label altitude. Show all posts
Showing posts with label altitude. Show all posts

Sunday, February 16, 2020

Casio fx-3650P: Circular Segment

Casio fx-3650P: Circular Segment

Introduction





Variables:
X:  radius
Y:  angle (in degree)
C:  chord length
D:  altitude
A:  area
B:  arc length

Program 1:  Given Chord Length and Altitude

Calculate:  Radius, Angle, Area, Arc Length

? → C : ? → D : Deg :
( ( C ÷ 2 )^2 + D^2 ) ÷ ( 2D ) → X ◢
2 cos^-1 ( ( X - D ) ÷ X ) → Y ◢
X^2 ÷ 2 * ( π Y ÷ 180 - sin Y ) → A ◢
X Y π ÷ 180 → B

Example:
Input C = 8,  D = 11.75

X:  6.555851064 (radius)
Y:  284.8004594 (angle)
A:  127.5950317 (area)
B:  32.58720643 (arc length)

Program 2:  Given Radius and Angle

Calculate:  Chord Length, Altitude, Area, Arc Length

? → X : ? → Y : Deg :
2 * sin(Y ÷ 2) → C ◢
2 X ( sin(Y ÷ 4))^2 → D ◢
X^2 ÷ 2 * ( π Y ÷ 180 - sin Y ) → A ◢
X Y π ÷ 180 → B

Example:
Input X = 17.25, Y = 204

C:  33.74609223 (chord length)
D:  20.83647667 (altitude)
A:  590.2462124 (area)
B:  61.41813638 (arc length)

Source:

John W Harris and Horst Stocker.  Handbook of Mathematics and Computational Science Spring:  New York.  2006 ISBN 978-0-387-94746-4

Announcement

I am going to have surgery this week and my family is having medical issues.  I will be taking some time off in the next few weeks.  Tomorrow I have a special post reviewing the classic TI-30 from 1976. Take care everyone and thank you so much for your support.  I love doing this blog. 

Eddie

All original content copyright, © 2011-2020.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.

Sunday, October 21, 2018

HP 11C (and Emulators): Sun's Approximate Declination, Altitude, and Azimuth

HP 11C (and Emulators):  Sun's Approximate Declination, Altitude, and Azimuth

Introduction

The following program calculates three positions for our Sun in our Solar System:

1.  Declination of the Sun (δ = 0° at the Equinoxes)
2.  Altitude of the Sun (height of the sun)
3.  Azimuth of the Sun (degree from latitude ground-wise north)
 
Formulas Used:

Inputs:
D = days after the vernal equinox (usually March 20 or March 21)
L = latitude given in D.MMSS format (avoid ±90°)
T = time before solar noon (12 PM).  Example: 9 AM, T= 3.  3 PM, T = -3.

Declination:
δ = 23.45 * sin(D * 0.9856)

Altitude:
H = asin(cos L * cos D * cos(15 * T)) + sin L * sin D)

Azimuth:
A = acos((sin H * sin L - sin D) / (cos L * cos H))

Before running the program, store D in R1, L in R2, and T in R3.

HP 11C Program: Sun Declination, Altitude, Azimuth

001 42, 21, 13 LBL C
002 43, 7 DEG
003 45, 1 RCL 1
004 48 .
005 9 9
006 8 8
007 5 5
008 6 6
009 20 ×
010 23 SIN
011 2 2
012 3 3
013 48 .
014 4 4
015 5 5
016 20 ×
017 44, 4 STO 4
018 31 R/S
019 24 COS
020 45, 2 RCL 2
021 43, 2 →H
022 24 COS
023 20 ×
024 45, 3 RCL 3
025 1 1
026 5 5
027 20 ×
028 24 COS
029 20 ×
030 45, 2 RCL 2
031 43, 2 →H
032 23 SIN
033 45, 4 RCL 4
034 23 SIN
035 20 ×
036 40 +
037 43, 23 ASIN
038 44, 5 STO 5
039 31 R/S
040 23 SIN
041 45, 2 RCL 2
042 43, 2 →H
043 23 SIN
044 20 ×
045 45, 4 RCL 4
046 23 SIN
047 30 -
048 45, 2 RCL 2
049 43, 2 →H
050 24 COS
051 45, 5 RCL 5
052 24 COS
053 20 ×
054 10 ÷
055 43, 24 ACOS
056 44, 6 STO 6
057 43,32 RTN


Example 1:
Stored Data: 
R0 = 184 (approximately September 21),
R1 = -14° 50' 12" (entered as -14.5012)
R2 = 0 (noon)

Output:
δ ≈ 13.1576°
H ≈ 62.0058°
A = 180.0000°

Example 2:
Stored Data: 
R0 = 68 
R1 = 46°
R2 = 4 (8 AM)

Output:
δ ≈ 21.5892°
H ≈ 35.9899°
A ≈ 84.4083°

Sources:

Hewlett Packard.  "Sun Altitude, Azimuth, Solar Pond Absorption", HP 67/97 Energy Conservation December 1978.
Shore, Edward.  "HP 35S: Sun Altitude, Azimuth, Solar Pond Absorption"  Eddie's Math and Calculator Blog:  http://edspi31415.blogspot.com/2013/06/hp-35s-sun-altitude-azimuth-solar-pond.html  June 7, 2013

Eddie

All original content copyright, © 2011-2018.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.  Please contact the author if you have questions.

Tuesday, March 3, 2015

HP Prime: Solar Position (Right Ascension, Declination, Altitude, Azimuth)

HP Prime: Solar Position (Right Ascension, Declination, Altitude, Azimuth)

Input:
* Month
* Date
* Year
* Local Time (your local standard time – do not adjust for daylight savings time)
* Longitude
* Latitude


Local Time:  Use a 24 Hour clock. When entering time, you can enter a decimal or hours°minutes’seconds’’.

Longitude:  This is your location, going east from the Greenwich Prime Meridian.  East is positive, West is negative. Range: -180° to 180°

Latitude: This is your location, going north from the Equator.  North is positive, South is negative.  Range:  -90° to 90°

Entering HMS:

HP Prime:  Use Shift+9 and select the appropriate symbol (°, ‘, or ‘’)

Output:
r:  Distance from the Earth to the Sun in astronomical units (AU)
α:  Right ascension in decimal hours
δ:  Declination in decimal degrees
eot:  Equation of Time in minutes
alt:  Altitude/Elevation
azi:  Azimuth, from due North going clockwise

Please keep in mind that these are approximate answers.

Also, a 2-column matrix is returned to the home screen for reference.  The first column is the input column, the second is the output column.

[[ month,  distance ]
[ day,  right ascension ]
[ year, declination ]
[ local time, declination ]
[ longitude, altitude ]
[ latitude, azimuth ]]

HP Prime:  solar

EXPORT solar()
BEGIN
// aa.usno.navy.mil
// Updated 2015-03-01 EWS

// month, day, year, local standard
// time, longitude, latitude
LOCAL m,D,Y,lstd,long,lat;

INPUT({m,D,Y,lstd,long,lat},
"Data: Use Shift+9 for H°M′S″",
{"Month:","Date :","Year :",
"Local Time (24):", "Long (+E):",
"Lat (+N)"});

// Initialization
LOCAL d,g,q,L,r,ec,gmt;
LOCAL eot,alt,lha,azi,zen,loc;
LOCAL α,δ,g1,g2;
LOCAL w1,w2;
HAngle:=1;

// Greenwich Mean Time
gmt:=lstd-long/15;

// Julian Date
d:=367*Y-IP(7*(Y+IP((m+9)/12))/4)
+IP((275*m)/9)+D+1721013.5+gmt/24
-0.5*SIGN(100*Y+m-190002.5)+0.5;
d:=d-2451545;

// Intermediate Calculations
g:=(357.529+.98560028*d)  MOD 360;
q:=(280.459+.98564736*d) MOD 360;
L:=(q+1.915*SIN(g)+.02*SIN(2*g)) MOD 360;
r:=1.00014-.01671*COS(g)-.00014*COS(2*g);
ec:=23.439291-.00000036*d;

α:=ARG(COS(L)+SIN(L)*COS(ec)*i) MOD 360;

// Convert to hours
α:=α/15;

// Declination
δ:=ASIN(SIN(ec)*SIN(L));

// Equation of Time
eot:=q/15-α;
eot:=eot*60;

// Greenwich Mean Time (in hours)
g1:=-0.000319*SIN(−125.04-0.052954*d)
-2.4ᴇ−5*SIN(560.94+1.9713*d);
gmt:=(18.697374558+24.06570982441908*d
+g1*COS(ec)) MOD 24;

// Hour Angle (in degrees)
lha:=(gmt-α)*15+long;

// Altitude (approximate)
alt:=ASIN(SIN(lat)*SIN(δ)+
COS(lat)*COS(δ)*COS(lha));

// Azimuth
// Clockwise from South
azi:=ARG(SIN(lha)*i+COS(lha)*SIN(lat)
-TAN(δ)*COS(lat));
// Convert to clockwise from North
azi:=azi+180;

PRINT();
PRINT("Sun "+m+"/"+D+"/"+Y+" ; "+lstd);
PRINT("Distance: "+r);
PRINT("α (hours): "+α);
PRINT("δ (degrees): "+δ);
PRINT("eot (minutes): "+eot);
PRINT("Approximate");
PRINT("alt (elevation): "+alt);
PRINT("azi (North-clockwise): "+azi);

PRINT("DEGREES MODE SET");
RETURN [[m,r],[D,α],[Y,δ],[lstd,eot],
[long,alt],[lat,azi]];
END;


Example:

Input:
June 1, 2015; 12:00 PM , Longitude: -118°13’59”, Latitude: 34°3’

Output:
r = 1.01406353128 AU
α = 4.6292012064 hr
δ = 22.0919016903°
eot = 2.157339456 min
alt = 78.032250726°
azi = 182.442424012°


Resources:

The United States Naval Observatory (USNO)  Washington, D.C.:
“Approximate Solar Coordinates” (URL:  http://aa.usno.navy.mil/faq/docs/SunApprox.php )
“Approximate Sidereal Time” (URL: http://aa.usno.navy.mil/faq/docs/GAST.php )
“Computing Altitude and Azimuth from Greenwich Apparent Sidereal Time” (URL: http://aa.usno.navy.mil/faq/docs/Alt_Az.php )
“Converting Between Julian Dates and Gregorian Calendar Dates” (URL: http://aa.usno.navy.mil/faq/docs/JD_Formula.php )
Retrieved February 23, 2015 to March 1, 2015

This blog is property of Edward Shore - 2015


RPN HP 12C: Fibonacci and Lucas Sequences

  RPN HP 12C: Fibonacci and Lucas Sequences Golden Ratio, Formulas, and Sequences Let φ be the Golden Ratio: φ = (1 + √5) ÷ 2...