1 Star 1 Fork 0

alfar/gnss-ins-sim

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
demo_multiple_algorithms.py 1.52 KB
一键复制 编辑 原始数据 按行查看 历史
# -*- coding: utf-8 -*-
# Filename: test_ins_sim.py
"""
Test ins_sim.
Created on 2018-04-23
@author: dongxiaoguang
"""
import os
import math
from gnss_ins_sim.sim import imu_model
from gnss_ins_sim.sim import ins_sim
# globals
D2R = math.pi/180
motion_def_path = os.path.abspath('.//demo_motion_def_files//')
fs = 100.0 # IMU sample frequency
fs_gps = 10.0 # GPS sample frequency
fs_mag = fs # magnetometer sample frequency, not used for now
def test_path_gen():
'''
test only path generation in Sim.
'''
#### choose a built-in IMU model, typical for IMU381
imu_err = 'mid-accuracy'
# generate GPS and magnetometer data
imu = imu_model.IMU(accuracy=imu_err, axis=9, gps=True)
#### Algorithm
# ECF based inclinometer
from demo_algorithms import inclinometer_mahony
algo1 = inclinometer_mahony.MahonyFilter()
from demo_algorithms import inclinometer_acc
algo2 = inclinometer_acc.TiltAcc()
#### start simulation
sim = ins_sim.Sim([fs, fs_gps, fs_mag],
motion_def_path+"//motion_def-static.csv",
# 'e://Projects//gnss-ins-sim//demo_saved_data//2018-04-24-14-55-53//',
ref_frame=1,
imu=imu,
mode=None,
env=None,
algorithm=[algo1, algo2])
sim.run(2)
# save simulation data to files
sim.results('')
# plot data
sim.plot(['att_euler', 'ab', 'wb'])
if __name__ == '__main__':
test_path_gen()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/alfar999/gnss-ins-sim.git
git@gitee.com:alfar999/gnss-ins-sim.git
alfar999
gnss-ins-sim
gnss-ins-sim
master

搜索帮助