1 Star 2 Fork 0

fsswl/gnss-ins-sim

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
demo_ui_ans.py 1.27 KB
一键复制 编辑 原始数据 按行查看 历史
# -*- coding: utf-8 -*-
# Filename: demo_ui_ans.py
"""
Demo of using ANS as GUI
Created on 2020-02-03
@author: dongxiaoguang
"""
import os
from gnss_ins_sim.sim import imu_model
from gnss_ins_sim.sim import ins_sim
from gnss_ins_sim.gui import gui_ans
def test_path_gen():
'''
test ANS as GUI.
'''
#### simulation config
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
#### 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)
#### start simulation
with open(motion_def_path+"//motion_def-3d.csv", 'r') as f:
tmp = f.read()
sim = ins_sim.Sim([fs, fs_gps, fs_mag],
tmp,
ref_frame=0,
imu=imu,
mode=None,
env=None,
algorithm=None)
sim.run(1)
# save simulation data to files
sim.results('')
#### GUI
gui = gui_ans.GuiAns()
gui.start(sim)
if __name__ == '__main__':
test_path_gen()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fsswl/gnss-ins-sim.git
git@gitee.com:fsswl/gnss-ins-sim.git
fsswl
gnss-ins-sim
gnss-ins-sim
master

搜索帮助