From 23608fb8d50eb215071192df3ff2174ab433409c Mon Sep 17 00:00:00 2001 From: gdpinchina Date: Mon, 12 Nov 2018 08:52:32 +0800 Subject: [PATCH 1/4] fix BDS GEO satellite ephemeris calculation BDS: Prn 1~5 and 59 satellites in BDS are GEO type. Special treatments are needed. ref. http://www.csno-tarc.cn/system/constellation&ce=english --- core/lib/GNSSEph/OrbitEphStore.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/core/lib/GNSSEph/OrbitEphStore.cpp b/core/lib/GNSSEph/OrbitEphStore.cpp index a5c58f54a..869cc4306 100644 --- a/core/lib/GNSSEph/OrbitEphStore.cpp +++ b/core/lib/GNSSEph/OrbitEphStore.cpp @@ -73,8 +73,24 @@ namespace gpstk if(onlyHealthy && !eph->isHealthy()) GPSTK_THROW(InvalidRequest("Not healthy")); - // compute the position, velocity and time - Xvt sv = eph->svXvt(t); + Xvt sv; + const BDSEphemeris *bdsEph = NULL; + // compute the position, velocity and time + switch (eph->satID.system) + { + // BDS: Prn 1~5 and 59 satellites in BDS are GEO type. + // Special treatments are needed. + // ref. http://www.csno-tarc.cn/system/constellation&ce=english + case SatID::systemBeiDou: + bdsEph = dynamic_cast(eph); + sv = bdsEph->svXvt(t); + break; + // GPS, GAL, QZSS + default: + sv = eph->svXvt(t); + break; + } + return sv; } catch(InvalidRequest& ir) { GPSTK_RETHROW(ir); } From 9285f99dc1ab1ea944a79f4fd038cd72c854ee57 Mon Sep 17 00:00:00 2001 From: gdpinchina Date: Mon, 12 Nov 2018 08:55:45 +0800 Subject: [PATCH 2/4] Add support for a new BDS GEO satellite No. PRN SVN Satellite Type Launch date Commissioning Days Status 36 59 GEO01 BDS-3 2018.11.01 10 Testing ref. http://www.csno-tarc.cn/system/constellation&ce=english --- core/lib/GNSSEph/BDSEphemeris.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/GNSSEph/BDSEphemeris.cpp b/core/lib/GNSSEph/BDSEphemeris.cpp index 23fc0982f..0b85d12c9 100644 --- a/core/lib/GNSSEph/BDSEphemeris.cpp +++ b/core/lib/GNSSEph/BDSEphemeris.cpp @@ -160,7 +160,7 @@ namespace gpstk // If the PRN ID is greatet than 5, assume this // is a MEO or IGSO SV and use the standard OrbitEph // version of svXvt - if (satID.id>5) return(OrbitEph::svXvt(t)); + if (satID.id>5 && satID.id != 59) return(OrbitEph::svXvt(t)); // If PRN ID is in the range 1-5, treat this as a GEO // From 51903f4973ca0b1dc4e84fa220cf2da433e75e6f Mon Sep 17 00:00:00 2001 From: gdpinchina Date: Mon, 12 Nov 2018 09:03:26 +0800 Subject: [PATCH 3/4] Fix a slip of pen --- core/lib/FileHandling/SP3/SP3Header.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/FileHandling/SP3/SP3Header.cpp b/core/lib/FileHandling/SP3/SP3Header.cpp index f0967f327..0b8a05f1a 100644 --- a/core/lib/FileHandling/SP3/SP3Header.cpp +++ b/core/lib/FileHandling/SP3/SP3Header.cpp @@ -170,7 +170,7 @@ namespace gpstk } else { - FFStreamError e("Unknown 1st char in line " + asString(i) + ": " + FFStreamError e("Unknown 1st char in line " + asString(lineCount) + ": " + string(1, line[0])); GPSTK_THROW(e); } From 7a1e6fdd750f36b478ee959b5a1212cdc2a618ea Mon Sep 17 00:00:00 2001 From: gdpinchina Date: Mon, 12 Nov 2018 09:21:08 +0800 Subject: [PATCH 4/4] Add include for BDSEphemeris --- core/lib/GNSSEph/OrbitEphStore.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/core/lib/GNSSEph/OrbitEphStore.cpp b/core/lib/GNSSEph/OrbitEphStore.cpp index 869cc4306..21fce3367 100644 --- a/core/lib/GNSSEph/OrbitEphStore.cpp +++ b/core/lib/GNSSEph/OrbitEphStore.cpp @@ -53,6 +53,7 @@ #include "RinexSatID.hpp" // for dump #include "OrbitEphStore.hpp" +#include "BDSEphemeris.hpp" using namespace std; using namespace gpstk::StringUtils;