Showing posts with label automobiles. Show all posts
Showing posts with label automobiles. Show all posts

Saturday, September 13, 2025

RPN: DM32 and DM42: Stopping Sight Distance (Metric)

RPN: DM32 and DM42: Stopping Sight Distance (Metric)



The Stopping Sight Distance Formula – Derivation


The stopping sight distance (SSD) formula calculates the theoretical distance that a driver needs to see to react and stop to avoid colliding with a person or hazard safely.


The SSD is measured in meters (or in US units, feet). This blog entry will focus on the SI system (meters, kilograms, seconds).


The SSD is broken down into two parts:


SSD = d1 + d2


Part 1: d1: Reaction Distance


d1 = reaction distance = v * t

v = velocity of the vehicle

t = reaction time that the driver takes to hit their brakes. The ideal reaction time is 1 second (or less). However, if the driver is tired or is later in age, the reaction time will increase. Typically, the reaction time is assumed to be 2.5 seconds.


In calculating SSD, the velocity is entered in usually in km/hr. (kilometers per hour). We need to change this into m/s.


1 km / hr * 1,000 m / 1 km * 1 hr / 3,600 s = 1,000 / 3,600 m/s = 5 / 18 m/s


Note many publication rounds this conversion factor to 0.278.


Hence, the completed reaction distance portion is:


d1 = 5 / 18 * v * t



Part 2: d2: Stopping Distance


This part is more complicated and includes factors such as friction force (µ), weight of the car (mass/g, g = 9.80665 m/s^2), and grade of the road (grd%, which is the increase or decrease of the slope of the road).


A common formula for d2 is:

d2 = v^2 / (a * (µ + grd%))


Another way to determine d2 is to equate the kinetic energy of the car with the work required to stop the car:


KE = work

m * v^2 / 2 = (µ + grd%) * w * d2


where:

m = mass of the car, in kg

v = velocity of the car, in km/hr

µ = friction factor (unit-less)

d2 = distance in m

w = weight of the car in N

grd% = grade of the road, in decimal (i.e. 1% = 0.01) (unit-less)

g = 9.80665 m/s^2


Note that mass = weight / gravity acceleration; m = w / g:


w / g * v^2 / 2 = (µ + grd%) * w * d2


Solving for d2:


d2 = v^2 / (2 * g * µ) = v^2 / (2 * g) * 1 / (µ * grd%)



Note that d2 is in meters. But v is in km/hr. Once again, a conversion factor is required. I’m focusing on the portion v^2 / (2 * g). I’m going to break the problem down into two parts: numerator and denominator.


Numerator:


1 km^2 / hr^2 * 1^2 hr^2 / 3,600^2 s^2 * 1,000^2 m^2 / 1^2 km^2 = 25 / 324 m^2 / s^2


Denominator:


2 * g = 2 * 9.80665 m/s^2 = 19.6133 m/s^2


Numerator/Denominator:


(25 / 324 m^2/s^2) / 19.6133 m/s^2 ≈ 3.934090328 * 10^-3 m ≈ 1/254.188368 m


Publications and associations, such as the AASHTO (American Association of State Highway and Transportation Officials), will often round 254.188368 to 254.



The Completed Formula


SSD = d1 + d2 = d1 = 5/18 * v * t + v^2 / (254.188368 * (µ + grd%))


The value of µ usually takes the values between 0.3 and 0.4. For the program, I’m assuming that µ = 0.35 for wet road conditions and µ = 0.70 dry conditions



SSD in US Units


Using similar analysis, the SSD in US units is:


SSD = 22/15 * v * t + v^2 / (29.91388812 * (µ +grd%))


where: v = velocity in mi/hr (mph), t = reaction time in seconds, SSD in feet (ft)


Publications will round the constants to 1.47 and 30, respectively.


On obtaining the conversion factors, note that:

1 mi/hr = 22/15 ft/s

1 mi^2/hr^2 = 484/225 ft^2/s^2

2 * g = 2 * 9.80665 m/s^2 * 100/30.48 ft/s^2 ≈ 2 * 32.17404856 ft/s^2 ≈ 64.34809711 ft/s^2

(484/225) / (64.38409711) ≈ 0.033429288 ≈ 1/29.91388812



DM32/ HP 32II Program: Stopping Sight Distance (SI Units)

(not for the HP 32S because it uses messages)


D01 LBL D

D02 35 [store constants; wet conditions times 100]

D03 STO A

D04 70 [store constants; dry conditions times 100]

D05 STO B

D06 2.5 [store default reaction time]

D07 STO T

D08 INPUT T

D09 INPUT V

D10 INPUT G [enter grade as a percentage: 1% → 1]

D11 SF 10 [set message mode, SF, decimal point, 0]

D12 “1 WET 2 DRY”

D13 INPUT i [input indirect variable]

D14 CF 10 [turn off message mode, CF, decimal point, 0]

D15 RCL V

D16 x^2

D17 RCL (i)

D18 RCL+ G

D19 100

D20 ÷

D21 254.188368

D22 ×

D23 ÷

D24 5

D25 RCL× V

D26 RCL× T

D27 18

D28 ÷

D29 +

D30 STO D [store and view SSD]

D31 VIEW D

D32 RTN


HP 42S/DM42/Free 42 Program: Stopping Sight Distance (SI Units)

(This program is similar to the 32SII version.)


00 {121-Byte Program}

01 LBL “SSD”

02 35

03 STO 01

04 70

05 STO 02

06 2.5

07 STO 03

08 “REACT TIME?”

09 PROMPT

10 STO 03

11 RCL 04

12 “VELOCITY?”

13 PROMPT

14 STO 04

15 RCL 05

16 “GRADE?”

17 PROMPT

18 STO 05

19 RCL 00

20 “1. WET 2. DRY”

21 PROMPT

22 STO 00

23 RCL 04

24 X↑2

25 RCL IND 00

26 RCL+ 05

27 100

28 ÷

29 254.188368

30 ×

31 ÷

32 5

33 RCL× 03

34 RCL× 04

35 18

36 ÷

37 +

38 STO 06

39 “SSD=”

40 ARCL ST X

41 RTN



Variables:

R00 = choice variable

R01 = wet condition friction coefficient * 100

R02 = dry condition friction coefficient * 100

R03 = reaction distance (set to default as of 2.5 sec)

R04 = velocity (km/hr)

R05 = grade

R06 = SSD in meters


Examples


Velocity: 96.5606 km/hr (about 60 mi/hr), Time: 2.5 seconds, Grade: 0%

Dry Conditions (i = 2): SSD: 119.4578 m

Wet Conditions (i = 1, µ = 0.35), SSD: 171.8596 m


Velocity: 96.5606 km/hr, Time: 1.5 seconds, Dry Road

Grade: +1%: SSD: 91.8973 m

Grade: -1%: SSD: 93.3948 m



Sources


American Association of State Highway and Transportation Officials NCHRP Report 400. 1997. Last accessed April 27, 2025. https://onlinepubs.trb.org/onlinepubs/nchrp/nchrp_rpt_400.pdf


Chandra, Satish IITR “Stopping Sight Distance on a road. Definition, concept, and evaluation of SSD with examples.” YouTube Video. July 16, 2023. https://www.youtube.com/watch?v=HEzdJE7NQeU&t=973s Last accessed April 27, 2025.


Omni Calculator. “Stopping Distance Calculator” July 22, 2024. Last accessed April 26, 2025. https://www.omnicalculator.com/physics/stopping-distance



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.

Saturday, June 29, 2019

HP 42S/DM42/Free 42: Auto Solvers

HP 42S/DM42/Free 42:  Auto Solvers

Introduction

This blog entry has four solvers for use the on the HP 42S (or Free42, DM42) in the subject of automobiles:

1.  Displacement, Bore, Strokes
2.  Gear Ratio, MPH, RPM
3.  Quarter Mile Estimation:  Elapsed Time, Car's Weight, Horsepower
4.  Tire Sizes

