本文整理汇总了C++中DayTime::month方法的典型用法代码示例。如果您正苦于以下问题:C++ DayTime::month方法的具体用法?C++ DayTime::month怎么用?C++ DayTime::month使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DayTime
的用法示例。
在下文中一共展示了DayTime::month方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: main
//.........这里部分代码省略.........
if (i)
{
if (i == -1) lofs << "Previous-day input file does not exist. Abort." << endl;
if (i == -2) lofs << "Cannot identify previous-day file type. Abort." << endl;
return i;
}
}
// open and read the current day's input data file
lofs << "Reading in current-day input file..." << endl;
i = ReadDataFile(inputfile);
if (i)
{
if (i == -1) lofs << "Current-day input file does not exist. Abort." << endl;
if (i == -2) lofs << "Cannot identify current-day file type. Abort." << endl;
return i;
}
// build the spatial grid, and store it in vector<GridData> Grid;
BuildGrid();
// get a list of the available satellite PRNs and the initial timetag
bool ok;
DayTime tt, starttime;
bool initialTimeSet = false;
if ( ephmode ) // ephemeris mode
{
try
{
DayTime earliest = ges.getInitialTime();
DayTime latest = ges.getFinalTime();
// DayTime start = latest - gpstk::DayTime::SEC_DAY/2; /* make sure you're in the right day */
DayTime start = latest - 6*3600.0; /* go back 6 h: covers any 4 h ephemeris going into the next day */
tt = DayTime( start.year(), start.month(), start.day(), 0, 0, 0.0 );
starttime = tt;
lofs << " Initial time tag is " << tt.printf("%4F %8.1g") << endl;
initialTimeSet = true;
}
catch(InvalidRequest)
{
i = -100;
lofs << "Initial Time or Final Time missing. Abort." << endl;
return i;
}
for (i=1; i<33; i++)
{
for (ok=true,j=0; j<ExPRN.size(); j++)
{
if (ExPRN[j] == i) { ok=false; break; }
}
if (!ok) continue; // skip this satellite
Sats.push_back(i); // save this satellite
}
}
else // almanac mode (original version)
{
DayTime start(DayTime::BEGINNING_OF_TIME); // Declare and initialize to something guaranteed to be early.
for (i=1; i<33; i++) // # of SVs hard-wired to 32
{
if (aomap.find(i) == aomap.end()) continue; // satellite not found in almanac
for (ok=true,j=0; j<ExPRN.size(); j++)
{
if (ExPRN[j] == i) { ok=false; break; }
}
if (!ok) continue; // skip this satellite if not ok