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 } 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 |
|||
03-27-2024, 04:36 PM
(This post was last modified: 03-27-2024 07:56 PM by SlideRule.)
Post: #2
|
|||
|
|||
RE: Perfect Parking
The attached PDF excerpt from Springer Tracts in Advanced Robotics, Intelligent Mobile Robot Navigation Volume 16, Chapter 6. Intelligent System for Parallel Parking of Cars & Tractor-Trailers, pp. 167-172 expostulates a similar argument / presentation with equations, formulas & illustrations.
[attachment=13400] 6.3 Autonomous Parking in Cart and Cart-Like Vehicles Fig. 6.5 Parallel parking definition (6.7) 6.3.1 Collision Avoidance (6.8) (6.9) Fig.6.6 Possible collisions in parallel parking Fig. 6.7 Collision-free area for cart and parallel parking (6.10) Fig. 6.8 Set of Collision-free maneuvers 6.3.2 Fuzzy Selection System BEST! SlideRule |
|||
04-14-2024, 06:11 PM
Post: #3
|
|||
|
|||
RE: Perfect Parking
All right, I'll bite. Your expression can be rearranged to
√[A² + w(2√[r² - l²]-w)] - A, A = k + l The best I can do so far with 50g User RPL (Numeric Approx mode) is Code:
at 70.5 bytes with a single-character program name. Interesting that the 50g code is about twice the size of your 42S version. |
|||
04-15-2024, 06:19 AM
Post: #4
|
|||
|
|||
RE: Perfect Parking
(03-27-2024 01:11 AM)Thomas Klemm Wrote: Can you do better? No, not using only basic stack commands like you did. I tried ;-) Cheers, Werner 41CV†,42S,48GX,49G,DM42,DM41X,17BII,15CE,DM15L,12C,16CE |
|||
04-15-2024, 06:22 AM
Post: #5
|
|||
|
|||
RE: Perfect Parking
Here's what I came up with using your formula:
Code: 00 { 35-Byte Prgm } But alas, it takes 2 more bytes. I also tried using local variables: Code: \<< \-> r l k w Of course it takes more bytes than your solution. |
|||
04-16-2024, 11:04 AM
Post: #6
|
|||
|
|||
RE: Perfect Parking
The way I drive, the answer is easy!
L = length of car The formula is 5 * L Tom L Cui bono? |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)