67 af0 = af1 = af2 = 0.0;
76 const short URAoc1Arg,
77 const short URAoc2Arg,
78 const bool healthyArg,
83 loadData(satSysArg, obsIDArg, PRNIDArg, TocArg, TopArg, URAocArg,
84 URAoc1Arg, URAoc2Arg, healthyArg, af0Arg, af1Arg, af2Arg );
90 const short fullweeknum,
91 const long subframe1[10] )
93 loadData(obsIDArg, PRNID,fullweeknum,subframe1 );
101 return ((dataLoaded == right.dataLoaded) &&
102 (satSys == right.satSys) &&
103 (obsID == right.obsID) &&
104 (PRNID == right.PRNID) &&
105 (Toc == right.Toc) &&
106 (Top == right.Top) &&
107 (URAoc == right.URAoc) &&
108 (URAoc1 == right.URAoc1) &&
109 (URAoc2 == right.URAoc2) &&
110 (healthy == right.healthy) &&
111 (af0 == right.af0) &&
112 (af1 == right.af1) &&
118 const ObsID obsIDArg,
119 const short PRNIDArg,
121 const short URAocArg,
122 const bool healthyArg,
125 const double af2Arg )
128 const short URAoc1Arg = 0;
129 const short URAoc2Arg = 0;
131 loadData(satSysArg, obsIDArg, PRNIDArg, TocArg, TopArg, URAocArg,
132 URAoc1Arg, URAoc2Arg, healthyArg, af0Arg, af1Arg, af2Arg );
136 const ObsID obsIDArg,
137 const short PRNIDArg,
140 const short URAocArg,
141 const short URAoc1Arg,
142 const short URAoc2Arg,
143 const bool healthyArg,
146 const double af2Arg )
156 healthy = healthyArg;
164 const short fullweeknum,
165 const long subframe1[10] )
175 if (!subframeConvert(subframe1, fullweeknum, ficked))
177 InvalidParameter exc(
"Subframe 1 not valid.");
180 double Txmit = ficked[2];
181 short weeknum =
static_cast<short>( ficked[5] );
182 short accFlag =
static_cast<short>( ficked[7] );
183 short health =
static_cast<short>( ficked[8] );
184 double TocSOW = ficked[12];
189 double diff = Txmit - TocSOW;
229 elaptc = t - getEpochTime();
230 dtc = af0 + elaptc * ( af1 + elaptc * af2 );
236 double ret = svClockBias(t);
244 elaptc = t - getEpochTime();
245 drift = af1 + elaptc * af2;
253 InvalidRequest exc(
"Required data not stored.");
263 InvalidRequest exc(
"Required data not stored.");
273 InvalidRequest exc(
"Required data not stored.");
286 InvalidRequest exc(
"Required data not stored.");
302 InvalidRequest exc(
"Required data not stored.");
304 if (ndx == 0)
return URAoc;
305 else if (ndx == 1)
return URAoc1;
306 else if (ndx == 2)
return URAoc2;
307 InvalidParameter exc (
"Required data not stored.");
315 InvalidRequest exc(
"Required data not stored.");
326 InvalidRequest exc(
"Required data not stored.");
336 InvalidRequest exc(
"Required data not stored.");
346 InvalidRequest exc(
"Required data not stored.");
357 os << setw(4) << dummyTime.
week <<
"(";
358 os << setw(4) << (dummyTime.
week & 0x03FF) <<
") ";
359 os << setw(6) << setfill(
' ') << dummyTime.
sow <<
" ";
363 case 0: os <<
"Sun-0";
break;
364 case 1: os <<
"Mon-1";
break;
365 case 2: os <<
"Tue-2";
break;
366 case 3: os <<
"Wed-3";
break;
367 case 4: os <<
"Thu-4";
break;
368 case 5: os <<
"Fri-5";
break;
369 case 6: os <<
"Sat-6";
break;
372 os <<
" " << (
static_cast<YDSTime>(t)).printf(
"%3j %5.0s ")
373 << (
static_cast<CivilTime>(t)).printf(
"%02m/%02d/%04Y %02H:%02M:%02S");
375 #pragma clang diagnostic push
376 #pragma clang diagnostic ignored "-Wunused-function"
377 static void shortcut(ostream & os,
const long HOW )
383 SOW =
static_cast<long>( HOW );
385 SOD = SOW -
static_cast<long>( DOW *
SEC_PER_DAY );
386 hour =
static_cast<short>( SOD/3600 );
388 SOH =
static_cast<short>( SOD - (
hour*3600) );
391 sec = SOH -
min * 60;
394 case 0: os <<
"Sun-0";
break;
395 case 1: os <<
"Mon-1";
break;
396 case 2: os <<
"Tue-2";
break;
397 case 3: os <<
"Wed-3";
break;
398 case 4: os <<
"Thu-4";
break;
399 case 5: os <<
"Fri-5";
break;
400 case 6: os <<
"Sat-6";
break;
404 os <<
":" << setfill(
'0')
406 <<
":" << setw(2) <<
min
407 <<
":" << setw(2) << sec
410 #pragma clang diagnostic pop
413 const ios::fmtflags oldFlags = s.flags();
414 s.setf(ios::fixed, ios::floatfield);
415 s.setf(ios::right, ios::adjustfield);
416 s.setf(ios::uppercase);
420 s <<
"****************************************************************"
421 <<
"************" << endl
422 <<
"Broadcast Ephemeris (Engineering Units)" << endl
424 <<
"PRN : " << setw(2) << PRNID << endl
427 s <<
" Week(10bt) SOW DOW UTD SOD"
428 <<
" MM/DD/YYYY HH:MM:SS\n";
429 s <<
"Clock Epoch: ";
434 s.setf(ios::scientific, ios::floatfield);
441 <<
"Bias T0: " << setw(18) << af0 <<
" sec" << endl
442 <<
"Drift: " << setw(18) << af1 <<
" sec/sec" << endl
443 <<
"Drift rate: " << setw(18) << af2 <<
" sec/(sec**2)" << endl;
445 s <<
"****************************************************************"
446 <<
"************" << endl;