本文整理汇总了C++中TPosition::SetAccuracy方法的典型用法代码示例。如果您正苦于以下问题:C++ TPosition::SetAccuracy方法的具体用法?C++ TPosition::SetAccuracy怎么用?C++ TPosition::SetAccuracy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TPosition
的用法示例。
在下文中一共展示了TPosition::SetAccuracy方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CompleteRequest
void CNetworkPsy2::CompleteRequestByDefault()
{
if(!iRequestStatus)
{
return;
}
if(iPositionInfoBase->PositionClassType() & EPositionInfoClass)
{
TPositionInfo* posInfo = static_cast<TPositionInfo*>(iPositionInfoBase);
TPosition pos;
pos.SetCoordinate(1.0, 1.0, 1.0);
pos.SetAccuracy(1.0, 1.0);
posInfo->SetPosition(pos);
}
CompleteRequest(KErrNone);
}
示例2: GetConfigured_PosInfosL
EXPORT_C void T_LbsUtils::GetConfigured_PosInfosL(const TDesC& aConfigFileName, const TDesC& aConfigSection, RPointerArray<TAny>& aPosInfoArr)
/** Fills a position info array with values read from a configuration ini file.
@param aConfigFileName The name of the ini file to read. If the file name is empty (0 length) then
the array will contain a single pos info item with default values.
@param aConfigSection The section within the ini file to read data from.
@param aPosInfoArr The pos info array to which the items are added. The array will cleared of
existing items.
*/
{
// Clear array.
ResetAndDestroy_PosInfoArr(aPosInfoArr);
// Check for config file, if not present create a single default TPositionInfo.
if (aConfigFileName.Length() == 0)
{
TPositionSatelliteInfo* posInfo = new(ELeave) TPositionSatelliteInfo();
TPosition position;
position.SetCoordinate(DEFAULT_NOTIFY_POS_UPDATE_LATITUDE, DEFAULT_NOTIFY_POS_UPDATE_LONGITUDE, DEFAULT_NOTIFY_POS_UPDATE_ALTITUDE);
position.SetAccuracy(DEFAULT_NOTIFY_POS_UPDATE_HORIZONTAL_ACCURACY, DEFAULT_NOTIFY_POS_UPDATE_VERTICAL_ACCURACY);
position.SetCurrentTime();
posInfo->SetPosition(position);
User::LeaveIfError(aPosInfoArr.Append(posInfo));
}
else
{
CPosInfoConfigReader* reader;
reader = CPosInfoConfigReader::NewL(aConfigFileName, aConfigSection, aPosInfoArr);
CleanupStack::PushL(reader);
reader->ProcessL();
CleanupStack::PopAndDestroy(reader);
}
}
示例3:
void CLcfPsyDummy1::GetBasicPositionInfoL(TPositionInfoBase& aPosInfo)
{
// The position info object is at least a TPositionInfo
TPositionInfo* posInfo =
static_cast<TPositionInfo*>(&aPosInfo);
TPosition pos;
// Calculate the position and fill in the position info
// object
// Latitude, Longtitude, altitude
pos.SetCoordinate(57.1, 11.3, 32.5);
// set horizontal and vertical accuracy
pos.SetAccuracy(40.0, 40.0);
// set time of fix
pos.SetCurrentTime();
// Set position in position info.
posInfo->SetPosition(pos);
// Set the implementation uid
posInfo->SetModuleId(ImplementationUid());
}
示例4:
void CLcfPsyDummy3::GetBasicPositionInfoL(TPositionInfoBase& aPosInfo)
{
// The position info object is at least a TPositionInfo
TPositionInfo* posInfo =
static_cast<TPositionInfo*>(&aPosInfo);
TPosition pos;
// Calculate the position and fill in the position info
// object
pos.SetCoordinate(67.567, -12.34, 45.32);
// set horizontal and vertical accuracy
pos.SetAccuracy(150.0, 500.0);
// set time of fix
pos.SetCurrentTime();
// Set position in position info.
posInfo->SetPosition(pos);
// Set the implementation uid
posInfo->SetModuleId(ImplementationUid());
}