Showing posts with label TI-60. Show all posts
Showing posts with label TI-60. Show all posts

Saturday, July 25, 2026

Earth's Radius by Latitude

Earth's Radius by Latitude




Introduction: Calculating the Earth’s Radius



In quick, general calculations, we assume that the shape of the Earth approximates the shape of sphere, with the radius to generally be approximated as 6371 km. However, the shape of the Earth is closer to an oblate ellipsoid. The Earth is flattened at the poles and bulges the greatest at the Equator.



There are several calculations to estimate the Earth’s radius given the latitude (degrees North or South from the Equator), this blog is working with the WGS 84 formula (see Source):



R = √[ ((a² * cos(φ))² + (b² * sin(φ))²) ÷ ((a * cos(φ))² + (b * sin(φ))²) ]



Which is simplified from:



R = √[ (a^4 + b^4 * tan²(φ)) ÷ (a² + b² * tan²(φ))



where:

φ: latitude (in degrees)

a: semi-major axis: 6378.137 km

b: semi-minor axis: 6356.7523142 km

R: radius of kilometers



HP 15C Code: Earth’s Radius by Latitude

Step; Key; Key Code

001: LBL E; 42, 21, 15

002: DEG; 43, 7

003: →H; 43, 2

004: TAN; 25

005: x²; 43, 11

006: STO 1; 44, 1

007: 6; 6

008: 3; 3

009: 7; 7

010: 8; 8

011: . ; 48

012: 1; 1

013: 3; 3

014: 7; 7

015: STO 2; 44, 2

016: 4; 4

017: 14; y^x

018: 6; 6

019: 3; 3

020: 5; 5

021: 6; 6

022: . ; 48

023: 7; 7

024: 5; 5

025: 2; 2

026: 3; 3

027: 1; 1

028: 4; 4

029: 2; 2

030: STO 3; 44, 3

031: 4; 4

032: y^x; 14

033: RCL 1; 45, 1

034: ×; 20

035: +; 40

036: RCL 2; 45, 2

037: x²; 43, 11

038: RCL 3; 45, 3

039: x²; 43, 11

040: RCL 1; 45, 1

041: ×; 20

042: +; 40

043: ÷; 10

044: √; 11

045: RTN; 43, 32



TI-60 Code: Earth’s Radius by Latitude

Step; Key; Key Code



Set degrees mode before beginning.



00: DMS-DD; 39

01: TAN; 34

02: x²; 96

03: STO; 61

04: 1; 01

05: ( ; 53

06: 6; 06

07: 3; 03

08: 7; 07

09: 8; 08

10: . ; 93

11: 1; 01

12: 3; 03

13: 7; 07

14: STO; 61

15: 2; 02

16: y^x; 45

17: 4; 04

18: +; 85

19: 6; 06

20: 3; 03

21: 5; 05

22: 6; 06

23: . ; 93

24: 7; 07

25: 5; 05

26: 2; 02

27: 3; 03

28: 1; 01

29: 4; 04

30: 2; 02

31: STO; 61

32: 3; 03

33: y^x; 45

34: 4; 04

35: ×; 25

36: RCL; 71

37: 1; 01

38: ) ; 54

39: ÷; 55

40: ( ; 53

41: RCL; 71

42: 2; 02

43: x²; 96

44: +; 85

45: RCL; 71

46: 3; 03

47: x²; 96

48: ×; 65

49: RCL; 71

50: 1; 01

51: ) ; 54

52: = ; 95

53: √; 86

54: R/S; 13

55: RST; 22



Examples



Latitude: 80° 00’; Radius (km): 6357.402412

Latitude: 57° 24’; Radius (km): 6362.996788

Latitude: 43° 40’; Radius (km): 6367.986902

Latitude: 9° 15’; Radius (km): 6377.588959

Latitude: 2° 56’; Radius (km): 6378.081467


Source


Planetcalc. “Earth Radius by Latitude (WGS 84)” Timur. 2021. https://planetcalc.com/7721/ Retrieved March 22, 2026.



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, July 18, 2026

TI-60 and HP 65: Distance by Stadia Tacheometry

TI-60 and HP 65: Distance by Stadia Tacheometry




Introduction


The stadia calculation measures the distance from the level or theodolite (measuring device) to a graduated staff. Two readings are taken from the graduated staff, an upper reading (UR) and a lower reading (LR). The word tacheometry means "swift calculation". The distance between the theodolite and the staff is calculated as:


dist = k * s

k = is a factor taken of a radius of focal distance over image distance. Typically, k is set to 100, and will be assumed that k = 100 for these programs.

s = the difference between the upper reading and lower reading on the graduated staff. (UL - RL). The readings are assumed to be in meters.

If the theodolite is tilted at angle α, known as the vertical angle, then the distance becomes:

dist = k * s * cos² α


α is usually given in degrees-minutes-seconds and must be converted to decimal degrees.


TI-60 Program: Stadia Tracheotomy


Store before running: R1: UR (m), R2: LR (m), R3: α (D.MMSS)

Code:

00: 1 ; 01

01: 0 ; 00

02: 0 ; 00

03: × ; 65

04: ( ; 53

05: RCL; 71

06: 1 ; 01

07: - ; 75

08: RCL; 71

09: 2 ; 02

10: ) ; 54

11: × ; 65

12: RCL; 71

13: 3 ; 03

14: DMS-DD; 39

15: cos; 33

16: x²; 96

17: = ; 95

18: R/S; 13

19: RST; 22


HP 65 Program: Stadia Tracheotomy


Input Stack:

Z: vertical angle in degrees-minutes-second (V.MS)

Y: upper reading (UR)

X: lower reading (LR)

Code:

23: LBL

14: D

51: -

02: 2

32: f^-1

08: LOG (10^x)

71: ×

35 07: x<>y

32: f^-1

03: →D.MS (→DD)

31: f

05: COS

32: f^-1

09: √ (x²)

71: ×

24: RTN



Examples



Example 1:

V: 1°05' (Z stack, R3)

UR: 2.014 m (Y stack, R1)

LR: 1.668 m (X stack, R2)

Result: distance ≈ 34.5876 m



Example 2 (from HP 35):

V: 4°17' (Z stack, R3)

UR: 3.144 m (Y stack, R1)

LR: 1.761 m (X stack, R2)

Result: distance ≈ 137.5285 m



Example 3 (from HP 35):

V: -7°21' (Z stack, R3)

UR: 2.817 m (Y stack, R1)

LR: 0.731 m (X stack, R2)

Result: distance ≈ 205.1860 m



Sources



CivilFerba "Measure the distance by stadia method" Video posted on YouTube on December 8, 2018. https://www.youtube.com/watch?v=oon5ayl9DYs Retrieved March 22, 2026



HP-35 Surveying. Hewlett Packard. Buchs, Switzerland. February 1973. pp. 19-20



fx-FD10 Pro. User's Guide. Casio. Tokyo, Japan. 2014. pg. α-16 (alpha-16)



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, October 4, 2025

TI-60 Geometry: Intersection and Angle Between Two Lines

TI-60 Geometry: Intersection and Angle Between Two Lines


We have two lines in the standard form:


y = R1 * x + R2

y = R3 * x + R4


where R1, R3 are the slopes and R2, R4 are the y-intercepts, which are stored prior to executing the programs.


TI-60: Intersection Point


x = (R4 – R3) / (R1 – R3), y = R1 * x + R2


Step Key Code

Key

Step Key Code

Key

00 53

(

14 54

)

01 71

RCL

15 95

=

02 04

4

16 13

R/S

03 75

-

17 65

×

04 71

RCL

18 71

RCL

05 02

2

19 01

1

06 54

)

20 85

+

07 55

÷

21 71

RCL

08 53

(

22 02

2

09 71

RCL

23 95

=

10 01

1

24 13

R/S

11 75

-

25 22

RST

12 71

RCL



13 03

3






TI-60: Angle Between Two Lines


Θ = arctan(abs((R1 – R3) / (1 + R1 * R3)))


Step Key Code

Key

Step Key Code

Key

00 53

(

13 65

×

01 71

RCL

14 71

RCL

02 01

1

15 03

3

03 75

-

16 54

)

04 71

RCL

17 95

=

05 03

3

18 96

06 54

)

19 86

√x

07 55

÷

20 12

R/S

08 53

(

21 34

RST

09 01

1



10 85

+



11 71

RCL



12 01

1




Examples


Intersection Point: (x, y)

Angle: Θ (degrees)

y = -2 * x + 3

y = 3 * x + 4

(-0.2, 3.4)

45°

y = x + 8

y = 3 * x – 6

(7, 15)

26.56505118°

y = 4 * x – 6

y = 2 * x + 1

(3.5, 8)

12.52880771°



May I close with this: Happy Birthday, Susan Sarandon!


Eddie


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


The author does not use AI engines and never will.

Sunday, October 1, 2023

HP 15C and TI-60: The Lottery Probability Function

HP 15C and TI-60:  The Lottery Probability Function



The Lottery Probability Function


The expression, of what I call the Lottery Probability Function:


prob =  nCr(k, b) × nCr(n-k, k-b) ÷ nCr(n, k)


where:


*  nCr is the combination function.  nCr(x,y) = x! ÷ (y! × (y - x)!)

*  n = the number of total balls in the lottery

*  k = the number of balls drawn

*  b = the number of balls your ticket matches

*  prob = probability 


Lottery odds are often stated as "1 in number" instead of decimal form.  The number is the statement "1 in number" is 1/p.   For example, "1 in 5" means that the probability is 1/5 or 0.20.  (20%)



HP 15C (Emulator) Program Code


Program Size:

19 steps, 30 bytes


Store before running label A:

R1 = n

R2 = k

R3 = b



Step : Step Code : Key

001 : 42,21,11 : LBL A

002 : 45, 2 : RCL 2

003 : 45, 3 : RCL 3

004 : 43,40 : Cy,x

005 : 44, 0 : STO 0

006 : 45, 1 : RCL 1

007 : 45,30, 2 : RCL- 2

008 : 45, 2 : RCL 2

009 : 45,30, 3 : RCL- 3

010 : 43,40 : Cy,x

011 : 44,20, 0 : STO× 0

012 : 45, 1 : RCL 1

013 : 45, 2 : RCL 2

014 : 43,40 : Cy,x

015 : 44,10, 0 : STO÷ 0

016 : 45, 0 : RCL 0

017 : 15 : 1/x

018 : 44, 0 : STO 0

019 : 43, 32 : RTN


Caution:  HP 15C Limited Edition.  It is a known bug when the combination (Cy,x) and permutation (Py,x) are run multiple times, the display flashes as if a overflow error occurs.  The program otherwise runs fine (with the examples I tested - 2011/04/15 firmware).   

To eliminate unnecessary flashing, use the following key sequence:

[ GTO ] ( A ) [ R/S ]


Full a list of known bugs, as compiled by Katie Wasserman, click here:

https://www.hpmuseum.org/cgi-sys/cgiwrap/hpmuseum/articles.cgi?read=1089



TI-60 (Programmable Scientific/Advanced Scientific) Program Code


57 steps.   No commands are merged.  


For the combination (and permutation) functions, the number must be formatted as the following: nnn.rrr


The command sequence INV EE cancels scientific notation display.  


Step : Step Code : Key

01 : 71 : RCL

02 : 02 :  2

03 : 85 : +

04 : 03 : 3

05 : 55 : ÷

06 : 01 : 1

07 : 42 : EE

08 : 03 : 3

09 : 95 : =

10 : 80 : nCr

11 : 61 : STO 

12 : 00 : 0

13 : 71 : RCL

14 : 01 : 1

15 : 85 : +

16 : 71 : RCL

17 : 02 : 2

18 : 55 : ÷

19 : 01 : 1

20 : 42 : EE

21 : 03 : 3

22 : 95 : =

23 : 80 : nCr

24 : 61 : STO

25 : 55 : ÷

26 : 00 : 0

27 : 71 : RCL

28 : 01 : 1

29 : 75 : -

30 : 71 : RCL

31 : 01 : 1

32 : 85 : +

33 : 53 : (

34 : 71 : RCL

35 : 02 : 2

36 : 75 : -

37 : 71 : RCL

38 : 03 : 3

39 : 54 : )

40 : 55 : ÷

41 : 01 : 1

42 : 42 : EE

43 : 03 : 3

44 : 95 : =

45 : 80 : nCr

46 : 61 : STO

47 : 65 : ×

48 : 00 : 0

49 : 71 : RCL

50 : 00 : 0

51 : 76 : 1/x

52 : 61 : STO

53 : 00 : 0

54 : 12 : INV

55 : 42 : EE

56 : 13 : R/S

57 : 22 : RST



Examples


1.  49 balls and 6 are drawn.    Set up variables:  R1 = n =  49 and R2 = k = 6.


R3 = b = 6:  1 in 13,983,816

R3 = b = 5:  1 in 54,200.83721

R3 = b = 4:  1 in 1,032.3396899


2.  52 balls and 6 are drawn.  Set up variables:  R1 = n = 52 and R2 = k = 6.


R3 = b = 6:  1 in 20,358,520

R3 = b = 5:  1 in 73,762.75362

R3 = b = 4:  1 in 1,311.337842


Note that this function does not take the power ball, which only 1 is drawn in addition to the lottery balls, into account.   If you have a power ball of p balls, we can calculate the odds as follows:


You match the power ball:

prob = 1 ÷ p × nCr(k, b) × nCr(n-k, k-b) ÷ nCr(n, k)


1 in odds:  1/prob


You don't match the powerball:

prob = (p - 1) ÷ p × nCr(k, b) × nCr(n-k, k-b) ÷ nCr(n, k)


1 in odds:  1/prob



Source:

"Lottery mathematics".  Wikipedia.  Last edited July 10, 2023.  Retrieved July 23, 2023.  https://en.wikipedia.org/wiki/Lottery_mathematics


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. 


Earth's Radius by Latitude

Earth's Radius by Latitude Introduction: Calculating the Earth’s Radius In quick, general calculations, we assume that the...