Files
AUV_150/doc/a.md
2025-06-16 12:18:49 +08:00

41 lines
1.7 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 150 auv 软件结构
# 150 auv 适配接口
## 发布变量
根据pNodeReporter模块订阅的变量需要发布的变量如下
NAV_X: The ownship vehicle position on the x axis of local coordinates.
NAV_Y: The ownship vehicle position on the y axis of local coordinates.
NAV_LAT: The ownship vehicle position on the y axis of global coordinates.
NAV_LONG: The ownship vehicle position on the x axis of global coordinates.
NAV_HEADING: The ownship vehicle heading in degrees.
NAV_YAW: The ownship vehicle yaw in radians.
NAV_SPEED: The ownship vehicle speed in meters per second.
NAV_DEPTH: The ownship vehicle depth in meters.
# 时序控制
采样时间、指令发送和指令计算是三个独立的线程进行的,需要对时序进行控制,理论上的时序应该是:
采样->指令计算->指令发送
采样频率为5Hz即为200ms指令计算在200ms内指令计算完成后再发送指令整个过程在200ms内完成
方案1使用时间戳进行同步
m_listen_time < m_calc_time < m_send_time
使用这种方式程序灵活性较高交互程序和控制程序可以写成两个独立的程序但是时序控制更加复杂由于通信延迟会造成一部分实时性的性能损失
方案2在采样时间循环内进行在模块采样时进行计算程序灵活性降低需要在交互程序中同时包含到控制程序但是实时性会较好
使用方案2可以考虑使用simulink进行代码生成和集成将整个控制也集成到里面
# 惯导精度问题
目前惯导设备经纬度的精度为1e-4大概为11米所有的精度精度比较低或许可以使用航位推算结合无迹卡尔曼滤波弥补并提高这个精度