Showing posts with label triangulation. Show all posts
Showing posts with label triangulation. Show all posts

Saturday, October 17, 2026

HP 67 Collection: October 2026

HP 67 Collection: October 2026


All examples are done in FIX 4. (DSP 4)



Earth's Gravity at a Specific Latitude



The true earth gravity force depends on several factors, such as latitude and altitude. This estimation takes the latitude (north/south), in degrees-minutes-seconds, and latitude, in kilometers, into account.



The constant 9.80665 m/s^2 is an accepted average, the true force varies.

g_s = 9.806 – 0.026 * cos(2 * φ)

g_h = g_s * (6378.1 / (6378.1 + h))



HP 67 Code:

LBL A: 001 31, 25, 11

DEG: 002 35, 41

H←: 003 31, 74

2 : 004 02

× : 005 71

COS: 006 31, 63

. : 007 83

0 : 008 00

2 : 009 02

6 : 010 06

× : 011 71

9 : 012 09

. : 013 83

8 : 014 08

0 : 015 00

6 : 016 06

x<>y: 017 35, 52

- : 018 51

x<>y: 019 35, 52

6 : 020 06

3 : 021 03

7 : 022 07

8 : 023 08

. : 024 83

1 : 025 01

+ : 026 61

LST x: 027 35, 82

x<>y: 028 35, 52

÷ : 029 81

× : 030 71

RTN : 031 35, 22



Inputs:

Y: h

X: φ



Examples:

Inputs: h = 0, φ = 2°33’: g ≈ 9.7801

Inputs: h = 0.762, φ = 52°17’: g ≈ 9.8114



Source 

Grainger Engineering Office of Marketing and Communications. (answer written by Rebecca H.) (2016, November 21). “How gravitational force varies at different locations on Earth.” Illinois. https://van.physics.illinois.edu/ask/listing/64061. Retrieved March 10, 2026.



Triangulation



With angles α and ß:

base = dist * (1/tan α + 1/tan ß)

dist = base ÷ (1/tan α + 1/tan ß)



Labels:

LBL A: Enter angles α and ß in the current angle mode. Returns 1/tan α + 1/tan ß.

LBL B: Base. When a number is entered prior to pressing [ B ], the number is stored as a base. Otherwise, the program solves for a base.

LBL C: Distance (of a line that bisects the base). When a number is entered prior to pressing [ C ], the number is stored as a base. Otherwise, the program solves for a base.


HP 67 Code:

LBL A: 001 31, 25, 11 (enter the angles)

TAN: 002 31, 64

1/x: 003 35, 62

x<>y: 004 35, 52

TAN: 005 31, 64

1/x: 006 35, 62

+: 007 61

STO 5: 008 33, 05

RTN: 009 35, 22


LBL B: 010 31, 25, 12 (base)

STO 3: 011 33, 03

F? 3: 012 35, 71, 03

RTN: 013 35, 22

RCL 4: 014 34, 04

RCL 5: 015 34, 05

× : 016 71

STO 3: 017 33, 03

RTN: 018 35, 22


LBL C: 019 31, 25, 13 (distance)

STO 4: 020 33, 04

F? 3: 021 35, 71, 03

RTN: 022 35, 22

RCL 3: 023 34, 03

RCL 5: 024 34, 05

÷ : 025 81

STO 4: 026 33, 04

RTN: 027 35, 22


Examples:

α = 30°, ß = 65°

Set degree mode. 30 [ ENTER ] 65 [ A ]. Result: 2.1984

Distance = 24, solve for base. 24 [ C ] [ B ]. Result: 52.7606

Base = 24, solve for distance. 24 [ B ] [ C ]. Result: 10.9172


Source:

“Triangulation (surveying)” Wikipedia. https://en.wikipedia.org/wiki/Triangulation_(surveying) (last edited October 24, 2025). Retried March 17, 2026



Time of Runoff on Turf


t = 2.5 * (L / (S * I^2))^(1/3)


t: time of runoff (rain off) in minutes

2.5: turf constant

L: distance from remote area in feet

S: slope of the terrain

I: rain intensity in inches per hour


Input Stack:

Z: L

Y: S

X: I


Output Stack:

X: t


HP 67 Code:

LBL A: 001 31, 25, 11

x² : 002 32, 54

× : 003 71

÷ : 004 81

3 : 005 03

1/x: 006 35, 62

y^x: 007 35, 63

2 : 008 02

. : 009 83

5 : 010 05

× : 011 71

RTN: 012 35, 22


Examples:

Inputs: Z: 900 ft, Y: 0.11, X: 4 in/hr. Result: 19.9917 min

Inputs: Z: 650 ft, Y: 0.33, X: 0.06 in/hr. Result: 204.4744 min


Source


Texas Instruments. Slide Rule Calculator SR-50A Manual. 1975. Manual from datamath.org: http://www.datamath.net/Manuals/SR-50A_US.pdf pg. 59



Beamwidth of a Radio Telescope


This program calculates the beam width of a radio telescope in degree-minutes-seconds.


Θ = 67625 ÷ (D * f)

Θ = beam width

D = the diameter of a circular telescope in feet

f = observing frequency in MHz (megahertz)


Inputs:

Y: D

X: f

Outputs:

X: Θ


HP 67 Code:

LBL B: 001 31, 25, 12

× : 002 71

1/x : 003 35, 62

6 : 004 06

7 : 005 07

6 : 006 06

2 : 007 02

5 : 008 05

× : 009 71

→H.MS: 10 32, 74

RTN: 11 35, 22


Examples:

Inputs: X: 1980 MHz, Y: 106 ft. Output: Θ: 0.1920 (19’20”)

Inputs: X: 1665 MHz, Y: 84 ft. Output: Θ: 0.2901 (29’01”)


Source


Ball, John A. Algorithms for RPN Calculators John Wiley & Sons: New York, NY. 1978. ISBN 0-471-03078-8. pg. 259



Fan Laws


p2 = (rpm2 ÷ rpm1)^n * p1

(p1 and p2 stand for various parameters, see the input syntax below)


Inputs:

1st law: (cfm: cubic feet per minute, rpm: revolutions per minute)

Calculate cfm2:

T: cfm1

Z: rpm2

Y: rpm1

X: 1


2nd Law: (sp: static pressure, rpm: revolutions per minute)

Calculate sp2:

T: sp1

Z: rpm2

Y: rpm1

X: 2


3rd Law: (hp: horsepower, rpm: revolutions per minute)

Calculate hp2:

T: hp1

Z: rpm2

Y: rpm1

X: 3


HP 67 Code:

LBL B: 001 31, 25, 12

R↓ : 002 35, 53

÷ : 003 81

R↑ : 004 35, 54

y^x: 005 35, 63

× : 006 71

RTN: 007 35, 22


Examples

1st Law: T: cfm1 = 2000, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 1

Result: cfm2 ≈ 2315.7895

2nd Law: T: sp1 = 0.5, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 2

Result: sp2 ≈ 0.6704

3rd Law: T: hp1 = 1.5, Z: rpm2 = 1100, Y: rpm1 = 950, X: n = 3

Result: hp2 ≈ 2.3286


Source

Gladstone, John. Air Conditioning Testing and Balancing: A Field Practice Manual A Van Nostrand Reinhhold Book. August 1976. pp. 24-32



More HP 67 goodness to come in November,


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 11, 2026

HP 20S: The July 2026 Program Collection

HP 20S: The July 2026 Program Collection


Triangulation






d = l * sin(α) * sin(ß) ÷ sin(α + ß)


Store in the following registers before calculation:

R1 = measure of angle A

R2 = measure of angle B

R3 = length l from point A to B


Solve:

R4: distance


Code:

01: LBL A; 61, 41 ,A

02: DEG; 61, 23

03: RCL 1; 22, 1

04: SIN; 23

05: ×; 55

06: RCL 2; 22, 2

07: SIN; 23

08: ÷; 45

09: (; 33

10: RCL 1; 22, 1

11: +; 75

12: RCL 2; 22, 2

13: ); 34

14: SIN; 23

15: ×; 55

16: RCL 3; 22, 3

17: =; 74

18: STO 4; 21, 4

19: RTN; 61, 26


Examples


Example 1:

Inputs: R1 = 60°, R2 = 50°, R3 = 10

Output: R4: 7.05990377592


Example 2:

Input: R1 = 30°, R2 = 80°, R3 = 27.5

Output: R4: 14.4101446626


Source:

“Triangulation (surveying)” Wikipedia. https://en.wikipedia.org/wiki/Triangulation_(surveying) (last edited October 24, 2025). Retried March 17, 2026


Payment: Continuous Compounding


PMT = PV * (e^r – 1) ÷ (1 – e^(-r * t))


Store in the following registers before calculation:

R1 = t: number of payments

R2 = r: periodic interest rate (as a decimal)

R3 = PV: present value


Solve:

R4: PMT: present


Code:

01: GTO B; 61, 41, b

02: RCL 3; 22, 3

03: ×; 55

04: (; 33

05: RCL 2; 22, 2

06: e^x; 12

07: -; 65

08: 1; 1

09: ); 34

10: ÷; 45

11: (; 33

12: 1; 1

13: -; 65

14: (; 33

15: RCL 1; 22, 1

16: ×; 55

17: RCL 2; 22, 2

18: ); 34

19: +/-; 32

20: e^x; 12

21: ); 34

22: =; 74

23: STO 4; 21, 4

24: RTN; 61, 26


Examples


Example 1:

Input: t: 36, r: 0.10 ÷ 12, PV: 5,000.00

Output: PMT: 161.434037378


Example 2:

Input: t: 60, r: 0.05 ÷ 12; PV: 26,349.56

Output: PMT: 497.374636585


Electrical Engineering: System Temperature to Noise Figure


When an amplifier is activated, two ways to express noise are the noise temperature (in Kelvin) and the noise figure (in decibels, dB). Using a reference temperature of 290 K, when the noise temperature (T) is known, the noise figure (F) can be calculated by:


F = 10 * log((T + 290) ÷ 290)


If temperature is given in degrees Celsius (°C), then the formula for noise figure becomes:


F = 10 * log((T°C + 563.15) ÷ 290)


since T = T°C + 273.15.


The following program assumes that temperature is given in degrees Celsius.


Store in the following registers before calculation:

R1 = T°C; temperature in degrees Celsius


Solve:

R2: F: noise figure


Code:

01: LBL C; 61, 41, C

02: RCL 1; 21, 1

03: +; 75

04: 5; 5

05: 6; 6

06: 3; 3

07 . ; 73

08: 1; 1

09: 5; 5

10: =; 74

11: ÷; 45

12: 2; 2

13: 9; 9

14: 0; 0

15: =; 74

16: LOG; 51, 13

17: ×; 55

18: 1; 1

19: 0; 0

20: =; 74

21: STO 2; 21, 2

22: RTN; 61, 26


Examples


Example 1:

Input: T = -160 °C (store in R1)

Output: F: 1.43068666235 dB


Example 2:

Input: T = 15°C

Output: F: 2.99642532081 dB


Source:

Ball, John A. Algorithms for RPN Calculators John Wiley & Sons: New York. 1978. ISBN 0-47-03070-8. pp. 266-267


Moderate Exercise: Target Heart Rate Range


The following equations calculate the target heart range for a typical person engaging in moderate exercise. According to the particle by Jenna Fletcher (see Source), the American Heart Society (AHA) states the person is engaged in moderate exercise when their heart rate is 50% to 70% of their maximum heart rate. The maximum heart rate is 220 minus the person’s age.


Disclaimer: This is not medical advice, any questions should be discussed with a doctor or health professional.


The moderate range is determined by:

high = (220 – age) * 0.7 = low * 1.4

low = (220 – age) * 0.5 = high * 5/7


For high intensity, use the range 70% to 85%.


Code:

01: LBL D; 61, 41, d

02: +/-; 32

03: +; 75

04: 2; 2

05: 2; 2

06: 0; 0

07: =; 74

08: ÷; 2

09: 2; 2

10: =; 74

11: R/S; 26

12: ×; 55

13: 1; 1

14: . ; 73

15: 4 ; 4

16: =; 74

17: RTN; 61, 26


Examples


Example 1:

Input: Age 49 (my age at the time of this blog)

Output: low: 85.5, high: 119.7


Example 2:

Input: Age 25

Output: low: 97.5, high: 136.5


Source:

Fletcher, Jenna. “What a target heart rate is and how to calculate it”. Medically Reviewed by Debra Sullivan Ph. D. Medical News Today. January 22, 2024. https://www.medicalnewstoday.com/articles/target-heart-rate-calculator March 16, 2026.



Percentile in a Range


The program calculates the percentile of x in the range [a, b].


percentile = (x – a) ÷ (b – a) * 100%


Store before calculating:

R1 = a, R2 = b, R3 = x


Code:

01: LBL E; 61, 42, E

02: ( ; 33

03: RCL 3; 22, 3

04: - ; 65

05 RCL 1; 22, 1

06: ) ; 34

07: ÷; 45

08: ( ; 33

09: RCL 2; 22, 2

10: - ; 65

11: RCL 1; 22, 1

12: ) ; 34

13: ×; 55

14: 2; 2

15: 10^x; 51, 12

16: =; 74

17: RTN; 61, 26


Examples


Example 1:

Input: R1 = 10, R2 = 50, R3 = 30 (30 in [10, 50])

Output: 50 (50%)


Example 2:

Input: R1 = 85.5, R2 = 117.5, R3 = 110 (110 in [85.5, 117.5])

Output: 76.5625 (76.5625%)


Programming all five of these programs will fill the program space of the HP 20S entirely (99 steps)!


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.

Sunday, May 3, 2026

HP 65 Programs: Triangulation, Percentile, Roots of Unity, Partial Fractions

 HP 65 Programs: Triangulation, Percentile, Roots of Unity, Partial Fractions


Triangulation

(done with HP-65 Emulator for Windows, Bernhard Emese)




Given:

Side angle α

Side angle ß

r = Length of base

Find:

h = height which crosses the base line at right angles



Code:

23: LBL

12: B

35: g

41: DEG

33 01: STO 1

35 08: R↓

41: ENTER

41: ENTER

44: CLX

51: -

31: f

04: SIN

35 09: R↑

31: f

04: SIN

71: *

33: STO

71: *

01: 1

35 08: R↓

61: +

31: f

04: SIN

33: STO

81: ÷

01: 1

34 01: RCL 1

24: RTN



Example: ß = 50°, α = 30°, r = 10

Result: h ≈ 3.89


Source:

“Triangulation (surveying)” Wikipedia. https://en.wikipedia.org/wiki/Triangulation (surveying) (last edited October 24, 2025). Retried March 17, 2026


Percentile in a Range


The program calculates the percentile of x in the range [a, b].


percentile = (x – a) ÷ (b – a) * 100%


Stack:

Z: x

Y: a

X: b


23: LBL

11: B

35 07: x<>y

51: -

35 00: LSTx

35 07: R↓

51: -

35 09: R↑

81: ÷

02: 2

32: f^-1

08: LOG (10^x)

71: ×

24: RTN


Example: The range: [210, 470], x = 376

Stack: Z: 376, Y: 210, X: 470

Result: 63.85



Roots of Unity

(done with HP-65 Emulator for Windows, Bernhard Emese)


w^n = 1

Registers used: R1 = n, R8 = n (counter)


n [ A ]


Cycle:

root # [ R/S ]

real part [ R/S ]

imaginary part [ R/S ] (the cycle starts again)


Repeat the cycle until the display is flashing zeros (forced 1/0 error). Hit [ CLx ] to stop the flashing.


This program switches the mode to radians angle measurement.



Code:

23: LBL

11: A

33 01: STO 1

33 08: STO 8

35: g

42: RAD

23: LBL

00: 0 (LBL 0 - subroutine)

34 08: RCL 8

84: R/S (show root #)

35: g

02: π

71: ×

02: 2

71: ×

34 01: RCL 1

81: ÷

01: 1

32: f^-1

01: R->P (->rect)

84: R/S (show real part)

35 07: x<>y

84: R/S (show imaginary part)

35: g

83: DSZ (decrement R8 by 1)

22: GTO

00: 0 (GOTO LBL 0)

34 08: RCL 8

35: g

04: 1/x

24: RTN


Example (FIX 4):

w^3 = 1

#; R/S; real part; R/S; imaginary part

3; 1.0000; -0.0000

2; -0.5000; -0.8660

1; -0.5000; 0.8660

(flashing zeroes)




Partial Fractions

(w is the variable, and T, Z, Y, and X are the stack contents)

(Tw+Z) ÷ ((w+Y)(w+X)) → B÷(w+Y) + A÷(w+X)

Input Stack: T, Z, Y, X 

Output Stack: B, A


Code: 

23: LBL 

11: A 

35, 07: x<>y 

51: - 

35, 00: LST x 

35, 09: R↑ 

71: × 

35, 00: LST x 

35, 07: x<>y 

35, 09: R↑ 

35, 07: x<>y 

51: - 

35, 09: R↑ 

81: ÷ 

41: ENTER 

35, 08: R↓ 

51: - 

35, 09: R↑ 

35, 07: x<>y 

24: RTN



Example 1: 

(12*w + 28) ÷ ((w+2) * (w+3)) = 4 ÷ (w+2) + 8 ÷ (w+3) 

Input Stack: T: 12, Z: 28, Y: 2, X: 3 press [ A ] 

Output Stack: Y (B): 4, X (A): 8



Example 2: 

(33) ÷ ((w-5) * (w+6)) = 3 ÷ (w-5) + -3 ÷ (w+6) 

Input Stack: T: 0, Z: 33, Y: -5, X: 6 press [ A ] 

Output Stack: Y (B): 3, X (A): -3



Example 3: 

(2*w - 3) ÷ ((w-1) * (w+4)) = -0.2 ÷ (w-1) + 0.2 ÷ (w+4) 

Input Stack: T: 2, Z: -3, Y: -1, X: 4 press [ A ] 

Output Stack: Y (B): -0.2, X (A): 0.2





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.

HP 15C: The I Squared Rule and HHC 2026

HP 15C: The I Squared Rule and HHC 2026 HHC 2026 Videos Before we start, the videos for HHC 2026 are up! Please take a look, ev...