87 strm.setf(ios::fixed, ios::floatfield);
90 <<
"******** Week" << setw(5) << (week % 1024)
91 <<
" almanac for PRN-" << setfill(
'0') << setw(2) << PRN << setfill(
' ')
92 <<
" ********" << endl;
95 << setw(width) << sID <<
" "
97 << setfill(
'0') << setw(2) << PRN
98 << setfill(
' ') << endl;
101 << setw(width) << sHlth <<
" "
103 << setfill(
'0') << setw(3) << SV_health
104 << setfill(
' ') << endl;
106 strm.setf(ios::scientific, ios::floatfield);
107 strm.setf(ios_base::uppercase);
110 << setw(width) << sEcc
112 << setw(19) << ecc << endl;
114 strm.setf(ios::fixed, ios::floatfield);
117 << setw(width) << sTOA <<
" "
118 << setw(6) << Toa << endl;
120 strm.setf(ios::scientific, ios::floatfield);
122 strm << left << setw(width) << sOrbI << right << setw(19) << i_total << endl;
123 strm << left << setw(width) << sRRA << right << setw(19) << OMEGAdot << endl;
125 strm.setf(ios::fixed, ios::floatfield);
127 strm << left << setw(width) << sSqrA <<
" "
128 << setw(11) << Ahalf << endl;
130 strm.setf(ios::scientific, ios::floatfield);
132 strm << left << setw(width) << sRtAs << right << setw(19) << OMEGA0 << endl;
134 strm.setf(ios::fixed, ios::floatfield);
136 strm << left << setw(width) << sArgP <<
" "
138 << setw(12) << w << endl;
140 strm.setf(ios::scientific, ios::floatfield);
142 strm << left << setw(width) << sMnAn << right << setw(19) << M0 << endl;
143 strm << left << setw(width) << sAf0 << right << setw(19) << AF0 << endl;
144 strm << left << setw(width) << sAf1 << right << setw(19) << AF1 << endl;
146 strm.setf(ios::fixed, ios::floatfield);
148 strm << left << setw(width) << sweek <<
" "
149 << setw(4) << week << endl;
156 const int i = line.find_first_of(
":");
159 if (i == (
int)string::npos)
160 GNSSTK_THROW(FFStreamError(
"Format error in YumaData"));
164 if (line.substr(0,w) != s.substr(0,w))
165 GNSSTK_THROW(FFStreamError(
"Format error in YumaData"));
181 unsigned lineCount = 0;
185 if (line.substr(0,2).compare(
"**")==0) found =
true;
189 if (!found && lineCount>14)
191 FFStreamError exc(
"Could not find Yuma record.");
198 PRN =
asInt(lineParser(line, sID));
202 SV_health =
asInt(lineParser(line, sHlth));
206 ecc =
asDouble(lineParser(line, sEcc));
210 Toa = (long)
asDouble(lineParser(line, sTOA));
214 i_total =
asDouble(lineParser(line, sOrbI));
215 i_offset = i_total - 54.0 * (
gnsstk::PI / 180.0);
219 OMEGAdot =
asDouble(lineParser(line, sRRA));
223 Ahalf =
asDouble(lineParser(line, sSqrA));
227 OMEGA0 =
asDouble(lineParser(line, sRtAs));
231 w =
asDouble(lineParser(line, sArgP));
235 M0 =
asDouble(lineParser(line, sMnAn));
239 AF0 =
asDouble(lineParser(line, sAf0));
243 AF1 =
asDouble(lineParser(line, sAf1));
248 week =
asInt(lineParser(line, sweek));
250 if (nearFullWeek > 0)
254 week += (nearFullWeek / 1024) * 1024;
255 short diff = nearFullWeek - week;
266 cout <<
"PRN = " << PRN << endl;
267 cout <<
"week = " << week << endl;
268 cout <<
"SV_health = " << SV_health << endl;
269 cout <<
"ecc = " << ecc << endl;
270 cout <<
"Toa = " << Toa << endl;
271 cout <<
"i_offset = " << i_offset << endl;
272 cout <<
"OMEGAdot = " << OMEGAdot << endl;
273 cout <<
"Ahalf = " << Ahalf << endl;
274 cout <<
"OMEGA0 = " << OMEGA0 << endl;
275 cout <<
"w = " << w << endl;
276 cout <<
"M0 = " << M0 << endl;
277 cout <<
"AF0 = " << AF0 << endl;
278 cout <<
"AF1 = " << AF1 << endl;
279 cout <<
"xmit_time = " << xmit_time << endl;
285 AlmOrbit ao(PRN, ecc,i_offset, OMEGAdot, Ahalf, OMEGA0,
286 w, M0, AF0, AF1, Toa, xmit_time, week, SV_health);