Giter Club home page Giter Club logo

Comments (3)

Chris2L avatar Chris2L commented on August 20, 2024

Changing the corrected code to the following:

                vel_dot_b = accel[i-1, :] + c_bn.T.dot(g_n) -\
                            attitude.cross3(c_bn.dot(w_ie_n)+gyro[i-1,:], self.vel_b[i-1,:])
                self.vel_b[i,:] = self.vel_b[i-1,:] + vel_dot_b*self.dt
                c_bn = attitude.euler2dcm(self.att[i, :])
                self.vel[i,:] = c_bn.T.dot(self.vel_b[i, :])

(moving c_bn update down) gives a near-perfect result for free_integration:

The following are error statistics.
-----------statistics for simulation attitude (Euler, ZYX)  from algo (in units of ['deg', 'deg', 'deg'])
        Simulation run algo0_0:
                --Max error: [0. 0. 0.]
                --Avg error: [0. 0. 0.]
                --Std of error: [0. 0. 0.]

-----------statistics for simulation position from algo (in units of ['m', 'm', 'm'])
        Simulation run algo0_0:
                --Max error: [0. 0. 0.]
                --Avg error: [0. 0. 0.]
                --Std of error: [0. 0. 0.]

-----------statistics for simulation velocity from algo (in units of ['m/s', 'm/s', 'm/s'])
        Simulation run algo0_0:
                --Max error: [0.00000000e+00 5.91110382e-20 2.13906583e-16]
                --Avg error: [ 0.00000000e+00  9.42872039e-21 -4.45712803e-17]
                --Std of error: [0.00000000e+00 1.41265006e-20 9.44778169e-17]

This is more in line with how it is done in the ref_frame=1, section of the code of free integration.

EDIT:
For my example there was an error in the code that did not affect the result as everything happened in the horizontal plane, but c_bn.T.dot(g_n) the .T should be removed.

from gnss-ins-sim.

dxg-aceinna avatar dxg-aceinna commented on August 20, 2024

This is only a simulation. To recover 100% the positions in free integration with the simulated data, we need to make sure the data is integrated the same way as it is derived from pos/vel/att. Otherwise, numerical integration and numerical accuracy can cause difference. You can verify this by setting a higher sampling rate to see if this helps.

from gnss-ins-sim.

Chris2L avatar Chris2L commented on August 20, 2024

Ok, great, seems like it is an integration error. There is another issue I updated in my code to change pos update to:
pos(k) = pos(k-1) + vel(k-1)*dt + 0.5*acc*dt*dt
I understand that this is more in line with kinematics.

from gnss-ins-sim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.