• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C++ TPosition类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: LBS_RDEBUG_VAR_INT

void CPositionRequest::StartPositionDataRequestPhase()
    {  
    LBS_RDEBUG_VAR_INT("CPositionRequest::StartPositionDataRequestPhase() iRequestPhase", iRequestPhase);
    
    __ASSERT_DEBUG(iPositioner,
        DebugPanic(EPosServerPanicPositionerNotInitialized));

    iReqStartTime.UniversalTime();

    TPositionInfo& info = PositionInfo(iPositionBuffer);

    // Set datum type to WGS84
    TPosition position;
    info.GetPosition(position);
    position.SetDatum(KPositionDatumWgs84);
    info.SetPosition(position);

    TPositionInfoBase& infoBase = reinterpret_cast<TPositionInfoBase&>(info);

    // issue request to psy
    DEBUG_TRACE("calling CPositioner::NotifyPositionUpdate()", __LINE__)

    iStatus = KRequestPending;
    iPositioner->NotifyPositionUpdate(infoBase, iStatus);

    iRequestPhase = EPosReqPositionRequest;
    SetActive();
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:28,代码来源:EPos_CPositionRequest.cpp


示例2: RunL

void CPosition::RunL()
{
    TPosition position;
    iPositionInfo.GetPosition(position);

    TTime now;
    now.UniversalTime();

    TTimeIntervalSeconds interval = 0;
    now.SecondsFrom(position.Time(), interval);

    LOGARG("Interval between retrieved position and current time: %d secs", interval.Int());

    // Compare that retrieved data is not outdated
    if (iStatus == KErrNone && interval.Int() < 300)
    {
        iObserver.PositionUpdateL(iStatus.Int(), position);
    }
    else if (iStatus == KErrTimedOut)
    {
        iObserver.PositionUpdateL(iStatus.Int(), position);
    }
    else
    {
        iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
        SetActive();

        iState = EGps;
    }
}
开发者ID:DavidCaabeiro,项目名称:openmar,代码行数:30,代码来源:Position.cpp


示例3:

// ---------------------------------------------------------
// CT_LbsInstallPsyTp273::NotifyPositionUpdate
// 
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsInstallPsyTp273::NotifyPositionUpdate(
	TPositionInfoBase& aPosInfo,
    TRequestStatus& aStatus)
	{
	TInt err = KErrNone;
    
    TTime tt;
    tt.UniversalTime();
    //Request ID must be unique, use universalime as seed
    // to give a random number
    TInt64 seed = tt.Int64();
    TReal lat = 90 * Math::FRand(seed);
    TReal lon = 90 * Math::FRand(seed);
    TReal32 alt = (TReal32)(90 * Math::FRand(seed));
    TPositionInfo* position = static_cast<TPositionInfo*> (&aPosInfo);
    TUid implUid = { KPosImplementationUid };
    position->SetModuleId(implUid);

    TTime now;
    now.UniversalTime();          

    TPosition posse;
    posse.SetCoordinate(lat, lon, alt);
    posse.SetTime(now);
    position->SetPosition(posse);

    TRequestStatus* status = &aStatus;
	User::RequestComplete(status, err);
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:ctlbsinstallpsytp273.cpp


示例4: satellite

/** Calculates a difference between the system UTC time and the GPS based UTC time.
Accuracy of the calculations is affected by:
   - time required to process the satellite information in the GPS HW
   - time required to transfer the information over a HW link from the GPS HW to a mobile phone
   - time required to receive the information by a Symbian OS drivers and decode by the AGPS
     integration module

@param aSatInfo A satellite information with the GPS based UTC time
@param aTimeCorr A time correction that must be applied to the System UTC time. Not valid if the method returns an error.
@return KErrNone if sucedded. 
        KErrNotSupported if the satellite (GPS based UTC time) or the position 
        reception time is not present (0).
@see TPositionSatelliteInfo
@internalComponent
*/
TInt CAutoClockAdjust::CalculateTimeCorrection(const TPositionSatelliteInfo &aSatInfo, TTimeIntervalMicroSeconds &aTimeCorr)
	{
	LBSLOG(ELogP1, "CAutoClockAdjust::CalculateTimeCorrection()\n");
	// The System UTC time when the location has been received from a GPS
	TTime recTime;
	// GPS based UTC time (satellite time)
	TTime satTime;

	TPosition pos;
	TInt err = KErrNone;
		
	aSatInfo.GetPosition(pos);
	recTime = pos.Time();
	satTime = aSatInfo.SatelliteTime();
	
	if ((recTime == 0) || (satTime == 0))
		{
		err = KErrNotSupported;
		}
	else
		{
		aTimeCorr = satTime.MicroSecondsFrom(recTime);
		}
	
	return err;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:41,代码来源:lbsautoclockadjust.cpp


示例5: latitude

//
// This test checks that a SetLastKnowPosition request
// results in a request to store a position sent to the DB
//
TVerdict CTe_LocMonitorStep11::doTestStepL()
	{
 	if (TestStepResult()==EPass)
 		{
 		TPositionInfo positionInfo;
 		TPosition position;
		TReal64 latitude(11), longitude(21);
		position.SetCoordinate(latitude, longitude);
		positionInfo.SetPosition(position);
			
		RLbsLocMonitorSession locMonSession;
 		User::LeaveIfError(locMonSession.Connect()); 		
 		RLbsLocMonitorAreaPositioner areaPositioner;
 		areaPositioner.OpenL(locMonSession);
 		CleanupClosePushL(areaPositioner);

 		iLocMonDbListener->ListenForLocMonDbFeedback();
 		areaPositioner.SetLastKnownPosition(positionInfo);
 		iLocMonDbListener->WaitForDbFeedback(); 		
		
		// Check that the position received by the DB is the position
		// sent by the test
		TESTL(latitude == iLocMonDbListener->iDbData.iPosition.Latitude());
		TESTL(longitude == iLocMonDbListener->iDbData.iPosition.Longitude());
		
		CleanupStack::PopAndDestroy(&areaPositioner);
 		locMonSession.Close();
 		}

	  return TestStepResult();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:35,代码来源:te_locmonitorstep11.cpp


示例6: LBSLOG

/** Adjusts system time if required. The decision whether the adjustment is needed or not
is based on the following criterias:
 - satellite time must be present in the location update
 - time threshold must be exceeded
 - time from a last adjustment is greater than a defined interval.
 
@param aStatus An error code.
@param TPositionSatelliteInfo Position and time information. 
							  If clock adjustment takes place the TPosition::iTime is 
							  re-set to the satellite time.
@see CLbsAdmin
@see TPositionSatelliteInfo
*/
void CAutoClockAdjust::LocationUpdate(TInt aStatus, TPositionSatelliteInfo& aPosInfo)
	{
	LBSLOG(ELogP1, "CAutoClockAdjust::LocationUpdate()\n");
	TTimeIntervalMicroSeconds timeCorr;
	TTime sysTime;
	TInt err;
	
	// If adjustment on, no error, and satellite information present
	if ((iClockAdjustSetting == CLbsAdmin::EClockAdjustOn) && (aStatus == KErrNone) &&
	    ((aPosInfo.PositionClassType() & EPositionSatelliteInfoClass) == EPositionSatelliteInfoClass))
		{
		// Is is time do do another time adjustment?
		sysTime.UniversalTime();
		if (Abs(sysTime.MicroSecondsFrom(iLastAdjustment).Int64()) > (1000*iAdjustInterval))
			{
			const TPositionSatelliteInfo& satInfo = static_cast<const TPositionSatelliteInfo&>(aPosInfo);
			err = CalculateTimeCorrection(satInfo, timeCorr);
			if (err == KErrNone)
				{
				// Is threshold exceeded? 
				if (Abs(timeCorr.Int64()) > (1000*iAdjustThreshold))
					{
					sysTime.UniversalTime();
					sysTime += timeCorr;
					LBSLOG(ELogP9, "->S CGpsSetClockBase::SetUTCTime() ClockModule\n");
					LBSLOG5(ELogP9, "  > TTime sysTime  = %02d:%02d:%02d.%06d\n", sysTime.DateTime().Hour(), 
																				sysTime.DateTime().Minute(),
																				sysTime.DateTime().Second(),
																				sysTime.DateTime().MicroSecond());

					err = iSetClockImpl->SetUTCTime(sysTime);
					LBSLOG2(ELogP9, "  Return  = %d\n", err);

					if (err == KErrNone)
						{				
						// Sync the position time with the satellite time
						// to avoid re-adjusting the system time by the manual clock adjustment component.
						TPosition pos;
						aPosInfo.GetPosition(pos);
						pos.SetTime(aPosInfo.SatelliteTime());
						aPosInfo.SetPosition(pos);
						LBSLOG2(ELogP2, "ACTION: Clock Adjusted by %ld\n", timeCorr.Int64());
						}
					}
					
				if (err == KErrNone)
					{				
					// Remember the current time even if threshold not exceeded
					iLastAdjustment = sysTime;
					}
				else
					{
					LBSLOG_WARN2(ELogP3, "Clock Adjustment failed. Error: %d\n", err);
					}
				}
			}
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:71,代码来源:lbsautoclockadjust.cpp


示例7: ComparePositions

void CTe_LbsLocationMonitorSuiteStepBase::ComparePositions(TPosition& aLeft, TPosition& aRight)
	{
	TEST(aLeft.HorizontalAccuracy() == aRight.HorizontalAccuracy());
	TEST(aLeft.VerticalAccuracy() == aRight.VerticalAccuracy());
	TEST(aLeft.Latitude() == aRight.Latitude());
	TEST(aLeft.Longitude() == aRight.Longitude());
	TEST(aLeft.Altitude() == aRight.Altitude());
		
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:9,代码来源:te_lbslocationmonitorsuitestepbase.cpp


示例8: GetLastStoredPosition

/*
This method returns a position to the client. In some testcases, the completion of the 
asynchronous request may be delayed.
*/
TInt RLbsLocMonitorDb::GetLastStoredPosition(TPosition& aPosition, TRequestStatus& aStatus)
	{
	LBSLOG(ELogP1, "RLbsLocMonitorDb::GetLastStoredPosition()");

	TInt completionCode = KErrNone;
	aStatus = KRequestPending;
	iCallCount ++;
	
	if (iFailNextRequest)
		{
		completionCode = KErrNotFound;
		iFailNextRequest = EFalse;	
		}
	else if(iShortDelayNextRequest || iLongDelayNextRequest)
		{
		// Remember client request's return parms and
		// force a delay.
		iClientPosition = &aPosition;
		iClientStatus = &aStatus;
		if (!iTimer->IsActive())
			{
			TInt delayInMicroSecs = iLongDelayNextRequest?15000000:1000000; // 15 or 1 second
			iTimer->Start(delayInMicroSecs, delayInMicroSecs, TCallBack(StopWaiting, this));	
			}
		else
			{
			// A delay has already been applied. Nothing to do.
			}
			
		iShortDelayNextRequest = EFalse;
		iLongDelayNextRequest = EFalse;
		return KErrNone;	
		}
	else
		{
		switch (iCallCount)
			{
			case 1:
			// Set a position as if it came from the DB
			aPosition.SetCoordinate(KLatGetLast1, KLongGetLast1);
			break;

			// Return different values for second and later requests
			// that occurred in the same test.
			default:
			aPosition.SetCoordinate(KLatGetLast2, KLongGetLast2);
			break;
			}
		}
	TRequestStatus* status = &aStatus;
	User::RequestComplete(status, completionCode);
	return KErrNone;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:57,代码来源:testrlbslocmonitordb.cpp


示例9: PositionInfo

void CPositionRequest::SaveAsLastKnownPosition()
    {
    TPosition pos;
    TPositionInfo& positionInfo = PositionInfo(iPositionBuffer);
    positionInfo.GetPosition(pos);

    // Don't set last known position if the position request is in the past. //TODO check if this is required
    if (iReqStartTime <= pos.Time())
        {
        iLocMonitorReqHandler.SetPositionInfo(positionInfo);
        }
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:12,代码来源:EPos_CPositionRequest.cpp


示例10: 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);
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:18,代码来源:networkpsy2.cpp


示例11: GetLastKnownPosition

EXPORT_C void RLbsLocMonitorAreaPositioner::GetLastKnownPosition(TPositionInfoBase& aPosInfo,
		TRequestStatus& aStatus) const
		{

		const_cast<RLbsLocMonitorAreaPositioner*>(this)->SetLKPosRequestStatus(&aStatus);
		aStatus = KRequestPending;
		
		TPositionInfo& posinfo =  reinterpret_cast<TPositionInfo &>(aPosInfo);
		TReal64 testlatitude,testlongitude, testaltitude;
		testlatitude = 51.88; testlongitude = 0.45; testaltitude = 0.0;
		TPosition testpos;
 		testpos.SetCoordinate(DUMMY_LAST_KNOWN_POS_LATITUDE1, DUMMY_LAST_KNOWN_POS_LONGITUDE1, DUMMY_LAST_KNOWN_POS_ALTITUDE1);
		posinfo.SetPosition(testpos);

		// as CPeriodic class is used, a higher value of interval ensures we do not receive 
		// multiple callbacks [we would like to complete the timer after the first callback].
		TTimeIntervalMicroSeconds32 delay, interval;
		delay    = 2000000; //2 sec
		interval = 100000000;
		
		// Modify the behaviour of the Location Monitor based on the testcase using the value of the
		// property
		TInt testcase, propRead;
		propRead = iTestLKPosKey.Get(KLocSrvTestSuite, KLbsLocMonitorTestLKPosKey,testcase);
		if (propRead==KErrNone)
			{
			switch(testcase)
				{
				case EGetLKPosNotFound:
					{
					TRequestStatus* pStat = &aStatus;
					User::RequestComplete(pStat, KErrNotFound);
					return;
					}

				case EGetLKPosTimedOut:
					delay = 1000000000;;
					break;
				default:
					break;
				}
			}
		iDelayedLKPosUpdate->Start(delay, interval, TCallBack(LKPosTimerCallback, const_cast<RLbsLocMonitorAreaPositioner*>(this)));
		}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:44,代码来源:lbstestlocmonitorapi.cpp


示例12: CheckPositionInfoL

void CTriggerFireObserver::CheckPositionInfoL( const TLbtTriggerFireInfo& aFireInfo )
    {
     
     TPositionInfo posInfo= aFireInfo.iFiredPositionInfo;
     TPosition pos;
     posInfo.GetPosition(pos);
     TCoordinate firedinfo( pos.Latitude(),pos.Longitude());
     TReal32 distance;
     firedinfo.Distance( iCoordinate,distance);
     
	     if( distance<=iRadiusInMetres )
	     {
	       	User::Leave(KErrGeneral);
	     	
	     }
     
     
     
    }
开发者ID:cdaffara,项目名称:symbiandump-mw2,代码行数:19,代码来源:t_triggerfireobserver.cpp


示例13: switch

// ---------------------------------------------------------
// CTestPsy4Positioner::NotifyPositionUpdate
// 
// (other items were commented in a header).
// ---------------------------------------------------------
//
void CT_LbsTestProxyPsy5Positioner::NotifyPositionUpdate(TPositionInfoBase& aPosInfo, TRequestStatus& aStatus)
	{
    TPositionInfo* posInfo = static_cast<TPositionInfo*> (&aPosInfo);
    TPosition pos;
	pos.SetCoordinate(99, 99, 99);
	posInfo->SetPosition(pos);
	
    TUint32 request = posInfo->UpdateType();
    switch (request)
        {
        case 304:
            iRequestHandler->SetErrorCode(KErrNone);
            break;
        default:
            iRequestHandler->SetErrorCode(KErrUnknown);
            break;
        }

	iRequestHandler->NotifyPositionUpdate(posInfo, &aStatus);
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:26,代码来源:ctlbstestproxypsy5positioner.cpp


示例14: INFO_PRINTF1

void CT_LbsHybridUEAssistedMTLRTimeout::ProcessNetworkPositionUpdate(TUint /*aRequestId*/, const TPositionInfo& aPosInfo)
	{
	if(iState==EPrivacyCheckOk)
		{
		iState=ERefLocReceived;	
		INFO_PRINTF1(_L("&gt;&gt;CT_LbsHybridUEAssistedMTLRTimeout::ProcessNetworkPositionUpdate(RefPosition)"));
		}
	else if(iState==ERefLocReceived)
		{
		// Test for $update,1,2,51.5015,-0.105,50,2,3*
		TPosition getPos;
		aPosInfo.GetPosition(getPos);
		if(getPos.Latitude()==51.5015 && getPos.Longitude()==-0.105 && getPos.Altitude()==50 && getPos.HorizontalAccuracy()==2 && getPos.VerticalAccuracy()==3) 		
			{
			INFO_PRINTF1(_L("&gt;&gt;CT_LbsHybridUEAssistedMTLRTimeout::ProcessNetworkPositionUpdate(GpsPosition)"));
			iState=EGpsLocReceived;	
			}
		}
	ReturnToTestStep();
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:20,代码来源:ctlbshybridueassistedmtlrtimeout.cpp


示例15: empty

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);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:40,代码来源:tlbsutils.cpp


示例16: Cancel

TBool CGpsPositionRequest::FetchCurrentPostionL(TReal& aLatitude, TReal& aLongitude)
    {
    // cancel previous request (just in case)
    Cancel();
    // request current location
    iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
    SetActive();
    // start wait note and wait for request end
    //ShowWaitNoteL();
    // process result
    if (iError == KErrNone)
        {
        // success, return given position
        TPosition pos;
        iPositionInfo.GetPosition(pos);
        aLatitude = pos.Latitude();
        aLongitude = pos.Longitude();
        return ETrue;
        }
    // fail
    return EFalse;
    }
开发者ID:flaithbheartaigh,项目名称:symbianmapnavi,代码行数:22,代码来源:mapgpsengine.cpp


示例17: Verify_PositionIsValid

/**
 *  Verifies that the supplied position is 'reasonable'
 *
 */
EXPORT_C TBool T_LbsUtils::Verify_PositionIsValid(TPositionInfo& aPosInfo)
	{
	TBool valid = TRUE;
	TPosition pos;
	TReal32 alt;
	TReal64 lat, longt;
	
	aPosInfo.GetPosition(pos);
	
	alt = pos.Altitude();
	lat = pos.Latitude();
	longt = pos.Longitude();
	
	// TO DO figure out what values are reasonable here (in Milton somewhere!?)
	// We could use the normal verify posinfo stuff, and check to see if the values are roughly equal.
	// Either update this func (add a parameter) or new func like the compare posinfo func we have
	if(alt == 0 || lat == 0 || longt == 0)
		{
		valid = FALSE;
		}
	
	
	return valid;
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:28,代码来源:tlbsutils.cpp


示例18: INFO_PRINTF1

/** Called at the end of the test to verify the correct position data has been returned to the
	client.
	
	Each test case SHOULD implement a version of this.
*/
void CT_LbsConflictStep_X3PMenuPush::VerifyPosInfos()
	{
	T_LbsUtils utils;
    RPointerArray<TAny>& verifyPosInfoArr = iParent.iSharedData->iVerifyPosInfoArr;
	RPointerArray<TAny>& currPosInfoArr = iParent.iSharedData->iCurrentPosInfoArr;
	TPositionInfo* currPosInfo;
	
	// Verify both the self locate and X3P MOLR position information.
	
	// Verify entry 0 for the self locate. We expect a position containing NaNs.
	currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[0]);
	TPosition pos;
	currPosInfo->GetPosition(pos);
	if (!Math::IsNaN(pos.Latitude()))
		{
		INFO_PRINTF1(_L("Failed test, Position does not contain NANs"));

		SetTestStepResult(EFail);
		}
	if (!Math::IsNaN(pos.Longitude()))
		{
		INFO_PRINTF1(_L("Failed test, Position does not contain NANs"));

		SetTestStepResult(EFail);
		}

	// Verify entry 1 for the X3P. We expect a real location value, compare using the data
	// sent to the test APGS module.
	TPositionInfo* verifyPosInfo = reinterpret_cast<TPositionInfo*>(verifyPosInfoArr[0]);
	currPosInfo = reinterpret_cast<TPositionInfo*>(currPosInfoArr[1]);
	if (!utils.Compare_PosInfo(*verifyPosInfo, *currPosInfo))
		{
		INFO_PRINTF1(_L("Failed test, X3P position incorrect."));
		SetTestStepResult(EFail);
		}
	}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:41,代码来源:ctlbsconflictstepx3pmenupush.cpp


示例19:

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());
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:lcfpsydummy1.cpp


示例20:

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());
    }
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:24,代码来源:lcfpsydummy3.cpp



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ TPositionInfo类代码示例发布时间:2022-05-31
下一篇:
C++ TPoint类代码示例发布时间:2022-05-31
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap