Monday, June 12, 2017

HP Prime and Casio fx-9860GII/Prizm: Angular Distance Between Stars

HP Prime and Casio fx-9860GII/Prizm:  Angular Distance Between Stars

Given the right ascension (α) and declination (δ) of two stars of the same epoch (J2000.0 is the most current), the distance between the stars are:

d = acos( sin δ1 * sin δ2 + cos δ1 * cos δ2 * cos (α1 – α2) )

The distance is usually given in decimal degrees.

Enter α in terms of hours, minutes, seconds (standard notation) and δ in terms of degrees, minutes, seconds (standard notation).

HP Prime Program:   ANGSTAR

EXPORT ANGSTAR(α1,δ1,α2,δ2)
BEGIN
// 2017-06-08 EWS
// Angular Angle

// Degrees
HAngle:=1;

LOCAL d;

α1:=15*α1;
α2:=15*α2;

d:=ACOS(SIN(δ1)*SIN(δ2)+
COS(δ1)*COS(δ2)*COS(α1-α2));

RETURN →HMS(d);
END;

Casio fx-9860GII/Prizm Program:  ANGSTAR

Deg
“RA 1: “?→A
“DEC1: “?→B
15A→A
“RA 2: “?→C
“DEC2: “?→D
15C→C
cos¯¹ (sin B * sin D + cos B * cos D * cos (A-C))→E
E>DMS

Example

Distance between Regulus (A) in Leo and Sadalmelik in Aquarius:

(data via Wikipedia)
Regulus:  α = 10h8m23.11s,  δ = +11°58’01.95”

Sadamelik:  α = 22h5m47.03593s, δ = -0°19’11.4568”

Distance:  168°20’05.1793”

Source:
Meeus, Jean.  Astronomical Algorithms  William-Bell, Inc.  Richmond, VA 1991.  ISBN 0-943396-35-2


Please stay safe, happy, and sane. Happy computing,

Eddie

I hope to have the new Casio Prizm FX-CG50 soon for review as I ordered one last Friday. 

This blog is property of Edward Shore, 2017.

1 comment:

  1. For the HP, The line:

    d:=ACOS(SIN(δ1)*SIN(δ2)+
    COS(δ1)*COS(δ2)*COS(α1-α2));

    must be entered as one line:

    d:=ACOS(SIN(δ1)*SIN(δ2)+COS(δ1)*COS(δ2)*COS(α1-α2));

    To cut and paste your code from this page into the HP Connectivity kit, gives one the displayed text (with a line break).

    Otherwise this code works. Stil trying to use from RPN.

    ReplyDelete

Eclipse and HHC 2017

Eclipse On August 21, 2017 there will be a solar eclipse.  Totality (where the moon completely covers the sun) will occur in the northern...