From faa867a4ef9641c0d73329bbf3623320deff2726 Mon Sep 17 00:00:00 2001 From: fenrir Date: Mon, 23 Oct 2023 16:13:18 +0900 Subject: [PATCH] Add UBX::gnss_svid in misc/ubx.rb as fenrir-naru/gps_pvt@fd1027d --- tool/misc/ubx.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/tool/misc/ubx.rb b/tool/misc/ubx.rb index ea922302a..d8777d480 100644 --- a/tool/misc/ubx.rb +++ b/tool/misc/ubx.rb @@ -131,4 +131,19 @@ def UBX.svid(id, gnss = :GPS) nil end end + + def UBX.gnss_svid(legacy_svid) + case legacy_svid + when 1..32; [:GPS, legacy_svid] + when 120..158; [:SBAS, legacy_svid] + when 211..246; [:Galileo, legacy_svid - 210] + when 159..163; [:Beido, legacy_svid - 158] + when 33..64; [:Beido, legacy_svid - 27] + #when 173..182 # IMES + when 193..197; [:QZSS, legacy_svid - 192] + when 65..96; [:GLONASS, legacy_svid - 64] + when 255; [:GLONASS, nil] + else; nil + end + end end