Post Reply 
Perfect Parking
03-27-2024, 01:11 AM
Post: #1
Perfect Parking
From The Geometry of Perfect Parking:

Quote:How much extra length (above the length of your car) do you need to parallel park?

The length of the parking space must be at least the length of my car plus

\(
\sqrt{(r^2 - \ell^2) + (\ell + k)^2 - \left( \sqrt{r^2 - \ell^2} -w \right)^2} - \ell - k
\)

where \(r\) is the radius of my car’s kerb-to-kerb turning circle,
\(\ell\) is my car’s wheel-base (the distance between the centres of the front wheel and the corresponding back wheel),
\(k\) is the distance from the centre of the front wheel to the front of the car,
and \(w\) is the width of one of the parked cars:
the one near the front of my car once I’ve parked.

I came up with the following program for the HP-42S, which should work with most HP calculators:
Code:
00 { 33-Byte Prgm }
01▸LBL "PARKING"
02 X<>Y
03 R↑
04 X↑2
05 X<>Y
06 R↑
07 +
08 X<>Y
09 LASTX
10 X↑2
11 -
12 ENTER
13 SQRT
14 R↑
15 -
16 X↑2
17 -
18 X<>Y
19 X↑2
20 +
21 SQRT
22 X<>Y
23 -
24 END

Example

\(
\begin{align}
r &= 5.4\text{m} \\
\ell &= 2.6\text{m} \\
k &= 1.3\text{m} \\
w &= 1.7\text{m} \\
\end{align}
\)

5.4 ENTER
2.6 ENTER
1.3 ENTER
1.7 XEQ "PARKING"

1.4303

Can you do better?



This is the same program for the HP-15C:
Code:
   001 {       34 } X<=>Y
   002 {    43 33 } g R^
   003 {    43 11 } g x^2
   004 {       34 } X<=>Y
   005 {    43 33 } g R^
   006 {       40 } +
   007 {       34 } X<=>Y
   008 {    43 36 } g LSTx
   009 {    43 11 } g x^2
   010 {       30 } -
   011 {       36 } ENTER
   012 {       11 } sqrt(x)
   013 {    43 33 } g R^
   014 {       30 } -
   015 {    43 11 } g x^2
   016 {       30 } -
   017 {       34 } X<=>Y
   018 {    43 11 } g x^2
   019 {       40 } +
   020 {       11 } sqrt(x)
   021 {       34 } X<=>Y
   022 {       30 } -
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Perfect Parking - Thomas Klemm - 03-27-2024 01:11 AM
RE: Perfect Parking - SlideRule - 03-27-2024, 04:36 PM
RE: Perfect Parking - 0db - 04-14-2024, 06:11 PM
RE: Perfect Parking - Werner - 04-15-2024, 06:19 AM
RE: Perfect Parking - Thomas Klemm - 04-15-2024, 06:22 AM
RE: Perfect Parking - toml_12953 - 04-16-2024, 11:04 AM



User(s) browsing this thread: 1 Guest(s)