From 90aff8c6fbf2a7ccf92a534c82c743a4bd0ab45f Mon Sep 17 00:00:00 2001 From: Kurt Nistelberger Date: Thu, 29 Sep 2022 14:24:19 -0700 Subject: [PATCH] Gps test Setup, PoC (#25919) * first ignore * init gps test * make LimeGPS git clone * revert ignore * . * remove prebuilt bins * Update README.md Co-authored-by: Kurt Nistelberger Co-authored-by: Adeeb Shihadeh old-commit-hash: 784246cf54505660afd0ebc6b8a5b43915543aef --- tools/gpstest/.gitignore | 2 ++ tools/gpstest/README.md | 38 ++++++++++++++++++++++++++++++++++++++ tools/gpstest/gpstest.sh | 8 ++++++++ tools/gpstest/setup.sh | 25 +++++++++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 tools/gpstest/.gitignore create mode 100644 tools/gpstest/README.md create mode 100755 tools/gpstest/gpstest.sh create mode 100755 tools/gpstest/setup.sh diff --git a/tools/gpstest/.gitignore b/tools/gpstest/.gitignore new file mode 100644 index 0000000000..b33aaa403c --- /dev/null +++ b/tools/gpstest/.gitignore @@ -0,0 +1,2 @@ +LimeGPS/ +LimeSuite/ diff --git a/tools/gpstest/README.md b/tools/gpstest/README.md new file mode 100644 index 0000000000..4125bf00af --- /dev/null +++ b/tools/gpstest/README.md @@ -0,0 +1,38 @@ +# GPS test setup + +# Usage +``` +# replaying a static location +./gpstest.sh -e -s + +# replaying a prerecorded route (NMEA cvs file) +./gpstest.sh -e -d +``` + +If `-e` is not provided the latest ephemeris file will be downloaded from +https://cddis.nasa.gov/archive/gnss/data/daily/20xx/brdc/. +(TODO: add auto downloader) + +# Hardware Setup + +* [LimeSDR USB](https://wiki.myriadrf.org/LimeSDR-USB) +* Asus AX58BT antenna + +# Software Setup +* https://github.com/myriadrf/LimeSuite +To communicate with LimeSDR the LimeSuite is needed it abstracts the direct +communication. It also contains examples for a quick start. + +The latest stable version (22.09) does not have the corresponding firmware +download available at https://downloads.myriadrf.org/project/limesuite. Therefore +version 20.10 was chosen. + +* https://github.com/osqzss/LimeGPS +Built on top of LimeSuite (libLimeSuite.so.20.10-1), generates the GPS signal. + +``` +./LimeGPS -e -l + +# Example +./LimeGPS -e /pathTo/brdc2660.22n -l 47.202028,15.740394,100 +``` diff --git a/tools/gpstest/gpstest.sh b/tools/gpstest/gpstest.sh new file mode 100755 index 0000000000..dfb71fe563 --- /dev/null +++ b/tools/gpstest/gpstest.sh @@ -0,0 +1,8 @@ +#!/bin/bash + +LimeGPS_BIN=LimeGPS/LimeGPS +if test -f "$LimeGPS_BIN"; then + LD_PRELOAD=LimeSuite/builddir/src/libLimeSuite.so $LimeGPS_BIN $@ +else + echo "LimeGPS binary not found, run 'setup.sh' first" +fi diff --git a/tools/gpstest/setup.sh b/tools/gpstest/setup.sh new file mode 100755 index 0000000000..c893f6aba8 --- /dev/null +++ b/tools/gpstest/setup.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +cd $DIR + +if [ ! -d LimeSuite ]; then + git clone https://github.com/myriadrf/LimeSuite.git + cd LimeSuite + # checkout latest version which has firmware updates available + git checkout v20.10.0 + mkdir builddir && cd builddir + cmake .. + make -j4 + cd ../.. +fi + +if [ ! -d LimeGPS ]; then + git clone https://github.com/osqzss/LimeGPS.git + cd LimeGPS + sed -i 's/LimeSuite/LimeSuite -I..\/LimeSuite\/src -L..\/LimeSuite\/builddir\/src/' makefile + make + cd .. +fi +