I’ve searched the forums and tried Live Calibration 6 times with different settings.
I can’t figure this out.
I just put together a DIY Q4 with Pixhawk. I do not have an external GPS or compass. I want to calibrate the Pixhawk’s internal compass. I’m using a usb cable not Mavlink.
Also, I’m using APM Planner 2.0.16 on a Mac OS X 10.9. I think this might be causing me difficulty. I’ve re-installed APM Planner 2.0 three times, just in case I’m doing this
On the Compass calibration page should I have Compass and Auto Declination enabled or disabled?
I’m sure my compass is working because I can see the three axes on the graph. So it’s not a power regulator thing. I’m using the internal compass so it’s not a bad connection to the GPS/Mag module.
After trying another compass Live Calibration I found the logfile and
copied this. Looks like compass 2 is not working. Is it expecting an external compass?
How can I turn that off?
DEBUG 2015-03-14T22:10:44.692 live Calibration Started
DEBUG 2015-03-14T22:10:46.468 Param: “COMPASS_OFS_X” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.469 Param: “COMPASS_OFS_Y” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.470 Param: “COMPASS_OFS_Z” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.470 Param: “COMPASS_OFS2_X” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.471 Param: “COMPASS_OFS2_Y” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.472 Param: “COMPASS_OFS2_Z” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.473 Param: “COMPASS_OFS3_X” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.474 Param: “COMPASS_OFS3_Y” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:46.475 Param: “COMPASS_OFS3_Z” : QVariant(double, 0)
DEBUG 2015-03-14T22:10:47.440 Compass1 offsets x: 0 y: 0 z: 0
DEBUG 2015-03-14T22:10:47.441 Compass2 offsets x: 0 y: 0 z: 0
DEBUG 2015-03-14T22:11:11.292 APM: Text Message rx’d "PreArm: RC not calibrated"
INFO 2015-03-14T22:11:11.293 STATUS TEXT: 3 : "PreArm: RC not calibrated"
DEBUG 2015-03-14T22:11:41.296 APM: Text Message rx’d "PreArm: RC not calibrated"
INFO 2015-03-14T22:11:41.297 STATUS TEXT: 3 : "PreArm: RC not calibrated"
INFO 2015-03-14T22:11:47.324 finishCompassCalibration with compass 1: 116 data points
INFO 2015-03-14T22:11:47.324 finishCompassCalibration with compass 2: 0 data points
DEBUG 2015-03-14T22:11:47.333 UAS::executeCommand 242 conf 1 param1 2 param2 72.2204 param3 -64.9316 param4 -126.45 param5 0 param6 0 param7 0
ERROR 2015-03-14T22:11:47.334 Not enough data points for calculation:
DEBUG 2015-03-14T22:11:47.420 APM: Text Message rx’d "SUCCESS: Executed CMD: 242"
DEBUG 2015-03-14T22:11:47.421 Rejecting message, check mismatch: current_state: 0 == 3 , system id 0 == 1 , comp id 1 == 1
DEBUG 2015-03-14T22:12:11.287 APM: Text Message rx’d “PreArm: RC not calibrated”
The Pixhawk automatically checks external compass. If it detects it, it becomes compass 1. If only have an internal compass, it becomes compass 1. Compass 2 in this case is ignored as it doesn’t exist!
I did some looking at the code (sorry been really busy this week with other projects) and the compass 1 should be set correctly. If you do the Live Calibration and then go to the Full Parameter view and refresh the parameters you should see the same match offsets for compass 1. That this line in the log (execute command and the success return). The Error is for the second compass not having any data points.
DEBUG 2015-03-15T21:18:09.551 UAS::executeCommand 242 conf 1 param1 2 param2 14.8284 param3 -302.473 param4 -314.515 param5 0 param6 0 param7 0
ERROR 2015-03-15T21:18:09.551 Not enough data points for calculation: <--- this message is for compass 2 not compass 1.
DEBUG 2015-03-15T21:18:09.756 APM: Text Message rx'd "SUCCESS: Executed CMD: 242"
I’ll see if I have time to test tomorrow. or can get you a build to test for me. But try with the latest 2.0.16 for firmware.diydrones.com