An entry of maxVal indicates no return from the sonar, and thus there is nothing within the sonar range on that vector. This is the vector to your goal, and the vector is in the submarines coordinate system, with -z pointing forward. This method will be called soon after construction of your class, and before any calls to pingDisplay. This method will be called at regular intervals as your submarine moves through the environment. When it is called, your display should be redrawn with the new data.
Angles are in radians, and a positive angle goes in the direction of the right hand rule.
This sets the sub's rate of progress forward. Negative will make the sub go in reverse. Beware however that your sonar array is fixed forward, and you don't have any rear view mirrors. Design You will be shown a very rudimentary example of an interface. You should attempt to make a better interface than the example.