From 95c61b4145f09feabc3bc9abf7727acff5a18167 Mon Sep 17 00:00:00 2001 From: fenrir Date: Wed, 27 Mar 2024 10:36:55 +0900 Subject: [PATCH] Fix GPS SVHealth bit fields --- lib/gps_pvt/supl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gps_pvt/supl.rb b/lib/gps_pvt/supl.rb index c5079e3..ed1bb1e 100644 --- a/lib/gps_pvt/supl.rb +++ b/lib/gps_pvt/supl.rb @@ -472,7 +472,7 @@ def attach_lpp(msg) } eph.iodc = Integer(v[:iod].join, 2) eph.iode = (eph.iodc & 0xFF) - eph.SV_health = Integer(v[:svHealth].join, 2) + eph.SV_health = Integer(v[:svHealth][0..5].join, 2) eph.WN = t_gps.week delta_sec = t_gps.seconds - eph.t_oe if delta_sec > GPS::Time::Seconds_week / 2 then