float LocationGetVerticalAccuracy();


Gets the current accuracy (in meters) of altitude readings.


Return Value


Returns a non-zero value if the call was successful, zero otherwise.




LocationGetVerticalAccuracy() returns the accuracy of altitude in meters.


Vertical accuracy data is not available on all devices, as it requires a GPS radio.


Windows Simulator NOTE: To provide values for the Windows Simulator, be sure to edit C:\DragonFireSDK\DragonFireSDK.ini and modify the value for VerticalAccuracy in the Location section.


NOTE: It is recommended to call LocationMonitorLocation() prior to calling LocationGetVerticalAccuracy().  This gives the device time to begin receiving more and more accurate location data prior to getting location data.  Subsequent calls to LocationGetVerticalAccuracy() may become more accurate over time as the device pinpoints your location.




Available in DragonFireSDK 1.4 and later on devices with GPS.




#include "DragonFireSDK.h"


int MyFont;

int VerticalAccuracyText;

char TextBuffer[100];


void AppMain()




  // Begin monitoring location



  MyFont = FontAdd("Helvetica", "Regular", 24, 0x00FF00);

  VerticalAccuracyText = TextAdd(10, 10, "Vertical Accuracy:", MyFont);




void OnTimer()


  float verticalAccuracy;


  verticalAccuracy = LocationGetVerticalAccuracy();


  sprintf(TextBuffer, "Vertical Accuracy: %fm", verticalAccuracy);

  TextSetText(VerticalAccuracyText, TextBuffer);




void AppExit()