PNBBDSD1NavDataFactory_T.cpp
Go to the documentation of this file.
1 //==============================================================================
2 //
3 // This file is part of GNSSTk, the ARL:UT GNSS Toolkit.
4 //
5 // The GNSSTk is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU Lesser General Public License as published
7 // by the Free Software Foundation; either version 3.0 of the License, or
8 // any later version.
9 //
10 // The GNSSTk is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Lesser General Public License for more details.
14 //
15 // You should have received a copy of the GNU Lesser General Public
16 // License along with GNSSTk; if not, write to the Free Software Foundation,
17 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110, USA
18 //
19 // This software was developed by Applied Research Laboratories at the
20 // University of Texas at Austin.
21 // Copyright 2004-2022, The Board of Regents of The University of Texas System
22 //
23 //==============================================================================
24 
25 
26 //==============================================================================
27 //
28 // This software was developed by Applied Research Laboratories at the
29 // University of Texas at Austin, under contract to an agency or agencies
30 // within the U.S. Department of Defense. The U.S. Government retains all
31 // rights to use, duplicate, distribute, disclose, or release this software.
32 //
33 // Pursuant to DoD Directive 523024
34 //
35 // DISTRIBUTION STATEMENT A: This software has been approved for public
36 // release, distribution is unlimited.
37 //
38 //==============================================================================
39 #include <iostream>
40 #include <sstream>
41 #include <iterator>
42 #include "FactoryCounter.hpp"
44 #include "TestUtil.hpp"
45 #include "BDSD1NavTimeOffset.hpp"
46 #include "BDSD1NavHealth.hpp"
47 #include "BDSD1NavEph.hpp"
48 #include "BDSD1NavAlm.hpp"
49 #include "BDSD1NavIono.hpp"
50 #include "BDSD1NavISC.hpp"
51 #include "TimeString.hpp"
52 #include "CivilTime.hpp"
53 
54 using namespace std;
55 
56 // avoid having to type out template params over and over.
58 
59 namespace gnsstk
60 {
61  std::ostream& operator<<(std::ostream& s, SVHealth h)
62  {
63  s << StringUtils::asString(h);
64  return s;
65  }
66 }
67 
69 {
70  string rv;
71  for (const auto& i : nmts)
72  {
73  rv = rv + " " + gnsstk::StringUtils::asString(i);
74  }
75  return rv;
76 }
77 
78 
79 
81 {
82 public:
85  unsigned foreignTest();
87  unsigned filterTest(const gnsstk::NavMessageTypeSet& nmts);
89  unsigned filterTests();
91  unsigned addDataValidityTest();
92  unsigned processAlmTest();
93  unsigned processEphTest();
94  unsigned processSF5Pg7Test();
95  unsigned processSF5Pg8Test();
96  unsigned processSF5Pg9Test();
97  unsigned processSF5Pg10Test();
98  unsigned processSF5Pg24Test();
99  unsigned isAlmDefaultTest();
100 
101 #include "D1NavTestDataDecl.hpp"
102 };
103 
104 
107 {
108 #include "D1NavTestDataDef.hpp"
109 }
110 
111 
114 {
115  TUDEF("PNBBDSD1NavDataFactory", "addData");
116  BDSFactoryCounter fc(testFramework);
122  gnsstk::PackedNavBitsPtr nonBDS = std::make_shared<gnsstk::PackedNavBits>(
123  gloSid, gloid, gloNav, "XX", ephD1NAVSF1ct);
124  gnsstk::NavDataPtrList navOut;
125  // should refuse non-BDS data
126  TUASSERTE(bool, false, uut.addData(nonBDS, navOut));
127  TURETURN();
128 }
129 
130 
133 {
134  TUDEF("PNBBDSD1NavDataFactory", "addData("+asString(nmts)+")");
135  BDSFactoryCounter fc(testFramework);
137  gnsstk::NavDataPtrList navOut;
138  TUCATCH(uut.setTypeFilter(nmts));
139  fc.setInc(nmts);
140  // Add subframe 1, expect 1 health, 1 ISC and 1 Iono.
141  TUASSERTE(bool, true, uut.addData(ephD1NAVSF1, navOut));
142  fc.validateResults(navOut, __LINE__, 3, 0, 0, 0, 1, 1, 1);
143  // Add subframe 2, expect nothing yet.
144  TUASSERTE(bool, true, uut.addData(ephD1NAVSF2, navOut));
145  fc.validateResults(navOut, __LINE__);
146  // Add subframe 3, expect the completed ephemeris.
147  TUASSERTE(bool, true, uut.addData(ephD1NAVSF3, navOut));
148  fc.validateResults(navOut, __LINE__, 1, 0, 1);
149  // Add subframe 4 page 1, expect nothing yet.
150  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p1, navOut));
151  fc.validateResults(navOut, __LINE__);
152  // Add subframe 5 page 1, expect nothing yet.
153  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p1, navOut));
154  fc.validateResults(navOut, __LINE__);
155  // Add subframe 4 page 7, expect nothing yet.
156  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p7, navOut));
157  fc.validateResults(navOut, __LINE__);
158  // Add subframe 5 page 7, expect 19 health.
159  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p7, navOut));
160  fc.validateResults(navOut, __LINE__, 19, 0, 0, 0, 19);
161  // Add subframe 4 page 8, expect nothing yet.
162  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p8, navOut));
163  fc.validateResults(navOut, __LINE__);
164  // Add subframe 5 page 8, expect 11 health and 3 almanacs.
165  // (page 7 will have been discarded for toa mismatch)
166  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p8, navOut));
167  fc.validateResults(navOut, __LINE__, 14, 3, 0, 0, 11);
168  // Add subframe 4 page 9, expect 1 almanac.
169  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p9, navOut));
170  fc.validateResults(navOut, __LINE__, 1, 1);
171  // Add subframe 5 page 9, expect 3 time offsets.
172  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p9, navOut));
173  fc.validateResults(navOut, __LINE__, 3, 0, 0, 3);
174  // Add subframe 4 page 10, expect 1 almanac.
175  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p10, navOut));
176  fc.validateResults(navOut, __LINE__, 1, 1);
177  // Add subframe 5 page 10, expect 1 time offset.
178  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p10, navOut));
179  fc.validateResults(navOut, __LINE__, 1, 0, 0, 1);
180  // Add subframe 4 page 11, expect 1 almanac.
181  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p11, navOut));
182  fc.validateResults(navOut, __LINE__, 1, 1);
183  // Add subframe 5 page 11, expect nothing because 1) the
184  // previous subframe has an AmEpID != b11 and 2) the data is all
185  // zeroes.
186  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p11, navOut));
187  fc.validateResults(navOut, __LINE__);
188  // Add subframe 4 page 24, expect nothing because the toa has changed
189  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p24B, navOut));
190  fc.validateResults(navOut, __LINE__);
191  // Add subframe 5 page 24, expect nothing because AmEpID=b11 and AmID=b00
192  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p24B, navOut));
193  fc.validateResults(navOut, __LINE__);
194  // add a different subframe 4, page 8, expect nothing yet
195  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p8B, navOut));
196  fc.validateResults(navOut, __LINE__);
197  // add a different subframe 5, page 8, expect 1 almanac, 11 health
198  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p8B, navOut));
199  fc.validateResults(navOut, __LINE__, 12, 1, 0, 0, 11);
200  // add a different subframe 4, page 11, expect nothing because no health
201  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p11B, navOut));
202  fc.validateResults(navOut, __LINE__);
203  // add a different subframe 5, page 11, expect nothing because
204  // no health and toa mismatch.
205  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p11B, navOut));
206  fc.validateResults(navOut, __LINE__);
207  // add a different subframe 4, page 12, expect nothing because no health
208  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p12B, navOut));
209  fc.validateResults(navOut, __LINE__);
210  // add a different subframe 5, page 12, expect nothing because no health
211  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p12B, navOut));
212  fc.validateResults(navOut, __LINE__);
213  // add a different subframe 4, page 7, expect nothing because no
214  // health and toa mismatch
215  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p7B, navOut));
216  fc.validateResults(navOut, __LINE__);
217  // add a different subframe 5, page 7, expect 19 health and 3 alm
218  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p7B, navOut));
219  fc.validateResults(navOut, __LINE__, 22, 3, 0, 0, 19);
220  // add a different subframe 4, page 24, expect 1 alm
221  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p24B2, navOut));
222  fc.validateResults(navOut, __LINE__, 1, 1);
223  // add a different subframe 5, page 24, expect 13 health and 1 alm
224  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p24B2, navOut));
225  fc.validateResults(navOut, __LINE__, 14, 1, 0, 0, 13);
226  TURETURN();
227 }
228 
229 
232 {
233  TUDEF("PNBBDSD1NavDataFactory", "addData");
235  TURETURN();
236 }
237 
238 
241 {
242  TUDEF("PNBBDSD1NavDataFactory", "processAlm");
243  BDSFactoryCounter fc(testFramework);
245  gnsstk::NavMessageID nmidExp(
250  gnsstk::CommonTime toeExp = gnsstk::BDSWeekSecond(810,81920.0);
253  gnsstk::NavDataPtrList navOut;
254  gnsstk::BDSD1NavAlm *alm;
256  // First store the subframes with the extra necessary data.
257  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p8B, navOut));
258  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p8B, navOut)); // WNa
259  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p12B, navOut));
260  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p24B2, navOut)); // health
261  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p24B2, navOut));
262  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p12B, navOut)); // AmEpID
263  navOut.clear();
264  // success, almanac data only
266  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p12B, navOut));
267  for (const auto& i : navOut)
268  {
269  if ((alm = dynamic_cast<gnsstk::BDSD1NavAlm*>(i.get())) != nullptr)
270  {
271  // NavData fields
273  TUASSERTE(gnsstk::NavMessageID, nmidExp, alm->signal);
274  // OrbitData has no fields
275  // OrbitDataKepler fields
277  TUASSERTE(gnsstk::CommonTime, toeExp, alm->Toe);
278  TUASSERTE(gnsstk::CommonTime, toeExp, alm->Toc); // same value as toe
280  TUASSERTFE(0, alm->Cus);
281  TUASSERTFE(0, alm->Cuc);
282  TUASSERTFE(0, alm->Crc);
283  TUASSERTFE(0, alm->Crs);
284  TUASSERTFE(0, alm->Cic);
285  TUASSERTFE(0, alm->Cis);
286  TUASSERTFE(-0.10815548896789550781, alm->M0);
287  TUASSERTFE(0, alm->dn);
288  TUASSERTFE(0, alm->dndot);
289  TUASSERTFE(0.0005245208740234375, alm->ecc);
290  TUASSERTFE(5282.57421875, alm->Ahalf);
291  TUASSERTFE(27905590.376602172852, alm->A);
292  TUASSERTFE(0, alm->Adot);
293  TUASSERTFE(-0.92388606071472167969, alm->OMEGA0);
294  TUASSERTFE(0.3073299407958984264, alm->i0);
295  TUASSERTFE(-0.31140887737274169922, alm->w);
296  TUASSERTFE(-2.1864252630621194839e-09, alm->OMEGAdot);
297  TUASSERTFE(0, alm->idot);
298  TUASSERTFE(-0.00092411041259765625, alm->af0);
299  TUASSERTFE(0, alm->af1);
300  TUASSERTFE(0, alm->af2);
301  TUASSERTE(gnsstk::CommonTime, beginExp, alm->beginFit);
302  TUASSERTE(gnsstk::CommonTime, endExp, alm->endFit);
303  // BDSD1NavData fields
304  TUASSERTE(uint32_t, 0x712, alm->pre);
305  TUASSERTE(uint32_t, 0, alm->rev);
306  TUASSERTE(unsigned, 5, alm->fraID);
307  TUASSERTE(uint32_t, 345954, alm->sow);
308  // BDSD1NavAlm fields
309  TUASSERTE(unsigned, 12, alm->pnum);
310  TUASSERTFE(0.0073299407958984375, alm->deltai);
311  TUASSERTFE(81920, alm->toa);
312  TUASSERTE(uint16_t, 88, alm->healthBits);
313  TUASSERTE(bool, false, alm->isDefault);
314  }
315  }
316  fc.validateResults(navOut, __LINE__, 1, 1);
317  TURETURN();
318 }
319 
320 
323 {
324  TUDEF("PNBBDSD1NavDataFactory", "processEph");
325  BDSFactoryCounter fc(testFramework);
327  gnsstk::NavMessageID nmidExp(
332  gnsstk::CommonTime toeExp = gnsstk::BDSWeekSecond(810,345600.0);
333  gnsstk::CommonTime beginExp = gnsstk::BDSWeekSecond(810,345614.0);
334  gnsstk::CommonTime endExp = gnsstk::BDSWeekSecond(810,352800.0);
335  gnsstk::NavDataPtrList navOut;
337  gnsstk::BDSD1NavEph *eph;
338  gnsstk::BDSD1NavIono *iono;
339  gnsstk::BDSD1NavISC *isc;
340  // success, health, ISC and iono data only
341  TUASSERTE(bool, true, uut.processEph(1, ephD1NAVSF1, navOut));
342  for (const auto& i : navOut)
343  {
344  if ((hea = dynamic_cast<gnsstk::BDSD1NavHealth*>(i.get())) != nullptr)
345  {
347  // NavData fields
349  TUASSERTE(gnsstk::NavMessageID, nmidExp, hea->signal);
350  // NavHealthData has no fields
351  // BDSD1NavHealth
352  TUASSERTE(bool, false, hea->isAlmHealth);
353  TUASSERTE(bool, false, hea->satH1);
354  TUASSERTE(uint16_t, 255, hea->svHealth);
355  }
356  else if ((iono = dynamic_cast<gnsstk::BDSD1NavIono*>(i.get())) != nullptr)
357  {
359  // NavData fields
361  TUASSERTE(gnsstk::NavMessageID, nmidExp, iono->signal);
362  // KlobucharIonoNavData
363  TUASSERTFE( 6.519258E-09, iono->alpha[0]);
364  TUASSERTFE( 2.98023223876953125e-08, iono->alpha[1]);
365  TUASSERTFE(-2.98023223876953125e-07, iono->alpha[2]);
366  TUASSERTFE( 4.17232513427734375e-07, iono->alpha[3]);
367  TUASSERTFE( 112640, iono->beta[0]);
368  TUASSERTFE( 180224, iono->beta[1]);
369  TUASSERTFE(-524288, iono->beta[2]);
370  TUASSERTFE( 458752, iono->beta[3]);
371  // BDSD1NavIono
372  TUASSERTE(uint32_t, 0x712, iono->pre);
373  TUASSERTE(uint32_t, 0, iono->rev);
374  TUASSERTE(unsigned, 1, iono->fraID);
375  TUASSERTE(uint32_t, 345600, iono->sow);
376  }
377  else if ((isc = dynamic_cast<gnsstk::BDSD1NavISC*>(i.get())) != nullptr)
378  {
380  // NavData fields
382  TUASSERTE(gnsstk::NavMessageID, nmidExp, isc->signal);
383  // InterSigCorr
384  TUASSERTE(bool, true, std::isnan(isc->isc));
385  // BDSD1NavISC
386  TUASSERTE(uint32_t, 0x712, isc->pre);
387  TUASSERTE(uint32_t, 0, isc->rev);
388  TUASSERTE(unsigned, 1, isc->fraID);
389  TUASSERTE(uint32_t, 345600, isc->sow);
390  TUASSERTFE(8.2e-9, isc->tgd1);
391  TUASSERTFE(-1.9e-9, isc->tgd2);
392  }
393  }
394  fc.validateResults(navOut, __LINE__, 3, 0, 0, 0, 1, 1, 1);
395  // success but no additional data
396  TUASSERTE(bool, true, uut.processEph(2, ephD1NAVSF2, navOut));
397  fc.validateResults(navOut, __LINE__);
398  // success and we have an ephemeris.
399  TUASSERTE(bool, true, uut.processEph(3, ephD1NAVSF3, navOut));
400  for (const auto& i : navOut)
401  {
402  if ((eph = dynamic_cast<gnsstk::BDSD1NavEph*>(i.get())) != nullptr)
403  {
405  // NavData fields
407  TUASSERTE(gnsstk::NavMessageID, nmidExp, eph->signal);
408  // OrbitData has no fields
409  // OrbitDataKepler fields
411  TUASSERTE(gnsstk::CommonTime, toeExp, eph->Toe);
412  TUASSERTE(gnsstk::CommonTime, toeExp, eph->Toc); // same value as toe
414  TUASSERTFE( 2.102460712194442749E-05, eph->Cus);
415  TUASSERTFE(-4.5062042772769927979E-06, eph->Cuc);
416  TUASSERTFE(-4.04640625E+02, eph->Crc);
417  TUASSERTFE(-1.43203125E+02, eph->Crs);
418  TUASSERTFE( 7.91624188E-08, eph->Cic);
419  TUASSERTFE(-3.39932740E-08, eph->Cis);
420  TUASSERTFE(-8.5672685685526606125E-02, eph->M0);
421  TUASSERTFE( 1.20183578E-09, eph->dn);
422  TUASSERTFE(0, eph->dndot);
423  TUASSERTFE( 1.1284291860647499561E-02, eph->ecc);
424  TUASSERTFE(sqrt(4.2170134522822760046E+07), eph->Ahalf);
425  TUASSERTFE( 4.2170134522822760046E+07, eph->A);
426  TUASSERTFE(0, eph->Adot);
427  TUASSERTFE(-1.9160860634641034839E+00, eph->OMEGA0);
428  TUASSERTFE(9.450732988963341796E-01, eph->i0);
429  TUASSERTFE(-2.1772769963262814663E+00, eph->w);
430  TUASSERTFE(-1.78078846E-09, eph->OMEGAdot);
431  TUASSERTFE( 4.37518224E-10, eph->idot);
432  TUASSERTFE( 6.2543887179344892502E-04, eph->af0);
433  TUASSERTFE( 4.82804907E-11, eph->af1);
434  TUASSERTFE( 0.00000000E+00, eph->af2);
435  TUASSERTE(gnsstk::CommonTime, beginExp, eph->beginFit);
436  TUASSERTE(gnsstk::CommonTime, endExp, eph->endFit);
437  // BDSD1NavData fields
438  TUASSERTE(uint32_t, 0x712, eph->pre);
439  TUASSERTE(uint32_t, 0, eph->rev);
440  TUASSERTE(unsigned, 1, eph->fraID);
441  TUASSERTE(uint32_t, 345600, eph->sow);
442  // BDSD1NavEph fields
443  TUASSERTE(uint32_t, 0x712, eph->pre2);
444  TUASSERTE(uint32_t, 0x712, eph->pre3);
445  TUASSERTE(uint32_t, 0, eph->rev2);
446  TUASSERTE(uint32_t, 0, eph->rev3);
447  TUASSERTE(uint32_t, 345606, eph->sow2);
448  TUASSERTE(uint32_t, 345612, eph->sow3);
449  TUASSERTE(bool, false, eph->satH1);
450  TUASSERTE(unsigned, 0, eph->aodc);
451  TUASSERTE(unsigned, 1, eph->aode);
452  TUASSERTE(unsigned, 0, eph->uraIndex);
455  TUASSERTFE(8.2e-9, eph->tgd1);
456  TUASSERTFE(-1.9e-9, eph->tgd2);
457  }
458  }
459  fc.validateResults(navOut, __LINE__, 1, 0, 1);
460  TURETURN();
461 }
462 
463 
466 {
467  TUDEF("PNBBDSD1NavDataFactory", "processSF5Pg7");
468  BDSFactoryCounter fc(testFramework);
470  gnsstk::NavMessageID nmidExp(
475  gnsstk::NavDataPtrList navOut;
477  uint16_t expHea;
478  // success, health data only
479  TUASSERTE(bool, true, uut.processSF5Pg7(almD1NAVSF5p7, navOut));
480  for (const auto& i : navOut)
481  {
482  if ((hea = dynamic_cast<gnsstk::BDSD1NavHealth*>(i.get())) != nullptr)
483  {
484  // NavData fields
486  TUASSERTE(gnsstk::NavMessageID, nmidExp, hea->signal);
487  // NavHealthData has no fields
488  // BDSD1NavHealth
489  TUASSERTE(bool, true, hea->isAlmHealth);
490  TUASSERTE(bool, true, hea->satH1);
491  if ((nmidExp.sat.id == 7) || (nmidExp.sat.id == 17))
492  expHea = 256;
493  else if ((nmidExp.sat.id == 15) || (nmidExp.sat.id == 18))
494  expHea = 510;
495  else if (nmidExp.sat.id >= 19)
496  expHea = 88;
497  else
498  expHea = 0;
499  TUASSERTE(uint16_t, expHea, hea->svHealth);
500  // While it's not strictly necessary that the results come
501  // in PRN order, they do currently and this statement
502  // addresses that fact.
503  nmidExp.sat.id++;
504  }
505  }
506  fc.validateResults(navOut, __LINE__, 19, 0, 0, 0, 19);
507  TURETURN();
508 }
509 
510 
513 {
514  TUDEF("PNBBDSD1NavDataFactory", "processSF5Pg8");
515  BDSFactoryCounter fc(testFramework);
517  gnsstk::NavMessageID nmidExp(
522  gnsstk::CommonTime toeExp = gnsstk::BDSWeekSecond(810,81920.0);
525  gnsstk::NavDataPtrList navOut;
526  gnsstk::BDSD1NavAlm *alm;
528  uint16_t expHea = 88;
529  // First store the subframes with almanacs that shouldn't be
530  // immediately returned.
531  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p1, navOut));
532  fc.validateResults(navOut, __LINE__);
533  TUASSERTE(bool, true, uut.addData(almD1NAVSF5p1, navOut));
534  fc.validateResults(navOut, __LINE__);
535  // should work the same whether SF4 pg8 was processed or not.
536  TUASSERTE(bool, true, uut.processSF5Pg8(almD1NAVSF5p8, navOut));
537  for (const auto& i : navOut)
538  {
539  if ((alm = dynamic_cast<gnsstk::BDSD1NavAlm*>(i.get())) != nullptr)
540  {
543  // NavData fields
545  gnsstk::SatID tmpSat = nmidExp.sat;
546  nmidExp.sat.id = 25;
547  TUASSERTE(gnsstk::NavMessageID, nmidExp, alm->signal);
548  nmidExp.sat = tmpSat;
549  // OrbitData has no fields
550  // OrbitDataKepler fields
552  TUASSERTE(gnsstk::CommonTime, toeExp, alm->Toe);
553  TUASSERTE(gnsstk::CommonTime, toeExp, alm->Toc); // same value as toe
555  TUASSERTFE(0, alm->Cus);
556  TUASSERTFE(0, alm->Cuc);
557  TUASSERTFE(0, alm->Crc);
558  TUASSERTFE(0, alm->Crs);
559  TUASSERTFE(0, alm->Cic);
560  TUASSERTFE(0, alm->Cis);
561  TUASSERTFE(-0.60474646091461181641, alm->M0);
562  TUASSERTFE(0, alm->dn);
563  TUASSERTFE(0, alm->dndot);
564  TUASSERTFE(0.0003604888916015625, alm->ecc);
565  TUASSERTFE(5282.56201171875, alm->Ahalf);
566  TUASSERTFE(27905461.407654047012, alm->A);
567  TUASSERTFE(0, alm->Adot);
568  TUASSERTFE(-0.25995099544525146484, alm->OMEGA0);
569  TUASSERTFE(0.3025119781494140514, alm->i0);
570  TUASSERTFE(0.017611861228942871094, alm->w);
571  TUASSERTFE(-2.25554686039686203e-09, alm->OMEGAdot);
572  TUASSERTFE(0, alm->idot);
573  TUASSERTFE(-0.0008869171142578125, alm->af0);
574  TUASSERTFE(7.2759576141834259033e-12, alm->af1);
575  TUASSERTFE(0, alm->af2);
576  TUASSERTE(gnsstk::CommonTime, beginExp, alm->beginFit);
577  TUASSERTE(gnsstk::CommonTime, endExp, alm->endFit);
578  // BDSD1NavData fields
579  TUASSERTE(uint32_t, 0x712, alm->pre);
580  TUASSERTE(uint32_t, 0, alm->rev);
581  TUASSERTE(unsigned, 5, alm->fraID);
582  TUASSERTE(uint32_t, 345624, alm->sow);
583  // BDSD1NavAlm fields
584  TUASSERTE(unsigned, 1, alm->pnum);
585  TUASSERTFE(0.0025119781494140625, alm->deltai);
586  TUASSERTFE(81920, alm->toa);
587  TUASSERTE(uint16_t, 88, alm->healthBits);
588  TUASSERTE(bool, false, alm->isDefault);
589  }
590  else if ((hea = dynamic_cast<gnsstk::BDSD1NavHealth*>(i.get())) != nullptr)
591  {
593  // NavData fields
595  TUASSERTE(gnsstk::NavMessageID, nmidExp, hea->signal);
596  // NavHealthData has no fields
597  // BDSD1NavHealth
598  TUASSERTE(bool, true, hea->isAlmHealth);
599  TUASSERTE(bool, true, hea->satH1);
600  TUASSERTE(uint16_t, expHea, hea->svHealth);
601  // While it's not strictly necessary that the results come
602  // in PRN order, they do currently and this statement
603  // addresses that fact.
604  nmidExp.sat.id++;
605  }
606  }
607  // Note that sf4 pg1 is going to be the almanac for PRN 1 which
608  // we won't have health for when processSF5Pg8 is called so it
609  // won't show up. SF5 pg1 OTOH is PRN 25 whose health is
610  // present in pg 8.
611  fc.validateResults(navOut, __LINE__, 12, 1, 0, 0, 11);
612  TURETURN();
613 }
614 
615 
618 {
619  TUDEF("PNBBDSD1NavDataFactory", "processSF5Pg9");
620  BDSFactoryCounter fc(testFramework);
622  gnsstk::NavMessageID nmidExp(
627  gnsstk::CommonTime refTimeExp = gnsstk::BDSWeekSecond(810,0);
628  gnsstk::CommonTime effTimeExp;
629  gnsstk::NavDataPtrList navOut, navOut2, navOut3, navOut4;
631  uint16_t expHea;
632  // success, time offset data only
633  TUASSERTE(bool, true, uut.processSF5Pg9(almD1NAVSF5p9, navOut));
634  // Time systems are processed in the order they appear in the
635  // nav message. Doesn't need to be enforced, but doing so
636  // simplifies the validation of the output.
638  for (const auto& i : navOut)
639  {
640  if ((to = dynamic_cast<gnsstk::BDSD1NavTimeOffset*>(i.get())) != nullptr)
641  {
642  // NavData fields
644  TUASSERTE(gnsstk::NavMessageID, nmidExp, to->signal);
645  // TimeOffsetData has no fields
646  // StdNavTimeOffset
648  TUASSERTE(gnsstk::TimeSystem, expTS, to->tgt);
649  TUASSERTFE(0.0, to->a0);
650  TUASSERTFE(0.0, to->a1);
651  TUASSERTFE(0.0, to->a2);
652  TUASSERTFE(0.0, to->deltatLS);
653  TUASSERTE(gnsstk::CommonTime, refTimeExp, to->refTime);
654  TUASSERTE(gnsstk::CommonTime, effTimeExp, to->effTime);
655  TUASSERTFE(0.0, to->tot);
656  TUASSERTE(unsigned, 0, to->wnot);
657  TUASSERTE(unsigned, 0, to->wnLSF);
658  TUASSERTE(unsigned, 0, to->dn);
659  TUASSERTFE(0.0, to->deltatLSF);
660  // BDSD1NavTimeOffset has no fields, but we check validate here
661  TUCSM("validate");
662  TUASSERTE(bool, false, to->validate());
663  if (expTS == gnsstk::TimeSystem::GPS)
664  expTS = gnsstk::TimeSystem::GAL;
665  else if (expTS == gnsstk::TimeSystem::GAL)
666  expTS = gnsstk::TimeSystem::GLO;
667  TUCSM("processSF5Pg9");
668  }
669  }
670  fc.validateResults(navOut, __LINE__, 3, 0, 0, 3);
671  // Test with double-zero filtering enabled
673  ctrl.bdsTimeZZfilt = true;
675  uut2.setControl(ctrl);
676  TUASSERTE(bool, true, uut2.processSF5Pg9(almD1NAVSF5p9, navOut2));
677  // all the time offset data has double-zeroes
678  TUASSERT(navOut2.empty());
679  // Test double-zero filter with A0 != 0, A1 = 0
681  uut3.setControl(ctrl);
682  TUASSERTE(bool, true, uut3.processSF5Pg9(almD1NAVSF5p9A0, navOut3));
683  fc.validateResults(navOut3, __LINE__, 3, 0, 0, 3);
684  // Test double-zero filter with A0 = 0, A1 != 0
686  uut4.setControl(ctrl);
687  TUASSERTE(bool, true, uut4.processSF5Pg9(almD1NAVSF5p9A0, navOut4));
688  fc.validateResults(navOut4, __LINE__, 3, 0, 0, 3);
689  TURETURN();
690 }
691 
692 
695 {
696  TUDEF("PNBBDSD1NavDataFactory", "processSF5Pg10");
697  BDSFactoryCounter fc(testFramework);
699  gnsstk::NavMessageID nmidExp(
704  gnsstk::CommonTime refTimeExp = gnsstk::BDSWeekSecond(810,0);
705  // Seems strange that this would be in the future rather than the past.
706  gnsstk::CommonTime effTimeExp = gnsstk::BDSWeekSecond(829,518400);
707  gnsstk::NavDataPtrList navOut, navOut2, navOut3, navOut4;
709  uint16_t expHea;
710  // success, time offset data only
711  TUASSERTE(bool, true, uut.processSF5Pg10(almD1NAVSF5p10, navOut));
712  for (const auto& i : navOut)
713  {
714  if ((to = dynamic_cast<gnsstk::BDSD1NavTimeOffset*>(i.get())) != nullptr)
715  {
716  // NavData fields
718  TUASSERTE(gnsstk::NavMessageID, nmidExp, to->signal);
719  // TimeOffsetData has no fields
720  // StdNavTimeOffset
723  TUASSERTFE(-6.519258e-09, to->a0);
724  TUASSERTFE(0.0, to->a1);
725  TUASSERTFE(0.0, to->a2);
726  TUASSERTFE(4.0, to->deltatLS);
727  TUASSERTE(gnsstk::CommonTime, refTimeExp, to->refTime);
728  TUASSERTE(gnsstk::CommonTime, effTimeExp, to->effTime);
729  TUASSERTFE(0.0, to->tot);
730  TUASSERTE(unsigned, 0, to->wnot);
731  TUASSERTE(unsigned, 829, to->wnLSF);
732  TUASSERTE(unsigned, 6, to->dn);
733  TUASSERTFE(4.0, to->deltatLSF);
734  // BDSD1NavTimeOffset has no fields, but we check validate here
735  TUCSM("validate");
736  TUASSERTE(bool, true, to->validate());
737  TUCSM("processSF5Pg10");
738  }
739  }
740  fc.validateResults(navOut, __LINE__, 1, 0, 0, 1);
741  // Test double-zero filter with A0 != 0, A1 = 0
743  ctrl.bdsTimeZZfilt = true;
745  uut2.setControl(ctrl);
746  TUASSERTE(bool, true, uut2.processSF5Pg10(almD1NAVSF5p10, navOut2));
747  fc.validateResults(navOut2, __LINE__, 1, 0, 0, 1);
748  // Test with double-zero filtering enabled
750  uut3.setControl(ctrl);
751  TUASSERTE(bool, true, uut3.processSF5Pg10(almD1NAVSF5p10ZZ, navOut3));
752  fc.validateResults(navOut3, __LINE__, 0, 0, 0, 0);
753  // Test double-zero filter with A0 != 0, A1 = 0
755  uut4.setControl(ctrl);
756  TUASSERTE(bool, true, uut4.processSF5Pg10(almD1NAVSF5p10, navOut4));
757  fc.validateResults(navOut4, __LINE__, 1, 0, 0, 1);
758  TURETURN();
759 }
760 
761 
764 {
765  TUDEF("PNBBDSD1NavDataFactory", "processSF5Pg24");
766  BDSFactoryCounter fc(testFramework);
768  gnsstk::NavMessageID nmidExp(
773  gnsstk::NavDataPtrList navOut;
775  uint16_t expHea = 88;
776  // No need to check amID=0 as that's already tested in filterTest.
777  // Test with AmID=b01
778  TUASSERTE(bool, true, uut.addData(almD1NAVSF4p24B2, navOut));
779  // success, health data only
780  TUASSERTE(bool, true, uut.processSF5Pg24(almD1NAVSF5p24B2, navOut));
781  for (const auto& i : navOut)
782  {
783  if ((hea = dynamic_cast<gnsstk::BDSD1NavHealth*>(i.get())) != nullptr)
784  {
785  // NavData fields
787  TUASSERTE(gnsstk::NavMessageID, nmidExp, hea->signal);
788  // NavHealthData has no fields
789  // BDSD1NavHealth
790  TUASSERTE(bool, true, hea->isAlmHealth);
791  TUASSERTE(bool, true, hea->satH1);
792  TUASSERTE(uint16_t, expHea, hea->svHealth);
793  // While it's not strictly necessary that the results come
794  // in PRN order, they do currently and this statement
795  // addresses that fact.
796  nmidExp.sat.id++;
797  }
798  }
800  fc.validateResults(navOut, __LINE__, 13, 0, 0, 0, 13);
801  TURETURN();
802 }
803 
804 
807 {
808  TUDEF("PNBBDSD1NavDataFactory", "isAlmDefault");
810  TUASSERTE(bool, true, uut.isAlmDefault(almD1Default1));
811  TUASSERTE(bool, false, uut.isAlmDefault(almD1Default2));
812  TUASSERTE(bool, false, uut.isAlmDefault(almD1Default3));
813  TURETURN();
814 }
815 
816 
819 {
820  return filterTest(gnsstk::allNavMessageTypes) +
821  filterTest({gnsstk::NavMessageType::Almanac}) +
822  filterTest({gnsstk::NavMessageType::Ephemeris}) +
823  filterTest({gnsstk::NavMessageType::Health}) +
824  filterTest({gnsstk::NavMessageType::TimeOffset}) +
825  filterTest({gnsstk::NavMessageType::Iono}) +
826  filterTest({gnsstk::NavMessageType::ISC}) +
829 }
830 
831 
832 int main()
833 {
834  PNBBDSD1NavDataFactory_T testClass;
835  unsigned errorTotal = 0;
836 
837  errorTotal += testClass.foreignTest();
838  errorTotal += testClass.filterTests();
839  errorTotal += testClass.addDataValidityTest();
840  errorTotal += testClass.processAlmTest();
841  errorTotal += testClass.processEphTest();
842  errorTotal += testClass.processSF5Pg7Test();
843  errorTotal += testClass.processSF5Pg8Test();
844  errorTotal += testClass.processSF5Pg9Test();
845  errorTotal += testClass.processSF5Pg10Test();
846  errorTotal += testClass.processSF5Pg24Test();
847  errorTotal += testClass.isAlmDefaultTest();
848 
849  std::cout << "Total Failures for " << __FILE__ << ": " << errorTotal
850  << std::endl;
851 
852  return errorTotal;
853 }
gnsstk::BDSD1NavData::rev
uint32_t rev
The rev field from word 1 of the subframe.
Definition: BDSD1NavData.hpp:71
PNBBDSD1NavDataFactory_T::processEphTest
unsigned processEphTest()
Definition: PNBBDSD1NavDataFactory_T.cpp:322
gnsstk::NavMessageTypeSet
std::set< NavMessageType > NavMessageTypeSet
Set of message types, used by NavLibrary and NavDataFactory.
Definition: NavMessageType.hpp:76
gnsstk::NavMessageType::ISC
@ ISC
Inter-signal corrections.
gnsstk::PNBNavDataFactory::setControl
virtual void setControl(const FactoryControl &ctrl)
Definition: PNBNavDataFactory.hpp:113
TUCSM
#define TUCSM(METHOD)
Definition: TestUtil.hpp:59
gnsstk::OrbitDataKepler::idot
double idot
Rate of inclination angle (rad/sec)
Definition: OrbitDataKepler.hpp:193
PNBBDSD1NavDataFactory_T
Definition: PNBBDSD1NavDataFactory_T.cpp:80
gnsstk::NavMessageID
Class used to identify/categorize navigation message data.
Definition: NavMessageID.hpp:52
gnsstk::StdNavTimeOffset::deltatLSF
double deltatLSF
Current or future leap second count (UTC only).
Definition: StdNavTimeOffset.hpp:135
gnsstk::SatID::id
int id
Satellite identifier, e.g. PRN.
Definition: SatID.hpp:154
gnsstk::PackedNavBitsPtr
std::shared_ptr< PackedNavBits > PackedNavBitsPtr
Managed pointer for passing PackedNavBits around.
Definition: PackedNavBits.hpp:66
almD1NAVSF4p24B
gnsstk::PackedNavBitsPtr almD1NAVSF4p24B
Definition: D1NavTestDataDecl.hpp:54
gnsstk::BDSD1NavEph::satH1
bool satH1
Autonomous satellite health flag.
Definition: BDSD1NavEph.hpp:103
gnsstk::BDSD1NavData::fraID
uint8_t fraID
The subframe ID (FraID) from word 1 of the subframe.
Definition: BDSD1NavData.hpp:72
PNBBDSD1NavDataFactory_T::PNBBDSD1NavDataFactory_T
PNBBDSD1NavDataFactory_T()
Definition: PNBBDSD1NavDataFactory_T.cpp:106
almD1NAVSF5p24B
gnsstk::PackedNavBitsPtr almD1NAVSF5p24B
Definition: D1NavTestDataDecl.hpp:54
gnsstk::CarrierBand::G1
@ G1
GLONASS G1.
TUCATCH
#define TUCATCH(STATEMENT)
Definition: TestUtil.hpp:193
gnsstk::BDSD1NavAlm::isDefault
bool isDefault
True if the source page was all 0s for orbit.
Definition: BDSD1NavAlm.hpp:82
gnsstk::OrbitDataKepler::Cis
double Cis
Sine inclination (rad)
Definition: OrbitDataKepler.hpp:180
gnsstk::OrbitDataKepler::A
double A
Semi-major axis (m)
Definition: OrbitDataKepler.hpp:186
gnsstk::BDSD1NavEph::xmit3
CommonTime xmit3
Transmit time for subframe 3.
Definition: BDSD1NavEph.hpp:112
gnsstk::BDSD1NavIono
Definition: BDSD1NavIono.hpp:51
gnsstk::PNBBDSD1NavDataFactory::processSF5Pg8
bool processSF5Pg8(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBBDSD1NavDataFactory.cpp:573
gnsstk::PNBNavDataFactory::setTypeFilter
virtual void setTypeFilter(const NavMessageTypeSet &nmts)
Definition: PNBNavDataFactory.cpp:54
gnsstk::OrbitDataKepler::af2
double af2
SV clock drift rate (sec/sec**2)
Definition: OrbitDataKepler.hpp:197
gnsstk::NavType::BeiDou_D1
@ BeiDou_D1
almD1NAVSF5p8
gnsstk::PackedNavBitsPtr almD1NAVSF5p8
Definition: D1NavTestDataDecl.hpp:46
almD1NAVSF5p12B
gnsstk::PackedNavBitsPtr almD1NAVSF5p12B
Definition: D1NavTestDataDecl.hpp:57
gnsstk::BDSD1NavEph
Definition: BDSD1NavEph.hpp:52
gnsstk::OrbitDataKepler::ecc
double ecc
Eccentricity.
Definition: OrbitDataKepler.hpp:185
gnsstk::BDSD1NavISC::tgd1
double tgd1
Group delay differential on B1I.
Definition: BDSD1NavISC.hpp:99
gnsstk::StdNavTimeOffset::src
TimeSystem src
Source time system.
Definition: StdNavTimeOffset.hpp:120
almD1NAVSF5p10
gnsstk::PackedNavBitsPtr almD1NAVSF5p10
Definition: D1NavTestDataDecl.hpp:50
FactoryCounter::setInc
void setInc(const gnsstk::NavMessageTypeSet &nmts)
Definition: FactoryCounter.hpp:96
gnsstk::BDSD1NavEph::rev3
uint32_t rev3
The rev field from word 1 of subframe 3.
Definition: BDSD1NavEph.hpp:99
ephD1NAVSF1
gnsstk::PackedNavBitsPtr ephD1NAVSF1
Definition: D1NavTestDataDecl.hpp:43
TUASSERTE
#define TUASSERTE(TYPE, EXP, GOT)
Definition: TestUtil.hpp:81
almD1NAVSF5p9ct
gnsstk::CommonTime almD1NAVSF5p9ct
Definition: D1NavTestDataDecl.hpp:65
almD1NAVSF4p1
gnsstk::PackedNavBitsPtr almD1NAVSF4p1
Definition: D1NavTestDataDecl.hpp:44
gnsstk::NavMessageID::messageType
NavMessageType messageType
Definition: NavMessageID.hpp:97
gnsstk::NavSatelliteID
Definition: NavSatelliteID.hpp:57
almD1NAVSF4p10
gnsstk::PackedNavBitsPtr almD1NAVSF4p10
Definition: D1NavTestDataDecl.hpp:50
gnsstk::BDSD1NavEph::uraIndex
uint8_t uraIndex
4-bit URA index from subframe 1.
Definition: BDSD1NavEph.hpp:110
BDSD1NavIono.hpp
gnsstk::allNavMessageTypes
const GNSSTK_EXPORT NavMessageTypeSet allNavMessageTypes
Definition: NavStatic.cpp:64
gnsstk::OrbitDataKepler::OMEGAdot
double OMEGAdot
Rate of Rt ascension (rad/sec)
Definition: OrbitDataKepler.hpp:192
gnsstk::StdNavTimeOffset::tgt
TimeSystem tgt
Target time system.
Definition: StdNavTimeOffset.hpp:121
almD1NAVSF4p11B
gnsstk::PackedNavBitsPtr almD1NAVSF4p11B
Definition: D1NavTestDataDecl.hpp:56
gnsstk::SatID
Definition: SatID.hpp:89
gnsstk::NavMessageType::Health
@ Health
SV health status information message.
gnsstk::BDSD1NavAlm::deltai
double deltai
Inclination in rad relative to 0.3*pi rad.
Definition: BDSD1NavAlm.hpp:79
gnsstk::NavFit::endFit
CommonTime endFit
Time at end of fit interval.
Definition: NavFit.hpp:55
gnsstk::NavDataPtrList
std::list< NavDataPtr > NavDataPtrList
Definition: NavData.hpp:75
PNBBDSD1NavDataFactory_T::processAlmTest
unsigned processAlmTest()
Definition: PNBBDSD1NavDataFactory_T.cpp:240
gnsstk::StringUtils::asString
std::string asString(IonexStoreStrategy e)
Convert a IonexStoreStrategy to a whitespace-free string name.
Definition: IonexStoreStrategy.cpp:46
gnsstk::BDSD1NavISC::fraID
uint8_t fraID
The subframe ID (FraID) from word 1 of the subframe.
Definition: BDSD1NavISC.hpp:97
gnsstk::OrbitDataKepler::Cuc
double Cuc
Cosine latitude (rad)
Definition: OrbitDataKepler.hpp:175
almD1NAVSF4p9
gnsstk::PackedNavBitsPtr almD1NAVSF4p9
Definition: D1NavTestDataDecl.hpp:47
almD1NAVSF5p7
gnsstk::PackedNavBitsPtr almD1NAVSF5p7
Definition: D1NavTestDataDecl.hpp:45
gnsstk::BDSD1NavAlm
Class containing data elements unique to BeiDou D1 almanac pages.
Definition: BDSD1NavAlm.hpp:50
gnsstk::CommonTime::setTimeSystem
CommonTime & setTimeSystem(TimeSystem timeSystem)
Definition: CommonTime.hpp:195
PNBBDSD1NavDataFactory_T::isAlmDefaultTest
unsigned isAlmDefaultTest()
Definition: PNBBDSD1NavDataFactory_T.cpp:806
gnsstk::BDSD1NavEph::aodc
uint8_t aodc
Age of data - clock.
Definition: BDSD1NavEph.hpp:104
gnsstk::StdNavTimeOffset::deltatLS
double deltatLS
Current or past leap second count (UTC only).
Definition: StdNavTimeOffset.hpp:125
gnsstk::NavType::GloCivilF
@ GloCivilF
gnsstk::OrbitDataKepler::w
double w
Argument of perigee (rad)
Definition: OrbitDataKepler.hpp:191
FactoryCounter::validateResults
void validateResults(gnsstk::NavDataPtrList &navOut, unsigned lineNo, size_t totalExp=0, unsigned almExp=0, unsigned ephExp=0, unsigned toExp=0, unsigned heaExp=0, unsigned ionoExp=0, unsigned iscExp=0, unsigned otherExp=0)
Definition: FactoryCounter.hpp:144
ephD1NAVSF1ct
gnsstk::CommonTime ephD1NAVSF1ct
Definition: D1NavTestDataDecl.hpp:61
gnsstk::StdNavTimeOffset::wnot
unsigned wnot
Time data reference week number (storage only).
Definition: StdNavTimeOffset.hpp:129
gnsstk::BDSD1NavHealth::isAlmHealth
bool isAlmHealth
If true, svHealth is representative, otherwise satH1 is.
Definition: BDSD1NavHealth.hpp:99
gnsstk::OrbitDataKepler::Toe
CommonTime Toe
Orbit epoch.
Definition: OrbitDataKepler.hpp:171
gnsstk::OrbitDataKepler::Crs
double Crs
Sine radius (m)
Definition: OrbitDataKepler.hpp:178
gnsstk::SVHealth
SVHealth
Identify different types of SV health states.
Definition: SVHealth.hpp:52
PNBBDSD1NavDataFactory_T::processSF5Pg9Test
unsigned processSF5Pg9Test()
Definition: PNBBDSD1NavDataFactory_T.cpp:617
gnsstk::NavData::signal
NavMessageID signal
Source signal identification for this navigation message data.
Definition: NavData.hpp:175
almD1NAVSF5p10ct
gnsstk::CommonTime almD1NAVSF5p10ct
Definition: D1NavTestDataDecl.hpp:66
almD1NAVSF5p9A0
gnsstk::PackedNavBitsPtr almD1NAVSF5p9A0
Definition: D1NavTestDataDecl.hpp:49
gnsstk::StdNavTimeOffset::wnLSF
unsigned wnLSF
Leap second reference week number (UTC only).
Definition: StdNavTimeOffset.hpp:133
gnsstk
For Sinex::InputHistory.
Definition: BasicFramework.cpp:50
gnsstk::PNBBDSD1NavDataFactory::processSF5Pg7
bool processSF5Pg7(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBBDSD1NavDataFactory.cpp:534
gnsstk::StdNavTimeOffset::a1
double a1
Drift coefficient of source time scale.
Definition: StdNavTimeOffset.hpp:123
gnsstk::InterSigCorr::isc
double isc
Definition: InterSigCorr.hpp:171
PNBBDSD1NavDataFactory_T::foreignTest
unsigned foreignTest()
Test that BDS doesn't process GLONASS data.
Definition: PNBBDSD1NavDataFactory_T.cpp:113
gnsstk::PNBBDSD1NavDataFactory::processSF5Pg10
bool processSF5Pg10(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBBDSD1NavDataFactory.cpp:706
gnsstk::TrackingCode::Standard
@ Standard
Legacy Glonass civil signal.
gnsstk::PNBBDSD1NavDataFactory::addData
bool addData(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut, double cadence=-1) override
Definition: PNBBDSD1NavDataFactory.cpp:64
almD1NAVSF4p12B
gnsstk::PackedNavBitsPtr almD1NAVSF4p12B
Definition: D1NavTestDataDecl.hpp:57
gnsstk::OrbitDataKepler::xmitTime
CommonTime xmitTime
Time of transmission of the start of the data.
Definition: OrbitDataKepler.hpp:170
gnsstk::NavData::timeStamp
CommonTime timeStamp
Definition: NavData.hpp:173
gnsstk::OrbitDataKepler::Adot
double Adot
Rate of semi-major axis (m/sec)
Definition: OrbitDataKepler.hpp:188
gnsstk::StdNavTimeOffset::dn
unsigned dn
Leap second reference day number (UTC only).
Definition: StdNavTimeOffset.hpp:134
gnsstk::OrbitDataKepler::M0
double M0
Mean anomaly (rad)
Definition: OrbitDataKepler.hpp:182
gnsstk::ObservationType::NavMsg
@ NavMsg
Navigation Message data.
gnsstk::CommonTime::END_OF_TIME
static const GNSSTK_EXPORT CommonTime END_OF_TIME
latest representable CommonTime
Definition: CommonTime.hpp:104
almD1NAVSF5p24B2
gnsstk::PackedNavBitsPtr almD1NAVSF5p24B2
Definition: D1NavTestDataDecl.hpp:59
D1NavTestDataDecl.hpp
TUASSERT
#define TUASSERT(EXPR)
Definition: TestUtil.hpp:63
FactoryCounter
Definition: FactoryCounter.hpp:75
almD1NAVSF4p24B2
gnsstk::PackedNavBitsPtr almD1NAVSF4p24B2
Definition: D1NavTestDataDecl.hpp:59
gnsstk::BDSD1NavISC::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD1NavISC.hpp:98
TestUtil.hpp
gnsstk::SVHealth::Healthy
@ Healthy
Satellite is in a healthy and useable state.
gnsstk::OrbitDataKepler::dndot
double dndot
Rate of correction to mean motion (rad/sec/sec)
Definition: OrbitDataKepler.hpp:184
gnsstk::CarrierBand::B1
@ B1
BeiDou B1.
PNBBDSD1NavDataFactory_T::processSF5Pg24Test
unsigned processSF5Pg24Test()
Definition: PNBBDSD1NavDataFactory_T.cpp:763
gnsstk::PNBBDSD1NavDataFactory::processSF5Pg24
bool processSF5Pg24(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBBDSD1NavDataFactory.cpp:752
D1NavTestDataDef.hpp
gnsstk::OrbitDataKepler::Cus
double Cus
Sine latitude (rad)
Definition: OrbitDataKepler.hpp:176
gnsstk::StdNavTimeOffset::a2
double a2
Drift rate coefficient of source time scale.
Definition: StdNavTimeOffset.hpp:124
TURETURN
#define TURETURN()
Definition: TestUtil.hpp:232
ephD1NAVSF3
gnsstk::PackedNavBitsPtr ephD1NAVSF3
Definition: D1NavTestDataDecl.hpp:43
gnsstk::PNBBDSD1NavDataFactory::processSF5Pg9
bool processSF5Pg9(const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBBDSD1NavDataFactory.cpp:632
gnsstk::TimeSystem::GAL
@ GAL
Galileo system time.
gnsstk::ObsID
Definition: ObsID.hpp:82
gnsstk::NavMessageType::Iono
@ Iono
Ionospheric correction data.
gnsstk::OrbitDataKepler::Ahalf
double Ahalf
Square Root of semi-major axis (m**.5)
Definition: OrbitDataKepler.hpp:187
gnsstk::NavSatelliteID::sat
SatID sat
ID of satellite to which the nav data applies.
Definition: NavSatelliteID.hpp:169
almD1Default3
gnsstk::PackedNavBitsPtr almD1Default3
Definition: D1NavTestDataDecl.hpp:60
gnsstk::BDSD1NavAlm::pnum
uint8_t pnum
Almanac page number.
Definition: BDSD1NavAlm.hpp:78
gnsstk::PNBBDSD1NavDataFactory
Definition: PNBBDSD1NavDataFactory.hpp:81
gnsstk::CommonTime
Definition: CommonTime.hpp:84
gnsstk::BDSD1NavEph::sow2
uint32_t sow2
Seconds of week from word 1-2 of subframe 2.
Definition: BDSD1NavEph.hpp:100
BDSD1NavTimeOffset.hpp
gnsstk::BDSD1NavTimeOffset::validate
bool validate() const override
Definition: BDSD1NavTimeOffset.cpp:59
gnsstk::OrbitDataKepler::Toc
CommonTime Toc
Clock epoch.
Definition: OrbitDataKepler.hpp:172
PNBBDSD1NavDataFactory_T::processSF5Pg10Test
unsigned processSF5Pg10Test()
Definition: PNBBDSD1NavDataFactory_T.cpp:694
almD1NAVSF4p8
gnsstk::PackedNavBitsPtr almD1NAVSF4p8
Definition: D1NavTestDataDecl.hpp:46
gnsstk::FactoryControl
Definition: FactoryControl.hpp:52
almD1Default2
gnsstk::PackedNavBitsPtr almD1Default2
Definition: D1NavTestDataDecl.hpp:60
almD1NAVSF5p7ct
gnsstk::CommonTime almD1NAVSF5p7ct
Definition: D1NavTestDataDecl.hpp:63
gnsstk::TrackingCode::B1I
@ B1I
BeiDou B1 I code.
gnsstk::TimeSystem
TimeSystem
Definition of various time systems.
Definition: TimeSystem.hpp:51
PNBBDSD1NavDataFactory_T::filterTests
unsigned filterTests()
addData tests for a variety of filter states
Definition: PNBBDSD1NavDataFactory_T.cpp:818
gnsstk::NavFit::beginFit
CommonTime beginFit
Time at beginning of fit interval.
Definition: NavFit.hpp:54
PNBBDSD1NavDataFactory_T::addDataValidityTest
unsigned addDataValidityTest()
Test validity checking.
Definition: PNBBDSD1NavDataFactory_T.cpp:231
CivilTime.hpp
gnsstk::BDSD1NavIono::fraID
uint8_t fraID
The subframe ID (FraID) from word 1 of the subframe.
Definition: BDSD1NavIono.hpp:68
asString
string asString(const gnsstk::NavMessageTypeSet &nmts)
Definition: PNBBDSD1NavDataFactory_T.cpp:68
ephD1NAVSF2
gnsstk::PackedNavBitsPtr ephD1NAVSF2
Definition: D1NavTestDataDecl.hpp:43
gnsstk::BDSD1NavEph::tgd1
double tgd1
Group delay differential on B1I.
Definition: BDSD1NavEph.hpp:113
gnsstk::KlobucharIonoNavData::beta
double beta[4]
beta terms of Klobuchar model, using semi-circles.
Definition: KlobucharIonoNavData.hpp:85
TUDEF
#define TUDEF(CLASS, METHOD)
Definition: TestUtil.hpp:56
almD1NAVSF5p11B
gnsstk::PackedNavBitsPtr almD1NAVSF5p11B
Definition: D1NavTestDataDecl.hpp:56
gnsstk::BDSD1NavEph::rev2
uint32_t rev2
The rev field from word 1 of subframe 2.
Definition: BDSD1NavEph.hpp:98
gnsstk::TimeSystem::GLO
@ GLO
GLONASS system time (aka UTC(SU))
PNBBDSD1NavDataFactory_T::filterTest
unsigned filterTest(const gnsstk::NavMessageTypeSet &nmts)
The meat of all the filter state tests.
Definition: PNBBDSD1NavDataFactory_T.cpp:132
almD1NAVSF5p8ct
gnsstk::CommonTime almD1NAVSF5p8ct
Definition: D1NavTestDataDecl.hpp:64
gnsstk::TimeSystem::UTC
@ UTC
Coordinated Universal Time (e.g., from NTP)
gnsstk::BDSD1NavISC::rev
uint32_t rev
The rev field from word 1 of the subframe.
Definition: BDSD1NavISC.hpp:96
gnsstk::OrbitDataKepler::i0
double i0
Inclination (rad)
Definition: OrbitDataKepler.hpp:190
gnsstk::BDSD1NavEph::pre2
uint32_t pre2
The preamble from the start of subframe 2.
Definition: BDSD1NavEph.hpp:96
almD1NAVSF5p9
gnsstk::PackedNavBitsPtr almD1NAVSF5p9
Definition: D1NavTestDataDecl.hpp:47
gnsstk::BDSD1NavHealth::satH1
bool satH1
Ephemeris health (autonomous satellite health flag).
Definition: BDSD1NavHealth.hpp:101
std::operator<<
std::ostream & operator<<(std::ostream &s, gnsstk::StringUtils::FFLead v)
Definition: FormattedDouble_T.cpp:44
almD1NAVSF4p11
gnsstk::PackedNavBitsPtr almD1NAVSF4p11
Definition: D1NavTestDataDecl.hpp:53
BDSD1NavHealth.hpp
gnsstk::BDSD1NavTimeOffset
Definition: BDSD1NavTimeOffset.hpp:67
almD1NAVSF4p8B
gnsstk::PackedNavBitsPtr almD1NAVSF4p8B
Definition: D1NavTestDataDecl.hpp:55
gnsstk::OrbitDataKepler::Cic
double Cic
Cosine inclination (rad)
Definition: OrbitDataKepler.hpp:179
gnsstk::NavMessageType::TimeOffset
@ TimeOffset
Message containing information about time system offsets.
gnsstk::BDSD1NavEph::pre3
uint32_t pre3
The preamble from the start of subframe 3.
Definition: BDSD1NavEph.hpp:97
gnsstk::BDSD1NavIono::pre
uint32_t pre
The preamble from word 1 of the subframe.
Definition: BDSD1NavIono.hpp:66
gnsstk::OrbitDataKepler::Crc
double Crc
Cosine radius (m)
Definition: OrbitDataKepler.hpp:177
almD1Default1
gnsstk::PackedNavBitsPtr almD1Default1
Definition: D1NavTestDataDecl.hpp:60
gnsstk::BDSD1NavHealth::svHealth
uint16_t svHealth
9-bit health from subframes 4.
Definition: BDSD1NavHealth.hpp:103
gnsstk::BDSD1NavEph::aode
uint8_t aode
Age of data - ephemeris.
Definition: BDSD1NavEph.hpp:105
almD1NAVSF5p10ZZ
gnsstk::PackedNavBitsPtr almD1NAVSF5p10ZZ
Definition: D1NavTestDataDecl.hpp:52
ephD1NAVSF3ct
gnsstk::CommonTime ephD1NAVSF3ct
Definition: D1NavTestDataDecl.hpp:61
BDSD1NavAlm.hpp
gnsstk::TimeSystem::GPS
@ GPS
GPS system time.
almD1NAVSF5p12Bct
gnsstk::CommonTime almD1NAVSF5p12Bct
Definition: D1NavTestDataDecl.hpp:71
std
Definition: Angle.hpp:142
gnsstk::OrbitDataKepler::af0
double af0
SV clock error (sec)
Definition: OrbitDataKepler.hpp:195
PNBBDSD1NavDataFactory.hpp
gnsstk::NavMessageType::Ephemeris
@ Ephemeris
Precision orbits for the transmitting SV.
FactoryCounter.hpp
gnsstk::KlobucharIonoNavData::alpha
double alpha[4]
alpha terms of Klobuchar model, using semi-circles.
Definition: KlobucharIonoNavData.hpp:84
gnsstk::BDSD1NavISC
Definition: BDSD1NavISC.hpp:51
gnsstk::BDSD1NavIono::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD1NavIono.hpp:69
TUASSERTFE
#define TUASSERTFE(EXP, GOT)
Definition: TestUtil.hpp:103
almD1NAVSF5p7B
gnsstk::PackedNavBitsPtr almD1NAVSF5p7B
Definition: D1NavTestDataDecl.hpp:58
almD1NAVSF5p8B
gnsstk::PackedNavBitsPtr almD1NAVSF5p8B
Definition: D1NavTestDataDecl.hpp:55
almD1NAVSF5p24B2ct
gnsstk::CommonTime almD1NAVSF5p24B2ct
Definition: D1NavTestDataDecl.hpp:73
gnsstk::SatelliteSystem::Glonass
@ Glonass
almD1NAVSF4p7B
gnsstk::PackedNavBitsPtr almD1NAVSF4p7B
Definition: D1NavTestDataDecl.hpp:58
gnsstk::BDSD1NavISC::tgd2
double tgd2
Group delay differential on B2I.
Definition: BDSD1NavISC.hpp:100
almD1NAVSF4p7
gnsstk::PackedNavBitsPtr almD1NAVSF4p7
Definition: D1NavTestDataDecl.hpp:45
gnsstk::StdNavTimeOffset::a0
double a0
Bias coefficient of source time scale.
Definition: StdNavTimeOffset.hpp:122
gnsstk::BDSD1NavIono::rev
uint32_t rev
The rev field from word 1 of the subframe.
Definition: BDSD1NavIono.hpp:67
almD1NAVSF5p1ct
gnsstk::CommonTime almD1NAVSF5p1ct
Definition: D1NavTestDataDecl.hpp:62
gnsstk::BDSD1NavEph::tgd2
double tgd2
Group delay differential on B2I.
Definition: BDSD1NavEph.hpp:114
gnsstk::SatelliteSystem::BeiDou
@ BeiDou
aka Compass
gnsstk::BDSD1NavAlm::healthBits
uint16_t healthBits
9 bits of health from sf5,pg7/8.
Definition: BDSD1NavAlm.hpp:81
ephD1NAVSF2ct
gnsstk::CommonTime ephD1NAVSF2ct
Definition: D1NavTestDataDecl.hpp:61
gnsstk::BDSWeekSecond
Definition: BDSWeekSecond.hpp:56
gnsstk::PNBBDSD1NavDataFactory::isAlmDefault
static bool isAlmDefault(const PackedNavBitsPtr &navIn)
Definition: PNBBDSD1NavDataFactory.cpp:839
gnsstk::NavID
Definition: NavID.hpp:61
gnsstk::OrbitDataKepler::health
SVHealth health
SV health status.
Definition: OrbitDataKepler.hpp:173
gnsstk::BDSD1NavAlm::toa
double toa
Convenience storage of unqualified toa.
Definition: BDSD1NavAlm.hpp:80
gnsstk::SVHealth::Unhealthy
@ Unhealthy
Satellite is unhealthy and should not be used.
gnsstk::BDSD1NavEph::xmit2
CommonTime xmit2
Transmit time for subframe 2.
Definition: BDSD1NavEph.hpp:111
gnsstk::BDSD1NavData::pre
uint32_t pre
The preamble from word 1 of the subframe.
Definition: BDSD1NavData.hpp:70
gnsstk::OrbitDataKepler::OMEGA0
double OMEGA0
Longitude of ascending node at weekly epoch (rad)
Definition: OrbitDataKepler.hpp:189
gnsstk::BDSD1NavEph::sow3
uint32_t sow3
Definition: BDSD1NavEph.hpp:101
almD1NAVSF5p1
gnsstk::PackedNavBitsPtr almD1NAVSF5p1
Definition: D1NavTestDataDecl.hpp:44
gnsstk::StdNavTimeOffset::effTime
CommonTime effTime
Effectivity time (wnLSF,dn).
Definition: StdNavTimeOffset.hpp:127
almD1NAVSF5p11
gnsstk::PackedNavBitsPtr almD1NAVSF5p11
Definition: D1NavTestDataDecl.hpp:53
gnsstk::TimeSystem::BDT
@ BDT
BeiDou system Time.
gnsstk::StdNavTimeOffset::refTime
CommonTime refTime
Reference time for computation.
Definition: StdNavTimeOffset.hpp:126
PNBBDSD1NavDataFactory_T::processSF5Pg8Test
unsigned processSF5Pg8Test()
Definition: PNBBDSD1NavDataFactory_T.cpp:512
PNBBDSD1NavDataFactory_T::processSF5Pg7Test
unsigned processSF5Pg7Test()
Definition: PNBBDSD1NavDataFactory_T.cpp:465
gnsstk::BDSD1NavISC::pre
uint32_t pre
The preamble from word 1 of the subframe.
Definition: BDSD1NavISC.hpp:95
BDSD1NavEph.hpp
gnsstk::OrbitDataKepler::af1
double af1
SV clock drift (sec/sec)
Definition: OrbitDataKepler.hpp:196
gnsstk::PNBBDSD1NavDataFactory::processEph
bool processEph(unsigned long sfid, const PackedNavBitsPtr &navIn, NavDataPtrList &navOut)
Definition: PNBBDSD1NavDataFactory.cpp:315
TimeString.hpp
gnsstk::BDSD1NavHealth
Definition: BDSD1NavHealth.hpp:51
gnsstk::NavMessageType::Almanac
@ Almanac
Low-precision orbits for other than the transmitting SV.
gnsstk::StdNavTimeOffset::tot
double tot
Time data reference time of week (storage only).
Definition: StdNavTimeOffset.hpp:128
gnsstk::OrbitDataKepler::dn
double dn
Correction to mean motion (rad/sec)
Definition: OrbitDataKepler.hpp:183
main
int main()
Definition: PNBBDSD1NavDataFactory_T.cpp:832
BDSD1NavISC.hpp
gnsstk::FactoryControl::bdsTimeZZfilt
bool bdsTimeZZfilt
Definition: FactoryControl.hpp:62
gnsstk::BDSD1NavData::sow
uint32_t sow
Seconds of week from word 1-2 of the subframe.
Definition: BDSD1NavData.hpp:73


gnsstk
Author(s):
autogenerated on Wed Oct 25 2023 02:40:40