APP下载

基于QNX的多线程技术在船舶嵌入式操纵训练系统中的应用

2017-10-17王立伟刘常波胡坤张建华李建辉

现代电子技术 2017年20期

王立伟 刘常波 胡坤 张建华 李建辉

摘 要: 为了解决船舶嵌入式操纵训练系统软件设计中出现的数据显示滞后、界面卡顿和系统死机问题,引入基于QNX操作系统的多线程技术进行系统软件程序改进设计。通过仿真实验对系统功能和实时性能进行了检验,结果表明:系统软件可以模拟船舶运动,实现训练功能;多线程程序改进设计有效解决了数据显示滞后、界面卡顿和死机问题,系统能够完成对模型的实时解算和状态参数的实时显示,數据更新时间在2 ms内,满足实时性要求。

关键词: QNX; 多线程技术; 嵌入式训练系统; 程序设计

中图分类号: TN967.7?34 文献标识码: A 文章编号: 1004?373X(2017)20?0091?04

Abstract: In order to resolve the problems of data display delay, interface buffering, and system crash during software design of the embedded training system for ship maneuvering, the QNX OS?based multithreading technology is imported for design improvement of system software program. The simulation experiment was carried out to detect the function and real?time performance of the system. The results show that the system software can simulate ship motion and realize the training function, the design improvement of multithreading program effectively resolves the problems of data display delay, interface buffering and system crash, the system can accomplish real?time resolution of the model and real?time display of status parameters, and the data update interval (no more than 2 ms) can meet the real?time requirement.

Keywords: QNX; multithreading technology; embedded training system; program design

0 引 言

船舶操纵系统是借助操纵装置改变或保持船舶的速度、姿态以及方向的系统,在船舶生命力及航行安全中占有极为重要的地位[1]。嵌入式操纵训练系统通过在原有操纵系统中加入嵌入式训练模块,将模拟训练与实装训练结合起来,有效地解决了传统训练方式不能同时兼顾训练真实性和训练实用性的问题,具有逼真、高效和低费用的特点,已成为各国关注的焦点[2]。

在船舶嵌入式操纵训练系统软件设计中,由于模型解算计算量大、系统资源有限,系统软件经常会在某些特定条件下(如航速过大或转舵角度过大时)出现数据显示滞后、卡顿甚至系统死机现象。为了充分利用系统有限的资源,提高实时性能,实现训练功能,本文对某船舶嵌入式操纵训练系统进行了多线程程序改进设计。……

登录APP查看全文