WebbotLib AVR library
WebbotLib It just does it
  C++ documentation  C documentation

getBearing

Returns the compass bearing, in degrees, at the time of the last read().
Syntax
Compass. getBearing()
Where Compass is the name you have given to the device in Project Designer.
Parameters
None
Returns
COMPASS_TYPE
Note
In 3D the 'bearing' is also sometimes called 'yaw'.
Example
Assuming you have called the sensor 'myCompass' in Project Designer you can dump the value to the standard output device as follows:
myCompass.read();
COMPASS_TYPE val = myCompass.getBearing();
cout << "Bearing=" << val;

 

 

Valid XHTML 1.0 Transitional