Update compass.cpp