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


C++ EngEphemeris::getOrbit方法代码示例

本文整理汇总了C++中EngEphemeris::getOrbit方法的典型用法代码示例。如果您正苦于以下问题:C++ EngEphemeris::getOrbit方法的具体用法?C++ EngEphemeris::getOrbit怎么用?C++ EngEphemeris::getOrbit使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在EngEphemeris的用法示例。


在下文中一共展示了EngEphemeris::getOrbit方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: firstTest


//.........这里部分代码省略.........

   ofstream outf("Logs/CNAVEphemeris_Output", ios::out);
   outf.precision(11);

      // First test case.  Create an CE object with data available from RINEX file.
   outf << endl << "Test Case 1: Creating CE object with data from RINEX file." << endl;
   outf << "Time = " << g << endl;
   CNAVEphemeris ce1;
   ce1.loadData(SysID, obsID, PRNID, AlertMsg10, TOWMsg10_1, AlertMsg11,
                TOWMsg11_1, rTOWWeek, Top, URAoe, L1Health, L2Health, 
		          L5Health, rToe, raccuracy, rCuc, rCus, rCrc, rCrs, rCic,
                rCis, rM0, rdn, rdnDot, recc, deltaA, rAdot, rOMEGA0, 
                ri0, rw, deltaOMEGAdot1, ridot );

   Xv  xv1 = ce1.svXv( dt ); 
   outf << "Position ce1: "           << xv1.x << endl;
   outf << "Velocity ce1: "           << xv1.v << endl;
   outf << "RelCorr ce1:  "           << ce1.svRelativity(dt) << endl;
   outf << "Time of Prediction ce1: " << GPSWeekSecond(ce1.getTimeOfPrediction()).printf("%F, %g") << endl;
   outf << "CNAV Accuracy Test:  "    << SV_CNAV_ACCURACY_GPS_MAX_INDEX[URAoe+15] << endl;
   outf << "legacy Accuracy Test: "   << SV_ACCURACY_GPS_MAX_INDEX[URAoe] << endl;

      // Second test case.  Create an CE object with data available from navdump.
   outf << endl << "Test Case 2: Creating CE object with data from navdump." << endl;
   outf << "Time = " << ct2 << endl;
   CNAVEphemeris ce2;
   ce2.loadData( SysID, obsID2, PRNID2, AlertMsg10, TOWMsg10_2, AlertMsg11,
                TOWMsg11_2, TOWWeek2, Top2, URAoe2, L1Health, L2Health, 
		          L5Health, Toe2, accuracy2, Cuc2, Cus2, Crc2, Crs2, Cic2,
                Cis2, M02, dn2, dnDot2, ecc2, deltaA2, Adot2, OMEGA02, 
                i02, w2, deltaOMEGAdot2, idot2 );

   Xv  xv2 = ce2.svXv( dt2 ); 
   outf << "Position ce2: "           << xv2.x << endl;
   outf << "Velocity ce2: "           << xv2.v << endl;
   outf << "RelCorr ce2:  "           << ce2.svRelativity(dt2) << endl;
   outf << "Time of Prediction ce2: " << GPSWeekSecond(ce2.getTimeOfPrediction()).printf("%F, %g") << endl;

      // Third test case.  Create an CE object with data available from navdump.
   outf << endl << "Test Case 3: Creating CE object with data from navdump." << endl;
   outf << "Time = " << ct3 << endl;
   CNAVEphemeris ce3;
   ce3.loadData( SysID, obsID, PRNID3, AlertMsg10, TOWMsg10_3, AlertMsg11,
                TOWMsg11_3, TOWWeek3, Top3, URAoe3, L1Health, L2Health, 
		          L5Health, Toe3, accuracy3, Cuc3, Cus3, Crc3, Crs3, Cic3,
                Cis3, M03, dn3, dnDot3, ecc3, deltaA3, Adot3, OMEGA03, 
                i03, w3, deltaOMEGAdot3, idot3 );

   Xv  xv3 = ce3.svXv( dt3 ); 
   outf << "Position ce3: "           << xv3.x << endl;
   outf << "Velocity ce3: "           << xv3.v << endl;
   outf << "RelCorr ce3:  "           << ce3.svRelativity(dt3) << endl;
   outf << "Time of Prediction ce3: " << GPSWeekSecond(ce3.getTimeOfPrediction()).printf("%F, %g") << endl;

      // Fourth test case.  Compare against "classic" EngEphemeris
   outf << endl << "Test Case 4: Calculated position using 'classic' EngEphemeris." << endl;
   outf<< "Time= "<< g << endl;
   EngEphemeris EE;
   EE.addSubframe(subframe1, TOWWeek, 3, 1);
   EE.addSubframe(subframe2, TOWWeek, 3, 1);
   EE.addSubframe(subframe3, TOWWeek, 3, 1);

   Xvt xvt = EE.svXvt(dt);
   outf<< "Position EE: " << xvt.x << endl;
   outf<< "Velocity EE: " << xvt.v << endl;
   outf<< "RelCorr EE:  " << EE.svRelativity(dt) << endl;

   outf << endl;
   outf << "CE Object Dump:" << endl;
   outf << ce1 << endl;
   if ( ce1.getOrbit().isHealthy()) outf << "CE.orbit is healthy." << endl;
   else outf << "CE.orbit is NOT healthy." << endl;

   outf << endl;
   outf << "CE2 Object Dump:" << endl;
   outf << ce2 << endl;
   if ( ce2.getOrbit().isHealthy()) outf << "CE2.orbit is healthy." << endl;
   else outf << "CE2.orbit is NOT healthy." << endl;

   outf << endl;
   outf << "CE3 Object Dump:" << endl;
   outf << ce3 << endl;
   if ( ce3.getOrbit().isHealthy()) outf << "CE3.orbit is healthy." << endl;
   else outf << "CE3.orbit is NOT healthy." << endl;

   outf << endl;
   outf << "Fit Interval Tests" << endl;
   outf << "BeginFit ce1:  "    << GPSWeekSecond(ce1.getOrbit().getBeginningOfFitInterval()).printf("%F, %g") << endl;
   outf << "BeginFit EE:   "    << GPSWeekSecond(EE.getOrbit().getBeginningOfFitInterval()).printf("%F, %g") << endl;

   outf << endl;
   outf << "EndFit ce1:   " << GPSWeekSecond(ce1.getOrbit().getEndOfFitInterval()).printf("%F, %g") << endl;
   outf << "EndFit EE  :  " << GPSWeekSecond(EE.getOrbit().getEndOfFitInterval()).printf("%F, %g") << endl;

   outf << endl;
   outf << "Within Fit Interval: " << ce1.getOrbit().withinFitInterval(dt) << endl;
   outf << "Within Fit Interval: " << EE.getOrbit().withinFitInterval(dt) << endl;

   CPPUNIT_ASSERT(fileEqualTest((char*)"Logs/CNAVEphemeris_Truth",(char*)"Logs/CNAVEphemeris_Output"));
}
开发者ID:PPNav,项目名称:GPSTk,代码行数:101,代码来源:xCNAVEphemerisgpsNavMsg.cpp


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