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:
Dirk Hohndel 2015-07-14 11:35:04 -07:00
parent e82f8ea565
commit 8c0d0de2e6
6 changed files with 38 additions and 1 deletions

View file

@ -149,6 +149,11 @@ static inline double mm_to_feet(int mm)
return mm * 0.00328084;
}
static inline double m_to_mile(int m)
{
return m / 1609.344;
}
static inline unsigned long feet_to_mm(double feet)
{
return rint(feet * 304.8);