Showing posts with label astronomy. Show all posts
Showing posts with label astronomy. Show all posts

Saturday, January 24, 2026

RPN: HP 11C: Surface Gravity and Escape Velocity

RPN: HP 11C: Surface Gravity and Escape Velocity


EQUATIONS


The surface gravity constant of a celestial object (planet, dwarf planet, star, etc.):


g_p = G * M ÷ R²


The escape velocity of a celestial object:


v_esc = √(2 * G * M ÷ R)


where (using SI units):

g_p: surface gravity (m/s)

v_esc: escape velocity (m/s)

M: (measured) mass of the object (kg)

R: (average) radius of the object (m)

G: Universal Gravitational Constant (G ≈ 6.6743 * 10^-11 N m²/kg² (or m³/(s² kg))


The value of G is the 2022 CODATA value (https://physics.nist.gov/cgi-bin/cuu/Value?bg)



Determining Surface Gravity and Escape Velocity



DERIVATION - Determine the surface gravity constant in terms of escape velocity.


Start with the escape velocity:


v_esc = √(2 * G * M ÷ R)

(v_esc)² = 2 * G * M ÷ R


dividing both sides by 2 (we'll see why this important in a bit):


(v_esc)² ÷ 2 = G * M ÷ R

(v_esc)² * 1/2 = G * M * 1/R


Then insert the square of escape velocity in the equation for the surface velocity:


g_p = G * M ÷ R²

g_p = G * M * 1/R²

g_p = G * M * 1/R * 1/R

g_p = (v_esc)² * 1/2 * 1/R

g_p = (v_esc)² ÷ (2 * R)



The equations will the be:


v_esc = √(2 * G * M ÷ R)

g_p = (v_esc)² ÷ (2 * R)


Set the stack up as:

Y: M (mass, kg)

X: R (radius, m)


The results are shown in the stack:

Y: g_p (surface gravity, m/s²)

X: v_esc (escape velocity, m/s)


Algorithm (done with an HP 11C):

ENTER

ENTER

R↑

2

×

6.6743e-11 (Keys: 6 . 6 7 4 3 EEX 1 1 CHS)

×

R↑

÷

ENTER

√ (view escape velocity)

R↓

x<>y

÷

2

÷ (view surface gravity)

R↑ (set surface gravity in the Y stack, escape velocity in the X stack)



Example:


Estimate the surface gravity constant and escape velocity of Venus.


Venus

Mass ≈ 4.8675 * 10^24 kg

Radius ≈ 6.0518 * 10^6 m


Surface gravity ≈ 8.8704 m/s

Escape velocity ≈ 10361.6414 m/s



Determining a Planet's Radius and Escape Velocity


Problem: Given Earth's surface gravity is defined as 9.80665 m/s and mass of 5.972168 * 10^24. Estimate the radius and escape velocity.


Here we are given g_p and M, and we are tasked with finding R and v_esc.


Start by solving for R:


g_p = G * M ÷ R²


Multiply by R² and divide by g_p. Keep this in mind.


R² = G * M ÷ g_p


Take the square root and solve for the radius.


R = √(G * M ÷ g_p)


Note that:


R² = G * M ÷ g_p

g_p * R² = G * M

2 * g_p * R² = 2 * G * M

2 * g_p * R = 2 * G * M ÷ R


This makes for an easy substitution for v_esc.


v_esc = √(2 * G * M ÷ R) = √(2 * g_p * R)


The equations used are:


R = √(G * M ÷ g_p)

v_esc = √(2 * g_p * R)


The algorithm uses one memory register, I just picked R0 (done with an HP 11C):

STO 0

÷

6.6743e-11 (Keys: 6 . 6 7 4 3 EEX 1 1 CHS)

×

√ (view R)

ENTER

RCL 0

×

2

×

√ (view v_esc)



Set the stack up as:

Y: M (mass, kg)

X: g_p (surface gravity, m/s²)


The results are shown in the stack:

Y: R (radius, m)

X: v_esc (escape velocity, m/s)


Results:


Inputs:

Mass of Earth ≈ 5.972168 * 10^24 kg (enter as the y stack)

Surface Gravity = 9.80665 m/s² (enter as a x stack, and yes, surface gravity of Earth is defined to be exactly 9.80665 m/s²)


Outputs:

Y: Radius of Earth ≈ 6375416.060 m

X: Escape Velocity ≈ 11182.2604 m/s



Sources


The NIST Reference on Constants, Units, and Uncertainty. "Newtonian constant of gravitation" Fundamental Physical Constants. Last updated May 9, 2024. https://physics.nist.gov/cgi-bin/cuu/Value?bg Retrieved September 4, 2025.


Research & Education Association. The Essentials of Astronomy Piscataway, New Jersey. 2004. ISBN 0-87891-965-1



Eddie


All original content copyright, © 2011-2026. 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.


Saturday, February 24, 2024

Swiss Micros DM42 and HP 42S: Moon Landing Simulator from the HP 33-E Applications Book

Swiss Micros DM42 and HP 42S: Moon Landing Simulator from the HP 33-E Applications Book



Landing the Rocket


The goal is to provide enough fuel to get the rocket to land on the moon safely. The use of fuel pushes the rocket away from the surface and slow down the descent. Don’t crash or use too much fuel to escape into space.


Variables:


X: Position

V: Velocity

F: Fuel

G: Gravity

B: Amount of Fuel to burn


Initial Values (from the HP-33E Applications):

X = 500

V = -50

F = 120

G = 5


I wasn't sure about the win condition (X = 0, V = 0?).


I show the position, velocity, and fuel after each successful turn. Enter the amount of units to burn at the burn prompt.



Download here: https://drive.google.com/file/d/1YsYzIMxALuRx_MHSSzGFFEQJdrN656DS/view?usp=sharing



DM42 and HP 42S Code: MOON


00 { 184-Byte Prgm }

01▸LBL "MOON"

02 500

03 STO "X"

04 -50

05 STO "V"

06 120

07 STO "F"

08 5

09 STO "G"

10▸LBL 01

11 "POS:"

12 ARCL "X"

13 AVIEW

14 STOP

15 "VEL:"

16 ARCL "V"

17 AVIEW

18 STOP

19 "FUEL:"

20 ARCL "F"

21 AVIEW

22 STOP

23 RCL "X"

24 X=0?

25 GTO 07

26▸LBL 02

27 "BURN?"

28 PROMPT

29 STO "B"

30 RCL "F"

31 X<Y?

32 GTO 05

33▸LBL 03

34 RCL "B"

35 STO- "F"

36 RCL- "G"

37 STO "A"

38 RCL "V"

39 RCL+ "X"

40 RCL "A"

41 2

42 ÷

43 +

44 STO "X"

45 X≥0?

46 GTO 04

47 GTO 06

48▸LBL 04

49 RCL "V"

50 RCL+ "A"

51 STO "V"

52 GTO 01

53▸LBL 05

54 2

55 RCL× "G"

56 RCL "V"

57 X↑2

58 +

59 SQRT

60 +/-

61 STO "V"

62▸LBL 06

63 "VEL:"

64 ARCL "V"

65 AVIEW

66 "YOU LOSE"

67 AVIEW

68 RTN

69▸LBL 07

70 "SUCCESS!"

71 AVIEW

72 .END.



Example Game


XEQ "MOON"


Initial Turn

POS: 500

VEL: -50

FUEL: 120


BURN? 0

POS: 447.5

VEL: -55

FUEL: 120


BURN? 0

POS: 390

VEL: -60

FUEL: 120


BURN? 0

POS: 327.5

VEL: -65

FUEL: 120


BURN? 5

POS: 262.5

VEL: -65

FUEL: 115


BURN? 0

POS: 195

VEL: -70

FUEL: 115


BURN? 5

POS: 125

VEL: -70

FUEL: 115


BURN? 10

POS: 57.5

VEL: -65

FUEL: 100


BURN? 12.5

"YOU LOSE" -3.75


So close. Good luck!



Source


HP-33 Applications. Hewlett Packard. Corvallis, OR. February 1978



Eddie


All original content copyright, © 2011-2024. 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, January 7, 2024

Casio fx-9750GIII: Equatorial to Galactic Coordinates Conversions

Casio fx-9750GIII: Equatorial to Galactic Coordinates Conversions 



Introduction



Coordinate Systems


There are several coordinate systems used by astronomers to determine the placement of celestial objects, such as stars, galaxies, planets, and black holes, in our night skies.


Two coordinate systems are:



Equatorial System:


The equatorial system frames the University with the Earth's center as the center of the university.  


Right Ascension (α):   Customarily stated in hours, minutes, and seconds (H°M°S°).   Each hour is equivalent to 15 degrees.  The right ascension at 0 hours is aligned where the sun would be during the vernal equinox.  


Declination (δ):   Customarily stated in degrees, minutes, and seconds (D°M°S°).  



Galactic System:


The galactic system frames the University, aligning it with the Milky Way Galaxy.  The center of the system is our Sun.  The galactic longitude at 0 degrees aligns with the center of our galaxy (Sagittarius A*).


Galactic Longitude (l):  Customarily stated in degrees, minutes, and seconds (D°M°S°).  


Galactic Latitude (b):  Customarily stated in degrees, minutes, and seconds (D°M°S°).  



The program EQT2GLT converts equatorial coordinates (α, δ) to galactical coordinates (l, b).  


b = arcsin( cos δ × cos 27.1284° × cos(α - 192.8595°) + cos δ × cos 27.1284° )


l = 

arctan( ( sin δ - sin b × sin 27.1284° ) ÷ ( cos δ × sin(α -192.8595°) × cos 27.1284°) + 32.93117169°

=  atan2((sin δ - sin b × sin 27.1284°), (cos δ × sin(α -192.8595°) × cos 27.1284°)) + 32.93117169°


b is in hours, from -90 to 90 degrees.


l is in degrees, from 0 to 360 degrees.  Be sure to consider quadrants in your calculation.   



The program GLT2EQT converts galactical coordinates (l, b) to equatorial coordinates (α, δ).  


δ = arcsin( (cos b × cos 27.1284° × sin( l - 32.93117169° ) + sin b × sin 27.1284° )


α = arctan( ( cos b × cos( l - 32.93117169° ) ) ÷ ( sin b × cos 27.1284° - cos b × sin 27.1284° × sin( l - 32.93117169° ) ) + 192.8595°

= atan2((cos b × cos(l - 32.93117169°),(sin b × cos 27.1284° - cos b × sin 27.1284° × sin(l-32.93117169°)) + 192.8595°


δ is in degrees, from -90 to 90 degrees.  


α is in hours, from 0 to 24 hours.  Be sure to consider quadrants in your calculation.   Remember that 1 hour is equivalent to 15 degrees.  



The equations are from Practical Astronomy With Your Calculator by Peter Duffett-Smith, with the constants updated for J2000.0.


From the "Conversion of coordinates" page of Tobias Westmeier's webpage, the J2000.0 of the north pole are:


α0 ≈ 192.8595°  (12h 51m 26.28s)

δ0 ≈ 27.1284°  (27°07'42.24")


(Sources:   Duffett-Smith, Westmeier - refer to the Source section)


For more details, please refer to the Equatorial to Galactic Coordinates:  Updating the Constants posted on January 6, 2023.   


Casio fx-9750GIII Program:  EQT2GLT

a+bi
Deg
"EQUATORIAL -> GALACTIC"
"J2000.0"
"R.A. IN H°M°S°"
?->A
"DEC. IN D°M°S°"
?->D
15*A->A
192.8595->R
27.1284->E
32.93117169->C
sin^-1 (cos D*cos E*cos (A-R)+sin D*sin E)->B
sin D-sin B*sin E->Y
cos D*sin (A-R)*cos E->X
Arg (X+Yi)->T
Y<⇒T+360->T
T+C->L
ClrText
"B="
B ▶DMS◢
"L="
L ▶DMS

Note:  The calculator is set to the following modes: degrees, and rectangular complex mode. 

Example:  

The star Hamal in the constellation Aries (Alpha Arietis) is located approximately at:
α = 2 hours, 7 minutes, 10 seconds
δ = 23°27'44"

Enter hours-minutes-seconds and degrees-minutes-seconds by pressing [ OPTN ], [ F6 ] ( > ), [ F5 ] (ANGL), [ F4 ] (°''').

b:  -36°12'22.12"
L:  144°34'33.2"


Casio fx-9750GIII Program:  EQT2GLT

a+bi
Deg
"GALACTIC_->_EQUATORIAL"
"J2000.0"
"B (LAT) IN D°M°S°"
?->B
"L (LONG) IN D°M°S°"
?->L
192.8595->R
27.1284->E
32.93117169->C
sin^-1 (cos B*cos E*sin (L-C)+sin B*sin E)->D
cos B*cos (L-C)->Y
sin B*cos E-cos B*sin E*sin (L-C)->X
Arg (X+Yi)->T
R+T->A
A>360⇒A-360->A
A÷15->A
ClrText
"R.A.="
A ▶DMS◢
"DEC="
D▶DMS

Example:

The star Regulus in the constellation Leo (Alpha Leonis) is located approximately at:  
b:  48°56'03"
l:  226°25'36"

α:  10°08'22.31"  (10 hr, 8 min, 22.31 sec)
δ:  11°58'02.14"

Note:  The results are approximated.  


Sources


"Equatorial coordinate system"  Wikipedia.  Last Edited April 10, 2023.  Accessed December 10, 2023.  https://en.wikipedia.org/wiki/Equatorial_coordinate_system


"Galactic coordinate system" Wikipedia.  Last Edited April 21, 2023.  Accessed November 23, 2023.  https://en.wikipedia.org/wiki/Galactic_coordinate_system


Duffett-Smith, Peter.  Practical Astronomy With Your Calculator  Second Edition.  Cambridge University Press: Cambridge, UK.  1981.  

ISBN: 0 521 28411 2  (paperback) 


National Aeronautics and Space Administration (NASA).   "Coordinate Calculator"  NASA/IPAC Extragalactic Database.  Operated by the California Institute of Technology.  2023.   Accessed November 26, 2023.  https://ned.ipac.caltech.edu/coordinate_calculator?in_csys=Equatorial&in_equinox=J2000.0&obs_epoch=2000.0&ra=17h45m40.036s&dec=-29d00m28.17s&pa=0.0&out_csys=Galactic&out_equinox=J2000.0


Westmeier, Tobias.   "Conversion of coordinates"  Homepage of Tobias Westmeier.  The University of Western Australia.  Last Modified 26 September 2023.   Accessed November 26, 2023.   https://www.atnf.csiro.au/people/Tobias.Westmeier/index.php


Eddie


All original content copyright, © 2011-2024.  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. 


Saturday, January 6, 2024

Equatorial to Galactic Coordinates: Updating the Constants

Equatorial to Galactic Coordinates:  Updating the Constants 



Introduction


There are several coordinate systems used by astronomers to determine the placement of celestial objects, such as stars, galaxies, planets, and black holes, in our night skies.   



Equatorial System


The most common system is the Equatorial System.  Imagine a sphere which represents the Universe with the center of the Earth as the center.   The coordinates are the right ascension (α) and the declination (δ).


Right ascension (α):  The right ascension is the angular distance from the vernal equinox, going eastward traveling with the celestial equator. The 0 point is the vernal equinox.   The vernal equinox, which generally takes place around March 20 or 21, is when the sun is over the Earth's equinox heading north.  The lengths of daytime and nighttime are equal.   For the northern hemisphere, it's the first day of spring, and for the southern hemisphere, it's the first day of autumn.  Sometimes, the vernal equinox is called the First Point of Aries (♈).  The range of the right ascension is from 0 hours to 24 hours.   Each hour is equivalent to 15° (15 degrees).


Declination (δ): The declination is the angular distance north (above) or south (below) the celestial equator.  The range of declination is from -90° to +90°.



Galactical System


The galactic coordinate system focuses on aligning with our Milky Way Galaxy, with our Sun as the center of the sphere.  


Galactic Longitude (l):  The galactic longitude measures the angular distance from the center of the Milky Way Galaxy, increasing in the eastward direction.   The range of the galactic longitude is from 0° to 360°, with the 0° point at the Galactic Center, which lies in the constellation Sagittarius the Archer.   (Sagittarius A*)


Galactic Latitude (b):  The galactic latitude is the angle northward from the galactic equator, and it's range is from -90° (south pole located in the constellation Sculptor) to 90° (north pole located in the constellation Coma Berenices).



Practical Astronomy:  With Updated Constants


A popular resource for astronomical calculations is the book Practical Astronomy With Your Calculator by Peter Duffett-Smith.  


On page 48 of Practical Astronomy With Your Calculator, Duffett-Smith provides these equations for converting from equatorial (α, δ) to galactic (l, b) coordinates:


b = arcsin( cos δ × cos 27.4° × cos(α - 192.25°) + cos δ × cos 27.4° )


l = arctan( ( sin δ - sin b × sin 27.4° ) ÷ ( cos δ × sin(α -192.25°) × cos 27.4°) + 33°


Note that in calculation, α, δ, b, and l must be in decimal degrees.   Usually the coordinates are given in hours-minutes-seconds or degrees-minutes-seconds, and the quantities must be converted before calculation.   



The numerical constants?   Those are the 1950.0 coordinates of the north galactic pole with  α0 = 192.25° = 12h 49m and δ = 27.4° = 27°24'.  


Obviously, in 2024, we would be working with the epoch J2000.0 coordinates of the north galactic pole.   If we want to work the J2000.0 coordinates in the above formulas, the constants must be changed.


From the "Conversion of coordinates" page of Tobias Westmeier's webpage, the J2000.0 of the north pole are:


α0 ≈ 192.8595°  (12h 51m 26.28s)

δ0 ≈ 27.1284°  (27°07'42.24")


I choose to use these coordinates because it provides more decimal places than what is presented in the Galactic coordinate page of Wikipedia.


This leaves us with updated equations:


b = arcsin( cos δ × cos 27.1284° × cos(α - 192.8595°) + cos δ × cos 27.1284° )


l = 

arctan( ( sin δ - sin b × sin 27.1284° ) ÷ ( cos δ × sin(α -192.8595°) × cos 27.1284°) + C


We need to determine the value of C.


I'm going to use our galactic center, Sagittarius A*, as a reference point, with the coordinates as determined by NASA/IPAC Extragalactic Database's Coordinator Calculator tool:


Sagittarius A*:


Equatorial Coordinates

α ≈ 266.41681667° (17h 45m 40.036s)

δ ≈ -29.007825° (-29°00'28.17")


Galactic Coordinates

l ≈ 359.94418679°  (359°56'39.072")

b ≈ -0.04610951° (-0°2'45.994")

(Theoretically, this should be l0 = 0°, b0 = 0°).



Substituting the following data into equation for l (only the second equation has C):


l = 

arctan( ( sin δ - sin b × sin 27.1284° ) ÷ ( cos δ × sin(α -192.8595°) × cos 27.1284°) + C


359.94418679°  = 

arctan( ( sin -29.007825°  - sin -0.04610951°  × sin 27.1284° ) ÷ ( cos -29.007825°  × sin(266.41681667° - 192.8595°) × cos 27.1284°) + C



359.94418679°  = arctan( (-0.4845538612°)  ÷ (+0.7465187073°)) + C


We have to keep in mind that anytime we are working with astronomical math, we have to mind the coordinate system.  


359.94418679°  = atan2(0.7465187073°, -0.4845538612°) + C


359.94418679°  = arg(0.7465187073° - 0.4845538612° × i) + C   (where i = √-1)



Note:  


atan2(0.7465187073°, -0.4845538612°) = -32.98698493°


To put this answer in the range of 0° to 360°:


-32.98698493° + 360° = 327.0130151°



359.94418679°  = 327.0130151° + C   


C = 32.93117169



Our final updated equations are:



b = arcsin( cos δ × cos 27.1284° × cos(α - 192.8595°) + cos δ × cos 27.1284° )


l = 

arctan( ( sin δ - sin b × sin 27.1284° ) ÷ ( cos δ × sin(α -192.8595°) × cos 27.1284°) + 32.93117169


and will be used in the programs coming up this weekend.




Sources


"Equatorial coordinate system"  Wikipedia.  Last Edited April 10, 2023.  Accessed December 10, 2023.  https://en.wikipedia.org/wiki/Equatorial_coordinate_system


"Galactic coordinate system" Wikipedia.  Last Edited April 21, 2023.  Accessed November 23, 2023.  https://en.wikipedia.org/wiki/Galactic_coordinate_system


Duffett-Smith, Peter.  Practical Astronomy With Your Calculator  Second Edition.  Cambridge University Press: Cambridge, UK.  1981.  

ISBN: 0 521 28411 2  (paperback) 


National Aeronautics and Space Administration (NASA).   "Coordinate Calculator"  NASA/IPAC Extragalactic Database.  Operated by the California Institute of Technology.  2023.   Accessed November 26, 2023.  https://ned.ipac.caltech.edu/coordinate_calculator?in_csys=Equatorial&in_equinox=J2000.0&obs_epoch=2000.0&ra=17h45m40.036s&dec=-29d00m28.17s&pa=0.0&out_csys=Galactic&out_equinox=J2000.0


Westmeier, Tobias.   "Conversion of coordinates"  Homepage of Tobias Westmeier.  The University of Western Australia.  Last Modified 26 September 2023.   Accessed November 26, 2023.   https://www.atnf.csiro.au/people/Tobias.Westmeier/index.php




Eddie


All original content copyright, © 2011-2024.  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, December 17, 2023

HP 15C and HP 71B: Precession of the Equinoxes

HP 15C and HP 71B:   Precession of the Equinoxes



How Far Does the Celestial Object Move?  


Given a celestial object's right ascension (α) and declination (δ), we can calculate the new positions after N years by the formulas presented by The Cambridge Handbook of Physics Formulas (see Source):


α' ≈ α0 + (3.075" + 1.336" × sin α0 × tan δ0) × N


δ' ≈ δ0 + (20.043" × cos α0) × N



Decimal degrees of seconds:


3.075" ≈ 854.1677 × 10^-6


1.336" ≈ 371.1111 × 10^-6


20.043" ≈ 5.5675 × 10^-3



According to the Handbook, the formulas are good for only several centuries, as the formulas are local approximations.  




HP 15C Code:  New Right Ascension (LBL A) and New Declination (LBL D)


Step:  Key Code:  Key



New Right Ascension, α'


001:  42, 21, 11:  LBL A

002:  __, 43, _7:  DEG

003:  __, __, _1:  1

004:  __, __, _3:  3

005:  __, __, _3:  3

006:  __, __, 48:  .

007:  __, __, _6:  6

008:  __, __, 26:  EEX

009:  __, __, _6:  6

010:  __, __, 16:  CHS

011:  __, 43, _2:  →H

012:  __, 45, _1:  RCL 1

013:  __, 43, _2:  →H

014:  __, __, 23:  SIN

015:  __, __, 20:  ×

016:  __, 45, _2:  RCL 2

017:  __, 43, _2:  →H

018:  __, __, 25:  TAN

019:  __, __, 20:  × 

020:  __, __, _3:  3

021:  __, __, _0:  0

022:  __, __, _7:  7

023:  __, __, 48:  .

024:  __, __, _5:  5

025:  __, __, 26:  EEX

026:  __, __, _6:  6

027:  __, __, 16:  CHS

028:  __, 43, _2:  →H

029:  __, __, 40:  +

030:  45, 20, _3:  RCL× 3

031:  __, 45, _1:  RCL 1

032:  __, 43, _2:  →H

033:  __, __, 40:  +

034:  __, 42, _2:  →H.MS

035:  __, 44, _4:  STO 4

036:  __, 43, 32:  RTN


New Declination:  δ'


037:  42, 21, 14:  LBL B

038:  __, 43, _7:  DEG

039:  __, __, _2:  2

040:  __, __, 48:  .

041:  __, __, _0:  0

042:  __, __, _0:  0

043:  __, __, _4:  4

044:  __, __, _3:  3

045:  __, __, 26:  EEX

046:  __, __, _3:  3

047:  __, __, 16:  CHS

048:  __, 43, _2:  →H

049:  __, 45, _1:  RCL 1

050:  __, 43, _2:  →H

051:  __, __, 24:  COS

052:  __, __, 20:  × 

053:  45, 20, _3:  RCL× 3

054:  __, 45, _2:  RCL 2

055:  __, 43, _2:  →H

056:  __, __, 40:  +

057:  __, 42, _2:  →H.MS

058:  __, 44, _5:  STO 5

059:  __, 43, 32:  RTN



Variables Used:


R1 = α0:  Initial Right Ascension (enter in DD.MMSS format)

R2 = δ0:  Initial Declination  (enter in DD.MMSS format)

R3 = N:  Number of Years from 2000.  


Outputs:


R4 = α':  Final Right Ascension (in DD.MMSS format)

R5 = δ':  Final Declination  (in DD.MMSS format)



HP 71B Code:   PRECES


Note:  I had battery problems with the HP 71B, so I'm writing this code from written notes.  


100  DEGREES

110  PRINT "PRECESSION" @ WAIT 0.25

120  PRINT "EPOCH J2000.0"  @ WAIT 0.25

130  INPUT "R.A. °,M,S ?"; H,M,S

140  GOSUB 500 @ A0 = X

150  INPUT "DEC °,M,S? "; H,M,S

160  GOSUB 500 @ D0 = X

170  INPUT "# YEARS? "; N

180  A1 = A0 + (854.1667E-6 + 371.1111E-6 * SIN(A0) * TAN(D0)) * N

190  D1 = D0 + (5.5675E-3 * COS(A0)) * N

200  X = A1 @ GOSUB 600 

210  H1 = H @ M1 = M @ S1 = S @ G1 = G

220  PRINT "R.A. ADJ=" @ WAIT 0.25

230  PRINT G1*H1; "°"; M1; "m"; S1; "s" @ PAUSE

240  X = D1 @ GOSUB 600

250  H2 = H @ M2 = M @ S2 = S @ G2 = G

260  PRINT "DEC ADJ=" @ WAIT 0.25

270  PRINT G2*H2; "°"; M2; "m"; S2; "s"

280  END


500  X=SGN(H) * (ABS(H) + M/60 + S/3600)

510  RETURN


600  G = SGN(X) @ X=ABS(X) @ H=IP(X)

610  M = IP(FP(X) * 60)

620  S = FP(FP(X) * 60) * 60

630  RETURN



Examples



First Point of Aries (Vernal Equinox)


α0 = 0° 00' 00"

δ0 = 0° 00' 00"


N = 100

α' ≈ 5'08" (0.0508)

δ' ≈ 33'24"  (0.3324)



Regulus (Alpha Leonis (Leo))


α0 ≈ 5° 55' 10"

δ0 ≈ 7° 24' 25"


N = 100

α' ≈ 6° 00' 19"

δ' ≈ 7° 57' 39"  


Sagittarius A*  (Center of the Milky Way Galaxy)


α0 ≈ 17° 45' 40"

δ0 ≈ -29° 00' 28"


N = 100

α' ≈ 17° 50' 25"

δ' ≈ -28° 28' 39"  



Betelgeuse (Alpha Orionis (Orion))


α0 ≈ 10° 28' 22"

δ0 ≈ 11° 58' 02"


N = 100

α' ≈ 10° 13' 34"

δ' ≈ 12° 30' 55"  



Source


Woan, Gaham.   The Cambridge Handbook of Physics Formulas  2003 Edition. Cambridge University Press.  2000. ISBN 978-0-511-07589-6



Eddie


All original content copyright, © 2011-2023.  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. 


HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways

HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways Introduction In 1979, Electro Scientific Industries (esi)...