compass module
- compass.calibrate_compass()
Begin calibrating the compass.
Will display the calibration parameter results which can be used in the future with set_compass_params.
Provided by Dr. Andrew H. Fagg and Twister Robotics.
- compass.get_compass_angle()
Get the current compass heading.
Provided by Dr. Andrew H. Fagg and Twister Robotics.
- Returns:
The compass angle in radians.
- Return type:
float
- compass.set_compass_params(meanX, meanY, meanZ, W1, W2, div_E1, div_E2)
Set the compass parameters based on a previous calibration.
Provided by Dr. Andrew H. Fagg and Twister Robotics.
- Parameters:
meanX (float) – A value provided by calibrate_compass.
meanY (float) – A value provided by calibrate_compass.
meanZ (float) – A value provided by calibrate_compass.
W1 (float) – A value provided by calibrate_compass.
W2 (float) – A value provided by calibrate_compass.
div_E1 (float) – A value provided by calibrate_compass.
div_E2 (float) – A value provided by calibrate_compass.