×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Jul 2009
    Posts
    14

    HDOP or HorizontalAccuracy()?

    Hello~. I am writing a post again^^.
    Ok. to throw away inaccurate location coordinates, I need to check DOP(dilution of precision) of location coordinates obtained right after location request to RPositionServer. But TPosition has just HorizontalAccuracy(), VerticalAccuracy() in metres, and those are not DOP I guess.
    I am supposed to throw away any location data of which DOP value is greater than 10 or something(maybe 20). From Series 60 Location Acquisition API Specification, HPositionGenericInfo class seems to be able to give me horizontal/vertical DOP.
    The thing is I don't know how to use HPositionGenericInfo class and I tried but I couldn't find any example of it. Because my application uses TPosition class for latitude, longitude, but I can use TPosition.
    Ok here's the question.
    Could you let me know how to use HPositionGenericInfo class, otherwise how to deal with HorizontalAccuracy(), VerticalAccuracy() in TPosition to throw away location data which is quite inaccurate based on mathematical/scientific rationale?

  2. #2
    Registered User
    Join Date
    Jul 2008
    Posts
    5

    Re: HDOP or HorizontalAccuracy()?

    The usage is something like: 1) construct HPositionGenericInfo, 2) set requested fields, 3) pass it to NotifyPositionUpdate just like you do with TPositionInfo, 4) read the fields.

    Code example (copypasted from my code, adjust the fields to your needs):
    1)
    HPositionGenericInfo *iGenericInfo;
    iGenericInfo = HPositionGenericInfo::NewL();

    2)
    iGenericInfo->SetRequestedField(EPositionFieldSatelliteNumInView);
    iGenericInfo->SetRequestedField(EPositionFieldSatelliteNumUsed);

    for fields and their types see: http://www.forum.nokia.com/infocente...eldids_8h.html

    3)
    iPositioner.NotifyPositionUpdate( *iGenericInfo, iStatus );

    4)
    TInt8 nSUsed, nSInView;
    if (iGenericInfo->GetValue(EPositionFieldSatelliteNumInView, nSInView) == KErrNone &&
    iGenericInfo->GetValue(EPositionFieldSatelliteNumUsed, nSUsed) == KErrNone)
    {
    // use it.
    }
    note that you can easily static_cast it to TPositionInfo and get TPosition from that, so you use the generic info class just to get the additional attributes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •