CHAMPAIGN, Ill. (AP) _ To keep waves, curves and angles from spoiling rows of corn and soybeans, Southern Illinois University researchers are developing a guidance system to help farmers plant in a straight line.

It uses a computer to combine ultrasonic sensing and ''dead reckoning'' - two systems used by ships on the high seas - said Richard Patterson, a professor of agricultural mechanization at SIU at Carbondale.

''The computer monitors both guidance systems four times a second,'' said Patterson. ''It decides which has the best data and provides direction to the farmer.''

Straight rows are important economically to farmers. A crooked row can lead to crop loss when harvest machinery is driven through the fields, and planting overlapping rows wastes seed, he said.

Many farmers use planters equipped with a long arm that makes a line in the dirt. They watch that mark to make sure each row is planted parallel to it. But the long markers are difficult to maintain and create hazards around fences, trees and power lines, said Patterson.

The SIU system was designed by one of Patterson's graduate students, Bernard Fehr, now at Michigan State University.

Patterson stressed that although laboratory tests of the guidance system were successful, ''it's not a production-ready, marketable product. It's just in the research stage.'' He would like to field test the system this year.

In the sonar system, a small groove is made in the soil at one side of the planter and sound waves bounced off the ground locate the mark and guide the farmer. Patterson said it is similar to the way sonar on Navy ships locates submarines.

At the same time, a light beam projected from the planter is reflected off the tires to determine that the wheels rotate at the same rate. If the planter's path is not absolutely straight, one wheel rotates faster than the other and the farmer will be alerted, said Patterson.

The dead-reckoning system is useful when, for example, the planter is moving across a grassy strip where the ultrasonic sensing device will not work, said Patterson. In a ship, dead reckoning means finding one's position based on measurements of the ship's motion, not on outside landmarks such as stars.

''The driver never knows which system is giving him directions,'' Patterson said, adding that the entire system involves only ''a couple of hundred dollars in hardware,'' but took many hours of design and computer programming.

''There are a lot of these concepts around - this is just one,'' said Patterson. ''If it is developed commercially, it probably will combine lots of ideas from various research projects.''

Under the computerized system, guidance could be given by a needle that would move to show a planter was getting off course, and the farmer could make the necessary correction manually. But the data eventually may be used to steer the tractor in a straight path automatically, he said in a telephone interview.

''Ideally, what we would like to do is hook the guidance information right into the steering mechanism of the tractor,'' he said. ''I am confident that can be done.''