mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Location completer: give distance if known
If both the displayed dive and the dive site which is shown as a potential completion have a GPS fix, indicate the distance. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e82f8ea565
commit
8c0d0de2e6
6 changed files with 38 additions and 1 deletions
|
@ -37,7 +37,7 @@ uint32_t get_dive_site_uuid_by_gps(degrees_t latitude, degrees_t longitude, stru
|
|||
}
|
||||
|
||||
// Calculate the distance in meters between two coordinates.
|
||||
static unsigned int get_distance(degrees_t lat1, degrees_t lon1, degrees_t lat2, degrees_t lon2)
|
||||
unsigned int get_distance(degrees_t lat1, degrees_t lon1, degrees_t lat2, degrees_t lon2)
|
||||
{
|
||||
double lat1_r = udeg_to_radians(lat1.udeg);
|
||||
double lat2_r = udeg_to_radians(lat2.udeg);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue