This topic has not yet been rated - Rate this topic

GetAltitudeError method

Retrieves the altitude error, in meters.

Syntax


HRESULT GetAltitudeError(
  [out]  DOUBLE *pAltitudeError
);

Parameters

pAltitudeError [out]

Address of a DOUBLE that receives the altitude error, in meters. May be NULL.

Return value

Possible values include, but are not limited to, those in the following table.

Return valueDescription
S_OK

The method returned successfully.

HRESULT_FROM_WIN32(ERROR_NO_DATA)

The location report does not include data for the requested field. This result is returned when the location sensor does not support altitude.

 

Examples

The following example demonstrates how to call GetAltitudeError. Altitude is an optional field in latitude/longitude reports, so GetAltitudeError may not always return data.


DOUBLE altitudeError = 0;
// Print the Altitude Error
if (SUCCEEDED(spLatLongReport->GetAltitudeError(&altitudeError)))
{
    wprintf(L"Altitude Error: %f\n", altitudeError);
}
else
{
    // Altitude Error is optional and may not be available
    wprintf(L"Altitude Error: Not available.\n");
}


Requirements

Minimum supported client

Windows 7 [desktop apps only]

Minimum supported server

None supported [desktop apps only]

Client

Windows 7

Header

LocationApi.h

DLL

LocationAPI.dll

 

 

Send comments about this topic to Microsoft

Build date: 10/27/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.