From d0fdf9a2cf21010efd498fd17325912dc024138e Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:41:13 +0800 Subject: [PATCH 01/32] add svid and frequency --- .../android/gpstest/CarrierFreqUtilsTest.kt | 97 ++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt index 9dafdf7b..93539d3c 100644 --- a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt +++ b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt @@ -679,7 +679,102 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(southpan122L5) assertEquals("L5", label) - + + // BDSBAS GEO-01 B1C - 130 + val bdsbas130B1C = SatelliteStatus(130, + GnssType.SBAS, + 30f, + true, + true, + true, + 72f, + 25f); + bdsbas130B1C.hasCarrierFrequency = true + bdsbas130B1C.carrierFrequencyHz = 1575420000.0 + bdsbas130B1C.sbasType = SbasType.BDSBAS + + label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B1C) + assertEquals("B1C", label) + + // BDSBAS GEO-01 B2a - 130 + val bdsbas130B2a = SatelliteStatus(130, + GnssType.SBAS, + 30f, + true, + true, + true, + 72f, + 25f); + bdsbas130B2a.hasCarrierFrequency = true + bdsbas130B2a.carrierFrequencyHz = 1176450000.0 + bdsbas130B2a.sbasType = SbasType.BDSBAS + + label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B2a) + assertEquals("B2a", label) + + // BDSBAS GEO-01 B1C - 143 + val bdsbas143B1C = SatelliteStatus(143, + GnssType.SBAS, + 30f, + true, + true, + true, + 72f, + 25f); + bdsbas143B1C.hasCarrierFrequency = true + bdsbas143B1C.carrierFrequencyHz = 1575420000.0 + bdsbas143B1C.sbasType = SbasType.BDSBAS + + label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B1C) + assertEquals("B1C", label) + + // BDSBAS GEO-01 B2a - 143 + val bdsbas143B2a = SatelliteStatus(122, + GnssType.SBAS, + 30f, + true, + true, + true, + 72f, + 25f); + bdsbas143B2a.hasCarrierFrequency = true + bdsbas143B2a.carrierFrequencyHz = 1176450000.0 + bdsbas143B2a.sbasType = SbasType.BDSBAS + + label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B2a) + assertEquals("B2a", label) + + // BDSBAS GEO-01 B1C - 144 + val bdsbas144B1C = SatelliteStatus(144, + GnssType.SBAS, + 30f, + true, + true, + true, + 72f, + 25f); + bdsbas144B1C.hasCarrierFrequency = true + bdsbas144B1C.carrierFrequencyHz = 1575420000.0 + bdsbas144B1C.sbasType = SbasType.BDSBAS + + label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B1C) + assertEquals("B1C", label) + + // BDSBAS GEO-01 B2a - 144 + val bdsbas144B2a = SatelliteStatus(144, + GnssType.SBAS, + 30f, + true, + true, + true, + 72f, + 25f); + bdsbas144B2a.hasCarrierFrequency = true + bdsbas144B2a.carrierFrequencyHz = 1176450000.0 + bdsbas144B2a.sbasType = SbasType.BDSBAS + + label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B2a) + assertEquals("B2a", label) // Test variations on the "same" numbers to make sure floating point equality works val gpsL1variation = SatelliteStatus(1, From 2519636f8464d40aaa3320f34fb52a6c8825264a Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:44:11 +0800 Subject: [PATCH 02/32] formatting --- .../java/com/android/gpstest/CarrierFreqUtilsTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt index 93539d3c..6f03e477 100644 --- a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt +++ b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt @@ -680,7 +680,7 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(southpan122L5) assertEquals("L5", label) - // BDSBAS GEO-01 B1C - 130 + // BDSBAS 130 B1C val bdsbas130B1C = SatelliteStatus(130, GnssType.SBAS, 30f, @@ -696,7 +696,7 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B1C) assertEquals("B1C", label) - // BDSBAS GEO-01 B2a - 130 + // BDSBAS 130 B2a val bdsbas130B2a = SatelliteStatus(130, GnssType.SBAS, 30f, @@ -712,7 +712,7 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B2a) assertEquals("B2a", label) - // BDSBAS GEO-01 B1C - 143 + // BDSBAS 143 B1C val bdsbas143B1C = SatelliteStatus(143, GnssType.SBAS, 30f, @@ -728,7 +728,7 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B1C) assertEquals("B1C", label) - // BDSBAS GEO-01 B2a - 143 + // BDSBAS 143 B2a val bdsbas143B2a = SatelliteStatus(122, GnssType.SBAS, 30f, @@ -744,7 +744,7 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B2a) assertEquals("B2a", label) - // BDSBAS GEO-01 B1C - 144 + // BDSBAS 144 B1C val bdsbas144B1C = SatelliteStatus(144, GnssType.SBAS, 30f, @@ -760,7 +760,7 @@ class CarrierFreqUtilsTest { label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B1C) assertEquals("B1C", label) - // BDSBAS GEO-01 B2a - 144 + // BDSBAS 144 B2a val bdsbas144B2a = SatelliteStatus(144, GnssType.SBAS, 30f, From e52907934a6a0189327a9cb3b815346738709263 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:48:10 +0800 Subject: [PATCH 03/32] Update SBAS Type --- .../src/main/java/com/android/gpstest/ui/status/StatusScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt b/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt index 91ced591..ebc1c8db 100644 --- a/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt +++ b/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt @@ -257,7 +257,7 @@ fun SbasFlag(status: SatelliteStatus, modifier: Modifier = Modifier) { SbasType.SDCM -> { FlagImage(R.drawable.ic_flag_russia, R.string.sdcm_content_description, modifier) } - SbasType.SNAS -> { + SbasType.BDSBAS -> { FlagImage(R.drawable.ic_flag_china, R.string.snas_content_description, modifier) } SbasType.SACCSA -> { From 3cd7e0074f02e2fa9aa2074e8a05c8cb567b0538 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:52:02 +0800 Subject: [PATCH 04/32] Update SbasType.java --- .../main/java/com/android/gpstest/library/model/SbasType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/android/gpstest/library/model/SbasType.java b/library/src/main/java/com/android/gpstest/library/model/SbasType.java index 60e0baaa..f8ea35ed 100644 --- a/library/src/main/java/com/android/gpstest/library/model/SbasType.java +++ b/library/src/main/java/com/android/gpstest/library/model/SbasType.java @@ -21,5 +21,5 @@ * http://mgex.igs.org/IGS_MGEX_Status_SBAS.php. */ public enum SbasType { - WAAS, EGNOS, GAGAN, MSAS, SDCM, SNAS, SACCSA, SOUTHPAN, UNKNOWN + WAAS, EGNOS, GAGAN, MSAS, SDCM, BDSBAS, SACCSA, SOUTHPAN, UNKNOWN } From d1ee62062153660d4c62ed017c8e0ed3e460366a Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 15:56:18 +0800 Subject: [PATCH 05/32] Update CarrierFreq database test --- .../com/android/gpstest/library/util/CarrierFreqUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java b/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java index 6be82a95..182a15e5 100644 --- a/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java +++ b/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java @@ -242,7 +242,11 @@ public static String getSbasCf(int svid, double carrierFrequencyMhz) { return getGlonassCf(carrierFrequencyMhz); } else if (svid == 130 || svid == 143 || svid == 144) { // BDSBAS (China) - return getBeidoucCf(carrierFrequencyMhz); + if (MathUtils.fuzzyEquals(carrierFrequencyMhz, 1575.42, CF_TOLERANCE_MHZ)) { + return "B1C"; + } else if (MathUtils.fuzzyEquals(carrierFrequencyMhz, 1176.45, CF_TOLERANCE_MHZ)) { + return "B2a"; + } } return CF_UNKNOWN; } From eb347dbf0690bdde15331fb9a52d4c0c6949929a Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:00:31 +0800 Subject: [PATCH 06/32] Update SatelliteUtil.kt --- .../java/com/android/gpstest/library/util/SatelliteUtil.kt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt b/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt index c2955c25..3f966894 100644 --- a/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt +++ b/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt @@ -294,8 +294,7 @@ object SatelliteUtil { } else if (this == 125 || this == 140 || this == 141) { return SbasType.SDCM } else if (this == 130 || this == 143 || this == 144) { - // Also referred to as BDSBAS - return SbasType.SNAS + return SbasType.BDSBAS } else if (this == 131 || this == 133 || this == 135 || this == 138) { return SbasType.WAAS } else if (this == 127 || this == 128 || this == 139) { From 4ba0eb93f3d4043c8950c118f5b9c0b725b122f1 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:07:14 +0800 Subject: [PATCH 07/32] Update UI strings hopefully it won't nuke database. But the service is at trial anyway --- library/src/main/res/values/strings.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/library/src/main/res/values/strings.xml b/library/src/main/res/values/strings.xml index d76001ec..55285fcb 100644 --- a/library/src/main/res/values/strings.xml +++ b/library/src/main/res/values/strings.xml @@ -147,7 +147,7 @@ GAGAN MSAS SDCM - SNAS + BDSBAS SACCSA SouthPAN @@ -192,7 +192,7 @@ GAGAN (India) MSAS (Japan) SDCM (Russia) - BDSBAS/SNAS (China) + BDSBAS (China) SACCSA (ICAO) SouthPAN (Australia / New Zealand) @@ -464,7 +464,7 @@ - Pentagons\n•\u0020 IRNSS/NavIC (India) - Ovals\n•\u0020 - SBAS (WAAS, EGNOS, GAGAN, MSAS, SDCM, BDSBAS/SNAS, SACCSA, SouthPAN) + SBAS (WAAS, EGNOS, GAGAN, MSAS, SDCM, BDSBAS, SACCSA, SouthPAN) - Diamonds\n\n •\u0020 Transparent satellites - Not in view\n From 6a280b100bf9ef36b3a8885700cd9d711e5a6e20 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:09:07 +0800 Subject: [PATCH 08/32] Wear UI --- wear/src/main/java/com/android/gpstest/wear/MainActivity.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt b/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt index 060f1984..83c5ad6d 100644 --- a/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt +++ b/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt @@ -317,8 +317,8 @@ fun SbasFlag(status: SatelliteStatus, modifier: Modifier = Modifier) { SbasType.SDCM -> { FlagImage(R.drawable.ic_flag_russia, R.string.sdcm_content_description, modifier) } - SbasType.SNAS -> { - FlagImage(R.drawable.ic_flag_china, R.string.snas_content_description, modifier) + SbasType.BDSBAS -> { + FlagImage(R.drawable.ic_flag_china, R.string.bdsbas_content_description, modifier) } SbasType.SACCSA -> { FlagImage(R.drawable.ic_flag_icao, R.string.saccsa_content_description, modifier) From 1c3a8112ca37006fcd5e3a78b912ded89eefb71b Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:16:24 +0800 Subject: [PATCH 09/32] Update gps_sky_legend_card.xml --- GPSTest/src/main/res/layout/gps_sky_legend_card.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPSTest/src/main/res/layout/gps_sky_legend_card.xml b/GPSTest/src/main/res/layout/gps_sky_legend_card.xml index 1eb00399..8588a270 100644 --- a/GPSTest/src/main/res/layout/gps_sky_legend_card.xml +++ b/GPSTest/src/main/res/layout/gps_sky_legend_card.xml @@ -611,7 +611,7 @@ android:background="@color/body_text_2_light" /> + android:text="@string/sky_legend_shape_bdsbas" /> Date: Tue, 31 Oct 2023 16:20:02 +0800 Subject: [PATCH 10/32] Update strings.xml --- library/src/main/res/values-in/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values-in/strings.xml b/library/src/main/res/values-in/strings.xml index 7e90e5eb..37cc02bb 100644 --- a/library/src/main/res/values-in/strings.xml +++ b/library/src/main/res/values-in/strings.xml @@ -174,7 +174,7 @@ GAGAN (India) MSAS (Jepang) SDCM (Rusia) - BDSBAS/SNAS (China) + BDSBAS (China) SACCSA (ICAO) Ketersediaan Sinyal From a1488294cd911852a25586a06a65a73ee6e14b56 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:20:36 +0800 Subject: [PATCH 11/32] Update strings.xml --- library/src/main/res/values-fa/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values-fa/strings.xml b/library/src/main/res/values-fa/strings.xml index 34720e77..d728bf0f 100644 --- a/library/src/main/res/values-fa/strings.xml +++ b/library/src/main/res/values-fa/strings.xml @@ -152,7 +152,7 @@ GAGAN (هند) MSAS (ژاپن) SDCM (روسیه) - BDSBAS/SNAS (چین) + BDSBAS (چین) SACCSA (ایکائو) سطح سیگنال From de4830c90dccc1187859647c2d2453ee29ea85d3 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:21:21 +0800 Subject: [PATCH 12/32] Update strings.xml --- library/src/main/res/values-fa/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values-fa/strings.xml b/library/src/main/res/values-fa/strings.xml index d728bf0f..9551d3ca 100644 --- a/library/src/main/res/values-fa/strings.xml +++ b/library/src/main/res/values-fa/strings.xml @@ -152,7 +152,7 @@ GAGAN (هند) MSAS (ژاپن) SDCM (روسیه) - BDSBAS (چین) + BDSBAS (چین) SACCSA (ایکائو) سطح سیگنال From ce0c3150889118a97fcfc1c68fc659508316b634 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:21:48 +0800 Subject: [PATCH 13/32] revert strings.xml --- library/src/main/res/values-in/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values-in/strings.xml b/library/src/main/res/values-in/strings.xml index 37cc02bb..40bdab35 100644 --- a/library/src/main/res/values-in/strings.xml +++ b/library/src/main/res/values-in/strings.xml @@ -174,7 +174,7 @@ GAGAN (India) MSAS (Jepang) SDCM (Rusia) - BDSBAS (China) + BDSBAS (China) SACCSA (ICAO) Ketersediaan Sinyal From 164897e8a04ddf6893a112aeae869aafd2ed3bbc Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:24:19 +0800 Subject: [PATCH 14/32] revert gps_sky_legend_card.xml --- GPSTest/src/main/res/layout/gps_sky_legend_card.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/GPSTest/src/main/res/layout/gps_sky_legend_card.xml b/GPSTest/src/main/res/layout/gps_sky_legend_card.xml index 8588a270..1eb00399 100644 --- a/GPSTest/src/main/res/layout/gps_sky_legend_card.xml +++ b/GPSTest/src/main/res/layout/gps_sky_legend_card.xml @@ -611,7 +611,7 @@ android:background="@color/body_text_2_light" /> + android:text="@string/sky_legend_shape_snas" /> Date: Tue, 31 Oct 2023 16:25:01 +0800 Subject: [PATCH 15/32] revert MainActivity.kt --- wear/src/main/java/com/android/gpstest/wear/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt b/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt index 83c5ad6d..02aada03 100644 --- a/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt +++ b/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt @@ -318,7 +318,7 @@ fun SbasFlag(status: SatelliteStatus, modifier: Modifier = Modifier) { FlagImage(R.drawable.ic_flag_russia, R.string.sdcm_content_description, modifier) } SbasType.BDSBAS -> { - FlagImage(R.drawable.ic_flag_china, R.string.bdsbas_content_description, modifier) + FlagImage(R.drawable.ic_flag_china, R.string.snas_content_description, modifier) } SbasType.SACCSA -> { FlagImage(R.drawable.ic_flag_icao, R.string.saccsa_content_description, modifier) From 27a71a7deacf3b1c9ba90f2b869719b6bdcb161f Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:25:36 +0800 Subject: [PATCH 16/32] revert strings.xml --- library/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values/strings.xml b/library/src/main/res/values/strings.xml index 55285fcb..595f0a23 100644 --- a/library/src/main/res/values/strings.xml +++ b/library/src/main/res/values/strings.xml @@ -147,7 +147,7 @@ GAGAN MSAS SDCM - BDSBAS + BDSBAS SACCSA SouthPAN From 93fed610e297ec295fb0b1d20dfe6082f960a596 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:27:32 +0800 Subject: [PATCH 17/32] Update strings.xml --- library/src/main/res/values/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values/strings.xml b/library/src/main/res/values/strings.xml index 595f0a23..e59c1538 100644 --- a/library/src/main/res/values/strings.xml +++ b/library/src/main/res/values/strings.xml @@ -192,7 +192,7 @@ GAGAN (India) MSAS (Japan) SDCM (Russia) - BDSBAS (China) + BDSBAS (China) SACCSA (ICAO) SouthPAN (Australia / New Zealand) From 6b0e530b2004b192d5b39d4e356c3282e4206517 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:29:28 +0800 Subject: [PATCH 18/32] Update strings.xml --- library/src/main/res/values-in/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values-in/strings.xml b/library/src/main/res/values-in/strings.xml index 40bdab35..7e90e5eb 100644 --- a/library/src/main/res/values-in/strings.xml +++ b/library/src/main/res/values-in/strings.xml @@ -174,7 +174,7 @@ GAGAN (India) MSAS (Jepang) SDCM (Rusia) - BDSBAS (China) + BDSBAS/SNAS (China) SACCSA (ICAO) Ketersediaan Sinyal From 7dd5a1b606d32cd91c2c83df72f3cf3612b30b69 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:29:30 +0800 Subject: [PATCH 19/32] Update strings.xml --- library/src/main/res/values-fa/strings.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/res/values-fa/strings.xml b/library/src/main/res/values-fa/strings.xml index 9551d3ca..34720e77 100644 --- a/library/src/main/res/values-fa/strings.xml +++ b/library/src/main/res/values-fa/strings.xml @@ -152,7 +152,7 @@ GAGAN (هند) MSAS (ژاپن) SDCM (روسیه) - BDSBAS (چین) + BDSBAS/SNAS (چین) SACCSA (ایکائو) سطح سیگنال From bab96d4dc3ee0529cc437cb777f0022723b6aea7 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:37:43 +0800 Subject: [PATCH 20/32] Update FAQ.md --- FAQ.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FAQ.md b/FAQ.md index 5eef3f5e..5ffc614e 100644 --- a/FAQ.md +++ b/FAQ.md @@ -22,7 +22,7 @@ More details are in the European Global Navigation Satellite System Agency (GSA) * GPS-aided GEO augmented navigation (GAGAN) (India) * Multi-functional Satellite Augmentation System (MSAS) (Japan) * System for Differential Corrections and Monitoring (SDCM) (Russia) - * Satellite Navigation Augmentation System (SNAS) (China) + * BeiDou Satellite-Based Augmentation System (BDSBAS) (China) * Soluciόn de Aumentaciόn para Caribe, Centro y Sudamérica (SACCSA) (ICAO) For lists of upcoming satellite launches and real-time satellite status on-line see https://github.com/barbeau/awesome-gnss#lists. From d3a0f1d6d6b9dd5b9c94a03aeb0fa09135d36f19 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 16:37:53 +0800 Subject: [PATCH 21/32] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 01ed0a8e..1926e248 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ It supports dual-frequency¹ GNSS for: * GPS-aided GEO augmented navigation (GAGAN) (India) * Multi-functional Satellite Augmentation System (MSAS) (Japan) * System for Differential Corrections and Monitoring (SDCM) (Russia) - * Satellite Navigation Augmentation System (SNAS) (China) + * BeiDou Satellite-Based Augmentation System (BDSBAS) (China) * Soluciόn de Aumentaciόn para Caribe, Centro y Sudamérica (SACCSA) (ICAO) * Southern Positioning Augmentation Network (SouthPAN) (Australia / New Zealand) From c29de3b82f5a6f152397c000dc01142f855d98c6 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:16:12 +0800 Subject: [PATCH 22/32] Update CarrierFreqUtilsTest.kt --- .../java/com/android/gpstest/CarrierFreqUtilsTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt index 6f03e477..d230705b 100644 --- a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt +++ b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt @@ -691,7 +691,7 @@ class CarrierFreqUtilsTest { 25f); bdsbas130B1C.hasCarrierFrequency = true bdsbas130B1C.carrierFrequencyHz = 1575420000.0 - bdsbas130B1C.sbasType = SbasType.BDSBAS + bdsbas130B1C.sbasType = SbasType.SNAS label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B1C) assertEquals("B1C", label) @@ -707,7 +707,7 @@ class CarrierFreqUtilsTest { 25f); bdsbas130B2a.hasCarrierFrequency = true bdsbas130B2a.carrierFrequencyHz = 1176450000.0 - bdsbas130B2a.sbasType = SbasType.BDSBAS + bdsbas130B2a.sbasType = SbasType.SNAS label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B2a) assertEquals("B2a", label) @@ -723,7 +723,7 @@ class CarrierFreqUtilsTest { 25f); bdsbas143B1C.hasCarrierFrequency = true bdsbas143B1C.carrierFrequencyHz = 1575420000.0 - bdsbas143B1C.sbasType = SbasType.BDSBAS + bdsbas143B1C.sbasType = SbasType.SNAS label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B1C) assertEquals("B1C", label) @@ -739,7 +739,7 @@ class CarrierFreqUtilsTest { 25f); bdsbas143B2a.hasCarrierFrequency = true bdsbas143B2a.carrierFrequencyHz = 1176450000.0 - bdsbas143B2a.sbasType = SbasType.BDSBAS + bdsbas143B2a.sbasType = SbasType.SNAS label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B2a) assertEquals("B2a", label) @@ -755,7 +755,7 @@ class CarrierFreqUtilsTest { 25f); bdsbas144B1C.hasCarrierFrequency = true bdsbas144B1C.carrierFrequencyHz = 1575420000.0 - bdsbas144B1C.sbasType = SbasType.BDSBAS + bdsbas144B1C.sbasType = SbasType.SNAS label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B1C) assertEquals("B1C", label) @@ -771,7 +771,7 @@ class CarrierFreqUtilsTest { 25f); bdsbas144B2a.hasCarrierFrequency = true bdsbas144B2a.carrierFrequencyHz = 1176450000.0 - bdsbas144B2a.sbasType = SbasType.BDSBAS + bdsbas144B2a.sbasType = SbasType.SNAS label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B2a) assertEquals("B2a", label) From ebd224a84be844454ca9d9fa66b7afd882cd6c7d Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:16:34 +0800 Subject: [PATCH 23/32] Update StatusScreen.kt --- .../src/main/java/com/android/gpstest/ui/status/StatusScreen.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt b/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt index ebc1c8db..91ced591 100644 --- a/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt +++ b/GPSTest/src/main/java/com/android/gpstest/ui/status/StatusScreen.kt @@ -257,7 +257,7 @@ fun SbasFlag(status: SatelliteStatus, modifier: Modifier = Modifier) { SbasType.SDCM -> { FlagImage(R.drawable.ic_flag_russia, R.string.sdcm_content_description, modifier) } - SbasType.BDSBAS -> { + SbasType.SNAS -> { FlagImage(R.drawable.ic_flag_china, R.string.snas_content_description, modifier) } SbasType.SACCSA -> { From ee05bd265b61cc4f8f36f8c235c313d67084e22b Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:17:46 +0800 Subject: [PATCH 24/32] Update SbasType.java --- .../main/java/com/android/gpstest/library/model/SbasType.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/android/gpstest/library/model/SbasType.java b/library/src/main/java/com/android/gpstest/library/model/SbasType.java index f8ea35ed..60e0baaa 100644 --- a/library/src/main/java/com/android/gpstest/library/model/SbasType.java +++ b/library/src/main/java/com/android/gpstest/library/model/SbasType.java @@ -21,5 +21,5 @@ * http://mgex.igs.org/IGS_MGEX_Status_SBAS.php. */ public enum SbasType { - WAAS, EGNOS, GAGAN, MSAS, SDCM, BDSBAS, SACCSA, SOUTHPAN, UNKNOWN + WAAS, EGNOS, GAGAN, MSAS, SDCM, SNAS, SACCSA, SOUTHPAN, UNKNOWN } From bf59939819272dbbae5ae51e6134571c049775a2 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:18:06 +0800 Subject: [PATCH 25/32] Update SatelliteUtil.kt --- .../main/java/com/android/gpstest/library/util/SatelliteUtil.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt b/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt index 3f966894..52f256c0 100644 --- a/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt +++ b/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt @@ -294,7 +294,7 @@ object SatelliteUtil { } else if (this == 125 || this == 140 || this == 141) { return SbasType.SDCM } else if (this == 130 || this == 143 || this == 144) { - return SbasType.BDSBAS + return SbasType.SNAS } else if (this == 131 || this == 133 || this == 135 || this == 138) { return SbasType.WAAS } else if (this == 127 || this == 128 || this == 139) { From 390a5d47e4033ac87ede639d9464a9c18d4f35e0 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:18:24 +0800 Subject: [PATCH 26/32] Update MainActivity.kt --- wear/src/main/java/com/android/gpstest/wear/MainActivity.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt b/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt index 02aada03..060f1984 100644 --- a/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt +++ b/wear/src/main/java/com/android/gpstest/wear/MainActivity.kt @@ -317,7 +317,7 @@ fun SbasFlag(status: SatelliteStatus, modifier: Modifier = Modifier) { SbasType.SDCM -> { FlagImage(R.drawable.ic_flag_russia, R.string.sdcm_content_description, modifier) } - SbasType.BDSBAS -> { + SbasType.SNAS -> { FlagImage(R.drawable.ic_flag_china, R.string.snas_content_description, modifier) } SbasType.SACCSA -> { From a665b1b5ad8d98773a2637350d76a366c8fdcbf7 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Tue, 31 Oct 2023 19:20:21 +0800 Subject: [PATCH 27/32] Update SatelliteUtil.kt --- .../main/java/com/android/gpstest/library/util/SatelliteUtil.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt b/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt index 52f256c0..49209ab6 100644 --- a/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt +++ b/library/src/main/java/com/android/gpstest/library/util/SatelliteUtil.kt @@ -294,6 +294,7 @@ object SatelliteUtil { } else if (this == 125 || this == 140 || this == 141) { return SbasType.SDCM } else if (this == 130 || this == 143 || this == 144) { + // Was renamed to BDSBAS nowadays return SbasType.SNAS } else if (this == 131 || this == 133 || this == 135 || this == 138) { return SbasType.WAAS From 525f187437dee0bfe9820c4f819590a2c4ea9ad6 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Mon, 6 Nov 2023 11:31:29 +0800 Subject: [PATCH 28/32] Fix virable --- .../android/gpstest/CarrierFreqUtilsTest.kt | 60 +++++++++---------- 1 file changed, 30 insertions(+), 30 deletions(-) diff --git a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt index d230705b..b7c9c75a 100644 --- a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt +++ b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt @@ -681,7 +681,7 @@ class CarrierFreqUtilsTest { assertEquals("L5", label) // BDSBAS 130 B1C - val bdsbas130B1C = SatelliteStatus(130, + val snas130B1C = SatelliteStatus(130, GnssType.SBAS, 30f, true, @@ -689,15 +689,15 @@ class CarrierFreqUtilsTest { true, 72f, 25f); - bdsbas130B1C.hasCarrierFrequency = true - bdsbas130B1C.carrierFrequencyHz = 1575420000.0 - bdsbas130B1C.sbasType = SbasType.SNAS + snas130B1C.hasCarrierFrequency = true + snas130B1C.carrierFrequencyHz = 1575420000.0 + snas130B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B1C) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B1C) assertEquals("B1C", label) // BDSBAS 130 B2a - val bdsbas130B2a = SatelliteStatus(130, + val snas130B2a = SatelliteStatus(130, GnssType.SBAS, 30f, true, @@ -705,15 +705,15 @@ class CarrierFreqUtilsTest { true, 72f, 25f); - bdsbas130B2a.hasCarrierFrequency = true - bdsbas130B2a.carrierFrequencyHz = 1176450000.0 - bdsbas130B2a.sbasType = SbasType.SNAS + snas130B2a.hasCarrierFrequency = true + snas130B2a.carrierFrequencyHz = 1176450000.0 + snas130B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas130B2a) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B2a) assertEquals("B2a", label) // BDSBAS 143 B1C - val bdsbas143B1C = SatelliteStatus(143, + val snas143B1C = SatelliteStatus(143, GnssType.SBAS, 30f, true, @@ -721,15 +721,15 @@ class CarrierFreqUtilsTest { true, 72f, 25f); - bdsbas143B1C.hasCarrierFrequency = true - bdsbas143B1C.carrierFrequencyHz = 1575420000.0 - bdsbas143B1C.sbasType = SbasType.SNAS + snas143B1C.hasCarrierFrequency = true + snas143B1C.carrierFrequencyHz = 1575420000.0 + snas143B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B1C) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B1C) assertEquals("B1C", label) // BDSBAS 143 B2a - val bdsbas143B2a = SatelliteStatus(122, + val snas143B2a = SatelliteStatus(122, GnssType.SBAS, 30f, true, @@ -737,15 +737,15 @@ class CarrierFreqUtilsTest { true, 72f, 25f); - bdsbas143B2a.hasCarrierFrequency = true - bdsbas143B2a.carrierFrequencyHz = 1176450000.0 - bdsbas143B2a.sbasType = SbasType.SNAS + snas143B2a.hasCarrierFrequency = true + snas143B2a.carrierFrequencyHz = 1176450000.0 + snas143B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas143B2a) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B2a) assertEquals("B2a", label) // BDSBAS 144 B1C - val bdsbas144B1C = SatelliteStatus(144, + val snas144B1C = SatelliteStatus(144, GnssType.SBAS, 30f, true, @@ -753,15 +753,15 @@ class CarrierFreqUtilsTest { true, 72f, 25f); - bdsbas144B1C.hasCarrierFrequency = true - bdsbas144B1C.carrierFrequencyHz = 1575420000.0 - bdsbas144B1C.sbasType = SbasType.SNAS + snas144B1C.hasCarrierFrequency = true + snas144B1C.carrierFrequencyHz = 1575420000.0 + snas144B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B1C) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B1C) assertEquals("B1C", label) // BDSBAS 144 B2a - val bdsbas144B2a = SatelliteStatus(144, + val snas144B2a = SatelliteStatus(144, GnssType.SBAS, 30f, true, @@ -769,11 +769,11 @@ class CarrierFreqUtilsTest { true, 72f, 25f); - bdsbas144B2a.hasCarrierFrequency = true - bdsbas144B2a.carrierFrequencyHz = 1176450000.0 - bdsbas144B2a.sbasType = SbasType.SNAS + snas144B2a.hasCarrierFrequency = true + snas144B2a.carrierFrequencyHz = 1176450000.0 + snas144B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(bdsbas144B2a) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B2a) assertEquals("B2a", label) // Test variations on the "same" numbers to make sure floating point equality works From 210965a718f49d68facd16d9a4fe55ac0183ff1f Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:00:52 +0800 Subject: [PATCH 29/32] Update CarrierFreqUtilsTest.kt --- .../java/com/android/gpstest/CarrierFreqUtilsTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt index b7c9c75a..a726b61c 100644 --- a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt +++ b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt @@ -693,7 +693,7 @@ class CarrierFreqUtilsTest { snas130B1C.carrierFrequencyHz = 1575420000.0 snas130B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B1C) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B1C, GnssType.BEIDOU) assertEquals("B1C", label) // BDSBAS 130 B2a @@ -709,7 +709,7 @@ class CarrierFreqUtilsTest { snas130B2a.carrierFrequencyHz = 1176450000.0 snas130B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B2a) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B2a, GnssType.BEIDOU) assertEquals("B2a", label) // BDSBAS 143 B1C @@ -725,7 +725,7 @@ class CarrierFreqUtilsTest { snas143B1C.carrierFrequencyHz = 1575420000.0 snas143B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B1C) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B1C, GnssType.BEIDOU) assertEquals("B1C", label) // BDSBAS 143 B2a @@ -741,7 +741,7 @@ class CarrierFreqUtilsTest { snas143B2a.carrierFrequencyHz = 1176450000.0 snas143B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B2a) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B2a, GnssType.BEIDOU) assertEquals("B2a", label) // BDSBAS 144 B1C @@ -757,7 +757,7 @@ class CarrierFreqUtilsTest { snas144B1C.carrierFrequencyHz = 1575420000.0 snas144B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B1C) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B1C, GnssType.BEIDOU) assertEquals("B1C", label) // BDSBAS 144 B2a @@ -773,7 +773,7 @@ class CarrierFreqUtilsTest { snas144B2a.carrierFrequencyHz = 1176450000.0 snas144B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B2a) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B2a, GnssType.BEIDOU) assertEquals("B2a", label) // Test variations on the "same" numbers to make sure floating point equality works From b8828a721ae708476a7c115b3a54db82f638c76d Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:15:08 +0800 Subject: [PATCH 30/32] Update CarrierFreqUtilsTest.kt --- .../java/com/android/gpstest/CarrierFreqUtilsTest.kt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt index a726b61c..b7c9c75a 100644 --- a/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt +++ b/GPSTest/src/androidTest/java/com/android/gpstest/CarrierFreqUtilsTest.kt @@ -693,7 +693,7 @@ class CarrierFreqUtilsTest { snas130B1C.carrierFrequencyHz = 1575420000.0 snas130B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B1C, GnssType.BEIDOU) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B1C) assertEquals("B1C", label) // BDSBAS 130 B2a @@ -709,7 +709,7 @@ class CarrierFreqUtilsTest { snas130B2a.carrierFrequencyHz = 1176450000.0 snas130B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B2a, GnssType.BEIDOU) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas130B2a) assertEquals("B2a", label) // BDSBAS 143 B1C @@ -725,7 +725,7 @@ class CarrierFreqUtilsTest { snas143B1C.carrierFrequencyHz = 1575420000.0 snas143B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B1C, GnssType.BEIDOU) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B1C) assertEquals("B1C", label) // BDSBAS 143 B2a @@ -741,7 +741,7 @@ class CarrierFreqUtilsTest { snas143B2a.carrierFrequencyHz = 1176450000.0 snas143B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B2a, GnssType.BEIDOU) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas143B2a) assertEquals("B2a", label) // BDSBAS 144 B1C @@ -757,7 +757,7 @@ class CarrierFreqUtilsTest { snas144B1C.carrierFrequencyHz = 1575420000.0 snas144B1C.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B1C, GnssType.BEIDOU) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B1C) assertEquals("B1C", label) // BDSBAS 144 B2a @@ -773,7 +773,7 @@ class CarrierFreqUtilsTest { snas144B2a.carrierFrequencyHz = 1176450000.0 snas144B2a.sbasType = SbasType.SNAS - label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B2a, GnssType.BEIDOU) + label = CarrierFreqUtils.getCarrierFrequencyLabel(snas144B2a) assertEquals("B2a", label) // Test variations on the "same" numbers to make sure floating point equality works From 201de88188961cdf101371c46e8b1022883e9ab0 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:16:07 +0800 Subject: [PATCH 31/32] Update CarrierFreqUtils.java --- .../com/android/gpstest/library/util/CarrierFreqUtils.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java b/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java index 182a15e5..a19a93dd 100644 --- a/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java +++ b/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java @@ -242,10 +242,7 @@ public static String getSbasCf(int svid, double carrierFrequencyMhz) { return getGlonassCf(carrierFrequencyMhz); } else if (svid == 130 || svid == 143 || svid == 144) { // BDSBAS (China) - if (MathUtils.fuzzyEquals(carrierFrequencyMhz, 1575.42, CF_TOLERANCE_MHZ)) { - return "B1C"; - } else if (MathUtils.fuzzyEquals(carrierFrequencyMhz, 1176.45, CF_TOLERANCE_MHZ)) { - return "B2a"; + return getBeidoucCf(carrierFrequencyMhz); } } return CF_UNKNOWN; From 6f834c1d2870e422084b310cc58e7b0cefbc8e96 Mon Sep 17 00:00:00 2001 From: Narugakuruga <31060534+Narugakuruga@users.noreply.github.com> Date: Mon, 6 Nov 2023 13:23:49 +0800 Subject: [PATCH 32/32] Update CarrierFreqUtils.java --- .../java/com/android/gpstest/library/util/CarrierFreqUtils.java | 1 - 1 file changed, 1 deletion(-) diff --git a/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java b/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java index a19a93dd..6be82a95 100644 --- a/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java +++ b/library/src/main/java/com/android/gpstest/library/util/CarrierFreqUtils.java @@ -243,7 +243,6 @@ public static String getSbasCf(int svid, double carrierFrequencyMhz) { } else if (svid == 130 || svid == 143 || svid == 144) { // BDSBAS (China) return getBeidoucCf(carrierFrequencyMhz); - } } return CF_UNKNOWN; }