51uwb.cn

 找回密码
 立即注册
查看: 6419|回复: 12
打印 上一主题 下一主题

UWB定位上位机增加导出数据功能

[复制链接]

35

主题

988

帖子

4154

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4154
楼主
发表于 2021-5-13 10:26:31 | 显示全部楼层
导出那些数据?有什么格式要求吗?
回复

使用道具 举报

35

主题

988

帖子

4154

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4154
沙发
发表于 2021-5-14 10:21:43 | 显示全部楼层

可以,已经提交技术,帮忙处理了
回复

使用道具 举报

35

主题

988

帖子

4154

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
4154
板凳
发表于 2021-5-17 11:05:10 | 显示全部楼层
songhan 发表于 2021-5-14 12:26
好的,非常感谢。完成了可以给我发邮件

上位机代码增加log方法:
在RTLSClient.cpp 找到如下代码
  1. void RTLSClient::openLogFile(QString userfilename)
  2. {
  3.     QDateTime now = QDateTime::currentDateTime();

  4.     _logFilePath = "./Logs/"+now.toString("yyyyMMdd_hhmmss")+"RTLS_log.txt";

  5.     _first = true;
复制代码


修改为
  1. void RTLSClient::openLogFile(QString userfilename)
  2. {
  3.     QDateTime now = QDateTime::currentDateTime();

  4.     _logFilePath =now.toString("yyyyMMdd_hhmmss")+"RTLS_log.txt";

  5.     _first = true;
复制代码


重新编译即可

定位结果坐标部分代码如下,可以根据自己需求重新定义数据格式:
  1.     if(calculateTagLocation(&report, count, ra ) == TRIL_3SPHERES)
  2.     {
  3.         newposition = true;
  4.         rp.numberOfLEs++;
  5.         //log data to file
  6.         if(_file)
  7.         {
  8.             QString s = nowstr + QString("LE:%1:%2:%3:[%4,%5,%6]:").arg(tid).arg(rp.numberOfLEs).arg(lastSeq).arg(report.x).arg(report.y).arg(report.z) +
  9.                         QString("%1:%2:%3:%4\n").arg(rp.rangeValue[lastSeq][0]).arg(rp.rangeValue[lastSeq][1]).arg(rp.rangeValue[lastSeq][2]).arg(rp.rangeValue[lastSeq][3]);
  10.             QTextStream ts( _file );
  11.             ts << s;
  12.         }
复制代码

重新编译后,点击log 部分的start即可生成log文件


已经编译好,参考如下:
  1. 链接:https://pan.baidu.com/s/1U1HdWXB8rYYpHsiVaxAI6A
  2. 提取码:wugs
复制代码





回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

bphero Inc.  

GMT+8, 2024-5-16 08:52 , Processed in 0.012091 second(s), 6 queries , File On.

Powered by Discuz! X3.3

© 2001-2017 Comsenz Inc. Template By 【未来科技】【 www.wekei.cn 】

快速回复 返回顶部 返回列表