If you  are entering these programs by hand, I suggest that you create the needed variables ahead of time by storing an arbitrary value (it doesn't matter) into the variable.  Therefore when you recall the variables, they will be available in the soft menu.  Activate the solvers by pressing the orange shift key ([SHIFT]) [ 7 ] (SOLVER).

Link to the programs can be downloaded here:  https://drive.google.com/file/d/1N4wpO9Q-Mhyp51kdubAh5guf2xZhp8Tc/view?usp=sharing

1.  Displacement, Bore, Strokes  (File:  displacement.raw)

00 { 79-Byte Prgm }
01▸LBL "DISPMNT"
02 MVAR "DISPMNT"
03 MVAR "BORE"
04 MVAR "STROKE"
05 MVAR "#CYLIN"
06 PI
07 4
08 ÷
09 RCL "BORE"
10 X↑2
11 ×
12 RCL× "STROKE"
13 RCL× "#CYLIN"
14 RCL- "DISPMNT"
15 .END.

Variables:

(DISPM):  displacement of the a cylinder (cubic inches)
(BORE):  diameter of the cylinder (inches)
(STRO):  distance traveled by the piston (inches)
(#CYLI):  number of cylinders

Equation:

π/4 * bore^2 * stroke * #cylinders - displacement = 0

Example:

Bore = 4 in
Stroke = 3.5 in
4-cylinder engine

Result:  Displacement = 175.9292 in^3

2.  Gear Ratio, MPH, RPM  (File:  gearratio.raw)

00 { 74-Byte Prgm }
01▸LBL "GEARRTO"
02 MVAR "RPM"
03 MVAR "MPH"
04 MVAR "TIREDIA"
05 MVAR "GEARRAT"
06 PI
07 RCL× "RPM"
08 RCL× "TIREDIA"
09 RCL÷ "MPH"
10 1056
11 ÷
12 RCL- "GEARRAT"
13 .END.

Variables:

(RPM):  the tire's revolution per minute
(MPH):  speed of the vehicle (miles/hour)
(TIREDI): diameter of the tire (inches)
(GEAR):  gear ratio = transmission ratio * final drive ratio

Equation:

(RPM * π * tire_diameter) / (MPH * 1056) - gear_ratio = 0

Example:

RPM = 3,400 rpm
Tire Diameter = 28 in
Gear Ratio = 3.85

Result:  MPH = 73.5635 mph

3.  Quarter Mile Estimation:  Elapsed Time, Car's Weight, Horsepower
(File:  quartermile.raw)

00 { 52-Byte Prgm }
01 ▸ LBL "QRTMI"
02 MVAR "ET"
03 MVAR "WEIGHT"
04 MVAR "HP"
05 5.825
06 RCL "WEIGHT"
07 RCL÷ "HP"
08 3
09 1/X
10 Y↑X
11 ×
12 RCL- "ET"
13 .END.

Variables:

(ET): elapsed time for the car to travel 1/4 mile (seconds)
(WEIG):  weight of the car including passengers, drivers, fuel, and other items carried (pounds)
(HP):  horsepower

Equation:

(weight/horsepower)^(1/3) * 5.825 - elapsed_time = 0

Note:  MPH = (horsepower/weight)^(1/3) * 234 = 1363.05/elapsed_time

Example:

Weight:  3,540 lb
HP:  215 hp

Result:

ET: 14.8190
(MPH = 91.9802 mph,  [SHIFT] (TOP.FCN) ( 1/X ) 1363.05 [ * ])

4.  Tire Sizes (file name:  tiresize.raw)

00 { 87-Byte Prgm }
01 ▸ LBL "TIRESZE"
02 MVAR "SECWDTH"
03 MVAR "RIMDIA"
04 MVAR "ASPECT"
05 MVAR "TIREDIA"
06 2
07 RCL× "SECWDTH"
08 RCL× "ASPECT"
09 2540
10 ÷
11 RCL+ "RIMDIA"
12 RCL- "TIREDIA"
13 .END.

Variable:

(SECW):  section width (millimeter)
(RIMDI):  rim diameter (inches)
(ASEPC):  aspect ratio
(TIREDI):  tire diameter (inches)

On a side of a tire, we can get three of the four values by from a code that looks like this:

P235 / 75R17

P:  passenger car  (L for light trucks)
235:  section width
75:  aspect ratio
R:  radial tire
17: rim diameter

Equation:

(2 * section_width * aspect_ratio) / 2540 + rim_diameter - tire_diameter = 0

Example:  Use the stats of the tire above to calculate tire diameter.

Result:  30.8780 in

Source:

John Lawlor.  "Auto Math Handbook:  Mathematical Calculations, Theory, and Formulas for Automotive Enthusiasts"  HPBooks:  New York 1992  ISBN 1-55788-020-4

Eddie

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

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...