wxyz Senior Heliman Location: calif*, U know where
| The autopilot itself using 1Hz code phase GPS is only $600 of parts. A more reliable 20Hz carrier phase GPS would bring you to $900. The cost of crashes, batteries, airframes is $1,000,000,000,000,000,000,000,000.000. It is the calibration & work you do yourself, not the stuff you buy, that is the main problem.
From the VicaCopter manual which is a work in progress:
**** Magnetometer calibration
The IMU must be calibrated and giving the proper roll & pitch before the magnetometer is calibrated.
In settings.conf, set X_MAG, Y_MAG, Z_MAG to 0, 1, 2. Set DUMP_MAG to 1. Set DECLINATION to 0.
Run the autopilot on the airframe with the magnetometer & everything mounted in its final position. Rotate the airframe on the X, Y, & Z axes and note which axis corresponds to which column of mag output. Change the X_MAG, Y_MAG, & Z_MAG indices to match the dumped columns. Now the X, Y, & Z axes will be dumped in order & it's time to calibrate the ranges.
Rotate on the X, Y, & Z axes and note which direction North is from the printout. Unless you're on the equator, north points into the ground or into the sky.
Point each axis of the magnetometer towards & away from North and copy the max & min values from each column to the MAG_MIN and MAG_MAX values in settings.conf. Next, set DUMP_MAG to 0 and DUMP_THETA to 1.
With the autopilot running, rotate the airframe on the yaw axis. The printed heading should be North: 0, East: 90, South -179/179, West: -90. If the heading increases when it should decrease, reverse COMPASS_SIGN in settings.conf. If the heading is always offset by a certain amount, change COMPASS_OFFSET in settings.conf to correct the offset.
Finally, you need to set DECLINATION to the magnetic declination for your area. If magnetic north is 14' East of true north, set DECLINATION to 14.
With the autopilot running, rotate on the yaw & pitch axes to verify the compass reading is mostly independant of the attitude. |