I was helping Ernie out in his shed a while back, when his favorite screwdriver suddenly wore out. I offered to go and pick up a new one for him and Ernie thought it was a great opportunity to test-drive his new electric car.
Ernie's car is a work in progress. The body of the car is a rectangular prism exactly 2 m long, 1 m wide and 0.5 m high. On the top is a circular control-dais on which is mounted a steering-wheel, a console with three buttons, and a single acceler-brake pedal (no seat - Ernie believes it is healthier to stand). The car rests on two wheels, one at each end. Each is mounted so its contact point with the ground is on the centre-line of the vehicle and exactly over the relevant end-face of the vehicle. Both the front and back wheels can be turned to steer, through a vertical axis that passes through the wheel's contact point.
I climbed on board to familiarise myself with the controls. "The drive mechanism is a bit unusual," said Ernie. "To move forwards, press the F button. This locks the steering of the back wheel so it is oriented at 0 degrees, parallel to the long axis of the car. The front wheel can be turned up to 90 degrees to either side and is driven by an electric motor to move the car forwards." I was impressed by the steering lock. "So if you turn the wheel to 90 degrees, the whole car will pivot around the contact point of the rear wheel?", I asked. "Correct," replied Ernie, "and if you turn it just under 76 degrees, the car will pivot around one of the back corners".
Ernie explained that with the F button pressed, the car could only go forwards. "Try pressing the R button" he suggested. To my surprise, when I did, the whole steering dais rotated 180 degrees so I was now facing the back of the car. "Now the former front wheel locks into the forward-aft orientation, and steering and drive is through what was the back wheel. It can also be turned by +/-90 degrees, so in reverse the car handles exactly the same as when driving forwards. You can think of the old back as the new front and the old front as the new back".
"And the P button?", I asked. "That is the automatic parking assist" Ernie replied. "If you press that while on the street, the car senses the nearest car-park, calculates exactly the minimum number of maneuvers required to park, then carries them out to park. If you are already parked, it calculates the minimum number of maneuvers required to un-park, and then carries them out.
I asked him to define exactly what he meant by some of the terms he had used:
Maneuver
1) starts with the car staionary
2) forward or reverse is chosen automatically
3) the driving wheel is turned to a fixed angle automatically
4) the car moves a distance automatically then stops
Park
1) a park is always made into a space between two neighbouring vehicles.
2) when parked the car's centre-line is no more than 45 degrees from the curb.
3) when parked every part of the car is closer to the curb than the furthest out parts of both neighbouring vehicles.
Un-park
1) when un-parked the car's centre-line is exactly parallel to the curb.
2) when un-parked every part of the car is further from the curb than the furthest out parts of both neighbouring vehicles.
I headed confidently into town in Ernie's car. I found a suitable gap between two trucks parked outside the Hardware store. The bodies of the trucks were perfect rectangular prisms much longer and wider than Ernie's car. They were parked exactly parallel to the curb, and exactly the same distance out from the curb (note that the road was straight). I stopped the car, exactly parallel to them, with the front face of the car exactly level with the back edge of the gap. When I pressed the P button, the car moved forwards in a single maneuver to park. I happened to have a tape-measure in my pocket and measured the length of the parking space. After picking up the screw-driver I returned to find that the truck parked behind me had moved forwards so the parking space was now significantly shorter. Once again I measured the length of the space. I got into the car, pressed P again and the car automatically un-parked in a single maneuver.
When I returned I described my trip to Ernie (exactly as above), then told him the two distances I had measured. "Interesting", said Ernie, "the exact events you describe wouldn't have been possible if either of the parking spaces had been any shorter". He then went on to tell me exactly what steering angles had been set for each maneuver.
I can't remember the lengths I measured (or the steering angles Ernie calculated). Can you help me?