icapps / flutter-background-location-tracker

Flutter background location tracker plugin. (Android / iOS)
MIT License
31 stars 32 forks source link

What are the units? #60

Closed JonathanWilbur closed 1 year ago

JonathanWilbur commented 1 year ago

In this file, you have documentation comments, but what are the units for values like latitude and altitude? Is it meters? Feet?

https://github.com/icapps/flutter-background-location-tracker/blob/b7b8ee1622f81dd3faa15f93964424a0900404bf/lib/src/model/background_location_update_data.dart#L6-L15

ikbendewilliam commented 1 year ago

Latitude and longitude are in degrees.

The primary unit in which longitude and latitude are given is degrees (°). There are 360° of longitude (180° E ↔ 180° W) and 180° of latitude (90° N ↔ 90° S). Each degree can be broken into 60 minutes (’). Each minute can be divided into 60 seconds (”). For finer accuracy, fractions of seconds given by a decimal point are used. A base-sixty notation is called a sexagesimal notation.

We do return it as a simple double, but it's still in degrees. See astro.unl.edu

The horizontalAccuracy is in meters, as is the Altitude.