本文整理汇总了C++中CData::getLatitude方法的典型用法代码示例。如果您正苦于以下问题:C++ CData::getLatitude方法的具体用法?C++ CData::getLatitude怎么用?C++ CData::getLatitude使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CData
的用法示例。
在下文中一共展示了CData::getLatitude方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dumpGPX
void CSgctpUtil::dumpGPX( const CData& _roData )
{
double __fdValue1, __fdValue2;
if( !CData::isDefined( __fdValue1 = _roData.getLatitude() )
|| !CData::isDefined( __fdValue2 = _roData.getLongitude() ) )
return;
*poOutputStream << "<trkpt lat=\"" << (boost::format("%.7f")%__fdValue1).str()
<< "\" lon=\"" << (boost::format("%.7f")%__fdValue2).str() << "\">" << endl;
if( CData::isDefined( __fdValue1 = _roData.getElevation() ) )
*poOutputStream << "<ele>" << (boost::format("%.1f")%__fdValue1).str() << "</ele>" << endl;
if( CData::isDefined( __fdValue1 = _roData.getTime() ) )
{
if( fdEpochReference >= 0 )
__fdValue1 = CData::toEpoch( __fdValue1, fdEpochReference );
char __pcIso8601[24];
CData::toIso8601( __pcIso8601, __fdValue1 );
*poOutputStream << "<time>" << __pcIso8601 << "</time>" << endl;
}
if( bExtendedContent )
{
if( CData::isDefined( __fdValue1 = _roData.getLongitudeError() )
&& CData::isDefined( __fdValue2 = _roData.getLatitudeError() ) )
{
double __fdDopX = __fdValue1 / H_UERE;
double __fdDopY = __fdValue2 / H_UERE;
double __fdDopH = sqrt( __fdDopX*__fdDopX + __fdDopY*__fdDopY );
*poOutputStream << "<hdop>" << (boost::format("%.1f")%__fdDopH).str() << "</hdop>" << endl;
double __fdDopZ = 0;
if( CData::isDefined( __fdValue1 = _roData.getElevationError() ) )
{
__fdDopZ = __fdValue1 / V_UERE;
*poOutputStream << "<vdop>" << (boost::format("%.1f")%__fdDopZ).str() << "</vdop>" << endl;
}
double __fdDopP = sqrt( __fdDopX*__fdDopX
+ __fdDopY*__fdDopY
+ __fdDopZ*__fdDopZ );
*poOutputStream << "<pdop>" << (boost::format("%.1f")%__fdDopP).str() << "</pdop>" << endl;
}
}
*poOutputStream << "</trkpt>" << endl;
}