attempting a function to compensate for irregualrities in earth's magnetic field
fixed some errors in QuadLibrary