You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

移动车辆上PC获取稳定GPS数据流的问题排查与优化

项目GPS问题排查与需求咨询

系统配置

  • 硬件:带4G升级模块的Dell Edge Gateway 5200盒式PC,搭载加速度计、Tel0138 USB GPS接收器;GPS单元固定于车辆顶部,PC的4G模块GNSS端口连接TE贴片天线
  • 软件:Windows 10 IoT系统,部署Debian11虚拟机;自启动程序负责激活传感器采集数据,通过gpsd获取GPS数据流

当前GPS问题

  • 经常无法启动数据流,启动后定位数据不准确,车辆移动时长时间显示同一位置
  • 手动运行gpsd和cgps时,屏幕长时间空白无定位结果,推测为信号搜索问题

已完成排查

  • GPS单元已移至车顶,安装位置无法再优化
  • 激活设备的代码仅调用cgps启动数据流,测试区静止状态下可正常工作,代码层面无需优化

需求咨询

  1. 查询PC模块贴片天线数据的简便方法:已编写使用Windows Location API的PowerShell脚本(实际为C#控制台程序),但仅能间歇性获取数据,希望得到更可靠的查询方式
  2. 高端USB GPS设备供应商推荐:现有Tel0138可靠性极低,项目预算充足,需替代的高端产品(目前仅找到同类型廉价低功耗产品)

附:C#位置采集代码

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Device.Location;
using System.Timers;


namespace Location
{
    class Program
    {
        static (double, double, string) Location()
        {
            GeoCoordinateWatcher watcher = new GeoCoordinateWatcher();

            watcher.TryStart(false, TimeSpan.FromMilliseconds(1000));

            GeoCoordinate coord = watcher.Position.Location;
        
    
            DateTime currentDateTime = DateTime.Now;
            string formattedDateTime = currentDateTime.ToString("dddd, dd MMMM yyyy HH:mm:ss");
            
            double lat = coord.Latitude;
            double lon = coord.Longitude;
            Console.WriteLine("Lat: " + lat + ", Lon: " + lon);
            Console.WriteLine(formattedDateTime);

            (double, double, string) t1 = (lat, lon, formattedDateTime);
            return t1; 

        }
        static void Location_Write()
        {
            using (StreamWriter writer = new StreamWriter("C:\\Documents\\test.txt", true))
            {
                writer.WriteLine(Location());


            }
        }
        public static void Main()
        {
            
            SetTimer();
            Console.WriteLine("\nPress the Enter key to exit the application...\n");
            Console.WriteLine("The application started at {0:HH:mm:ss.fff}", DateTime.Now);
            Console.ReadLine();
            //aTimer.Stop();
            //aTimer.Dispose();
        }
        private static void SetTimer()
        { Timer aTimer = new System.Timers.Timer(1000);
            aTimer.Elapsed += OnTimedEvent;
            aTimer.AutoReset = true;
            aTimer.Enabled = true;
        }
        private static void OnTimedEvent(Object source, System.Timers.ElapsedEventArgs e)
        { Location_Write();
        }
    }
}

附:cgps数据导出命令

gpspipe -w | grep TPV > /output

内容的提问来源于stack exchange,提问作者GKelly

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.14 15:52:37