this is prompted by a user log showing NaN compass offsets, resulting in a crash. The patch ensures we never end up with NaN offsets, and also constrains the offsets to a reasonable limit