AutoMovie API
    Preparing search index...

    Function driveCar

    • A car driven along a course: its root on the path, its steering wheel turned as the path's curvature asks with its front road wheels steering with it, and its road wheels rolling with the distance.

      The steering wheel's angle is the road wheels' angle times the car's steering ratio, and the road wheels' angle is the one that turns the car on the path's radius: the angle whose tangent is the wheelbase over the radius of the rear axle's path (the Ackermann relation of a car's low-speed turn). The car's root is the middle of its wheelbase, so the rear axle's radius is the root's shortened by half a wheelbase. A left turn turns the wheel to the left, a positive travel; reversing, the same bend of the path needs the wheel turned the other way, because the car then turns about its rear axle backward. The front road wheels follow the steering wheel (createCar.ackermann). Every road wheel rolls without slipping: its spin is 360 degrees per wheel circumference of the signed distance, forward less reversed, taken modulo a turn. The wheel is at its angle for the whole of a turn and straight between turns.

      Parameters

      Returns IRide<createCar.Affordance, createCar.Dimension>

      The ride, with the course's instants.

      When the path bends tighter than the car's steering lock allows, giving the least radius at the leg or, on a timed course, the sample, or the course is malformed.