Compass calibrated correctly. To get the compass angle (360 degrees) I'm using the code
heading = 180 * math.atan2(yh,xh)/math.pi
if (yh >= 0):
return heading
else:
return 360 + heading
Its ok. North indicates correctly. The question is what to do to add or leave the result eg. + 20 / -20 degrees (I need to put the compass in one fixed position.)
Thanks for help!