Comments (3)
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.
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.
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)
- how to simulate a magnetometer HOT 3
- a question for imu model parameter? HOT 2
- GPS lat and lon remain at their initial values whatever the motion profile and algorithms HOT 2
- Computation of w_nb_n in function calc_true_sensor_output HOT 3
- Command Type 1 reference frame HOT 1
- Why does ‘g’ need to be multiplied by -1 in the NED coordinate system? HOT 3
- Different GPS generated using int and float longitude and latitude HOT 1
- A question about GPS measurement HOT 2
- How to create high freq trajectory from low freq trajectory. HOT 12
- Pathgen.py calculation of the gyro output HOT 5
- Comments and odd order for function euler_update_zyx HOT 1
- 真实加速度测量值生成问题 HOT 1
- Lic
- Accelerometer coordinate frame HOT 1
- I can't run file demo_no_algo.py HOT 1
- Issue with mid-accuracy HOT 1
- 能否使用ENU坐标系输出? HOT 4
- Simulate attitude change of IMU sensor HOT 3
- Is there a plan for demo_ins_loose to be completed? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gnss-ins-sim.