SoftwarePractice.org: Home | Courseware | Wiki | Archive

Automotive simulator

From SoftwarePractice.org

This article describes an automative simulator project. The project is suitable for a second-year Java design and programming class.

Description

We all "know" how a car behaves when we use the accelerator, the brake, and the steering wheel... or do we? One way to test this hypothesis is to write a computer program to simulate the behavior of a car in response to typical driver control inputs.

In this project, you are to simulate a motor vehicle subject to driver input. The user interface will include, at a minimum, display widgets that allow you to set and vary the accelerator and brake signals from the driver, and the force applied to the steering wheel (to turn it). You can also use keys or a joystick for control inputs, if you wish. The interface should also include an interface that allows the user to set some interesting parameters, such as weight, engine power, frontal area, and CD.

The GUI will also include a display that shows the response of the vehicle. At a minimum, the display will show the current position (relative to starting point), speed, and direction. A more elaborate display could include things like distance traveled, "gas mileage," and anything else you could think of.

There are two challenges with this project. The first is that the "requirements" are fairly vague. The client desires a tool that helps him understand how a motor vehicle behaves, but isn't sure yet what features exactly would help him do that. Building and demonstrating at least one prototype during the development lifecycle would be a good idea.

The second is that vehicle dynamics can be quite complicated. You, as the software development team, need to be sure that you have a design and class structure that allows more sophisticated dynamics to be added later.

Personal tools