Understanding the Return Type of Tizen.Location.GetDistanceTo Method

Original Created Aug 20, 2019 | Regeneration Apr 22, 2026

I'm trying to find the distance between two locations in meters using the Tizen.Location class. I found the GetDistanceTo and GetDistanceBetween methods, but there's no documentation about the unit of measurement for the returned distance.

Can someone confirm:

  1. What unit does GetDistanceTo/GetDistanceBetween return (is it meters)?
  2. Is this the correct method to use for calculating distance between two GPS coordinates?
  3. I'm seeing unexpected distance values (greater than 5 meters) even when testing with very close points - is this normal behavior?

Problem Understanding

The user wants to:

  1. Understand the measurement unit of Tizen's location distance methods
  2. Verify if these methods are suitable for GPS coordinate distance calculation
  3. Investigate why they're getting unexpectedly large distance values for nearby points

Solution Methods

  1. Measurement Unit Confirmation:

    • Both GetDistanceTo() and GetDistanceBetween() return distance in meters
    • This is confirmed in the native API documentation (though missing in C# API docs)
  2. Method Suitability:

    • These methods are indeed the correct way to calculate distance between GPS coordinates
    • They use the Haversine formula for great-circle distance calculation
  3. GPS Accuracy Considerations:

    • GPS hardware has inherent limitations in accuracy
    • Even when stationary, GPS readings can "jump" by several meters
    • This is normal behavior due to:
      • Atmospheric conditions
      • Signal reflection
      • Hardware limitations
      • Satellite geometry

Code Examples

// Example usage of GetDistanceBetween
double distance = Location.GetDistanceBetween(
    previousLatitude, 
    previousLongitude,
    currentLatitude,
    currentLongitude);

// Example with distance threshold check
if (distance > 5) // 5 meters
{
    // Save new location
    SaveLocationInformation();
    previouslySavedLocation = currentLocation;
}

Additional Tips

  • For better accuracy, consider:
    • Using a larger distance threshold (e.g., 10-15 meters)
    • Implementing location averaging over multiple readings
    • Combining with other sensors (like accelerometer) to detect actual movement
  • This behavior doesn't need to be reported as a bug as it's a hardware limitation
  • The API team will improve the C# documentation to clarify the measurement unit

Customize your cookie preferences

You can enable or disable non-essential cookies. Essential cookies are always on to ensure the site works properly and to keep you signed in.

Necessary

These cookies are necessary for the website to function properly and cannot be switched off. They help with things like logging in and setting your privacy preferences.

Always on

Analytics

These cookies help us improve the site by tracking which pages are most popular and how visitors move around the site.

Enable analytics cookies
Public Forum Public Forum
Employees only. Please sign in with your company account.