Skip to content

Commit

Permalink
Add UBX::gnss_svid in misc/ubx.rb as fenrir-naru/gps_pvt@fd1027d
Browse files Browse the repository at this point in the history
  • Loading branch information
fenrir-naru committed Oct 23, 2023
1 parent a4d996a commit faa867a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions tool/misc/ubx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit faa867a

Please sign in to comment.