I'm using the g2o C++ optimization library to refine a GPS trajectory using accelerometer data.
The program uses a Levenberg-Marquardt optimizer over data points representing the position and orientation (vector part of quaternion) of the accelerometer. The only constraints are the accelerations in the local reference frame.
Error is measured as the difference between the accelerometer reading, and the local second derivative of the path traced by the data points — the change in velocity from (a to b) to (b to c), disregarding change in orientation, plus the upward acceleration counteracting gravity.
The initial path is a polygon drawn between GPS readings.
The optimizer runs for five iterations of gradient descent, and seems to make good adjustments. The polygon corners get rounded off a bit. But then it seems to get stuck, and Levenberg's lambda goes up for five iterations before the program terminates.
BUT
It does a lot more refinement if I further constrain it using data from the gyroscope. However, not at as much as I'd expect, and the gyro data needs have artificially high Fisher information.
Working on segments of the whole problem doesn't terminate so quickly. It does more refinement using acceleration alone.
What could be going wrong? The inability to refine the initial estimate by acceleration alone seems to indicate a serious problem.