wenhorm 发表于 2023-5-2 13:15:56

TWR-30—B定位,上位机如何输出坐标?

本帖最后由 wenhorm 于 2023-5-15 11:03 编辑

想做一个能上传数据到服务器功能,请问TWR-30—B定位,上位机如何才能输出坐标?或者有无其他更好的解决方案?

蓝点无限 发表于 2023-5-3 21:55:01

参考这个帖子内容
http://51uwb.cn/forum.php?mod=viewthread&tid=348&highlight=%C9%CF%CE%BB%BB%FA

wenhorm 发表于 2023-5-7 12:49:55

蓝点无限 发表于 2023-5-3 21:55
参考这个帖子内容
http://51uwb.cn/forum.php?mod=viewthread&tid=348&highlight=%C9%CF%CE%BB%BB%FA

以下是帖子中的回答。但是该连接已经失效了,可以重新分享吗?另外tb分享的上位机是exe,请问在哪里获得源码?
----------分割线---------------
songhan 发表于 2021-5-14 12:26
好的,非常感谢。完成了可以给我发邮件

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

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

    _first = true;
复制代码


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

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

    _first = true;
复制代码


重新编译即可

定位结果坐标部分代码如下,可以根据自己需求重新定义数据格式:
    if(calculateTagLocation(&report, count, ra ) == TRIL_3SPHERES)
    {
      newposition = true;
      rp.numberOfLEs++;
      //log data to file
      if(_file)
      {
            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) +
                        QString("%1:%2:%3:%4\n").arg(rp.rangeValue).arg(rp.rangeValue).arg(rp.rangeValue).arg(rp.rangeValue);
            QTextStream ts( _file );
            ts << s;
      }
复制代码

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


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

蓝点无限 发表于 2023-5-7 13:26:37

wenhorm 发表于 2023-5-7 12:49
以下是帖子中的回答。但是该连接已经失效了,可以重新分享吗?另外tb分享的上位机是exe,请问在哪里获得 ...

两年前的这个分享已经被删除了。

你可以按照说明自己编译一个。
源码和固件源码在一起,需要解压密码
页: [1]
查看完整版本: TWR-30—B定位,上位机如何输出坐标?