Replies

  • Developer

    That's a good question.  I suspect the code does not take into account the accelerometer offsets (which are set to make the HUD appear level) when it then goes to apply the compass sensor's output.  My guess though is that it doesn't matter much in practice because unless the APM/Pixhawk was really far off from level, the impact on the compass heading would be very small.

    If you want to test the effect you could go into the full parameter list and manually modify the INS_ACCEL_OFSX and OFSY (the spelling of the params might be slightly off) values.  On Copter we actually use the AHRS_TRIM_X and Y to get the HUD level but I don't think plane makes use of those.

    • I tested it by tilting the plane so that the APM and Compass were at 45 degrees pitch up, then do "Calibrate Level". Then I tested tilting the plane pitch up further, and I expect the compass heading to flip 180 deg when the compass is 45 degrees on its back

      Test 1. Terminal->Test->Compass
      Compass heading flips immediately when APM and compass are pointing straight up.

      Test 2. Yaw in MissionPlanner status
      Compass heading seems to flip around the straight up position but it is not as clear as in 1.

      I mounted my APM on top of the wing, and it is sloping maybe 10deg.
      Should I mount the APM and compass absolute level to the ground instead?
      Am I misunderstanding what "Calibrate Level" does?
      Maybe board orientation should be used with a tilt by as much as 45deg.

This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…