当前位置: 首页>>代码示例>>C++>>正文


C++ DayTime::month方法代码示例

本文整理汇总了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
开发者ID:loongfee,项目名称:ossim-svn,代码行数:66,代码来源:CalcDOPs.cpp


注:本文中的DayTime::month方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。