E. Beacons

Our researchers have developed an advanced acoustic positioning system. We now have an installed prototype, and the field test is about to begin.

The positioning system consists of several rotating towers, deployed at known locations. Each tower has a loudspeaker attached to it, emitting a sinewave sound at a constant frequency. The towers rotate around their vertical axis counterclockwise once a second, while keeping their heading synchronized at all times (for example, they always face north at the same time).

The sound attenuates with distance (because the power of the signal spreads out on a large surface): the measured power is proportional to 1/R^2 and the measured amplitude to 1/R where R is the distance from the tower.

Photo by NASA

The towers and the rotating mechanisms were very expensive, so we had to choose cheap loudspeakers. They cannot be exactly calibrated to the same loudness. Even so, the generated amplitudes shouldn't differ more than 10% between towers (measured at the same distance and direction).

The speakers are installed in a way that the emitted signal is strongest in the direction of the speaker, with a +/- 45 degree spread.

The prototype installation is situated in a friendly, sheltered valley, with no wind or any source of external noise.

The speed of sound in the local environment was measured to be a stable 340.29 m/s.

Our coordinate system uses the meter for a unit. X and Y are euclidean coordinates. The earth can be considered completely flat in the area of the prototype. The value of X grows from west to east, that of Y grows from south to north.

The towers are described in the towers file. Each line in the file gives the position and the emitted frequency of a tower, like so:


Your task is to take a number of sound recordings we made in the field, and in each case determine the position of the recording apparatus. The apparatus was not moved during recording.


The inputs are WAV files - sound recordings made at various positions.


The output should be the position of the microphone:

For the field test to be considered successful, the calculated and real position must not differ by more than 2 meters.

Example input

You may use example.wav input for calibration.

Example output

Solution for example.wav:
-179.4 -95.3