diff options
author | Charles Curley <charlescurley@users.noreply.github.com> | 2017-12-02 03:47:19 -0700 |
---|---|---|
committer | Pierre GRANDIN <pgrandin@users.noreply.github.com> | 2017-12-02 02:47:19 -0800 |
commit | 1d104b283248c3f45096618c58bef8429d37bcfb (patch) | |
tree | 156cc33f8d814b0e729d7a07f3e7cd7c6fad8e17 /navit/navigation.h | |
parent | 683426ad2722099881518ddfc4c2bac52a196527 (diff) | |
download | navit-1d104b283248c3f45096618c58bef8429d37bcfb.tar.gz |
fix:gtk:Fix imperial factors. (#380)
Another go at fixing imperial measures. This is ready for testing on a different machine, but not for a pull request.
Also, some improvements in some comments.
Diffstat (limited to 'navit/navigation.h')
-rw-r--r-- | navit/navigation.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/navit/navigation.h b/navit/navigation.h index 789d4fcbf..0651dbc79 100644 --- a/navit/navigation.h +++ b/navit/navigation.h @@ -23,8 +23,16 @@ #define FEET_PER_METER 3.2808399 #define FEET_PER_MILE 5280 #define KILOMETERS_TO_MILES 0.62137119 /* Kilometers to miles */ -#define METERS_PER_MILE 1/(KILOMETERS_TO_MILES/1000.00) -#define MPS_TO_KPH 3.6 /* Meters per second to klicks/hr */ + +/* It appears that distances to be displayed, such as distances to + * maneuvers, are in meters. Multiply that by METERS_PER_MILE and you + * have miles. */ +#define METERS_TO_MILES (KILOMETERS_TO_MILES/1000.0) /* Meters to miles */ +/* #define METERS_PER_MILE (1000.0/KILOMETERS_TO_MILES) */ + +/* Meters per second to kilometers per hour. GPSD delivers speeds in + * meters per second. */ +#define MPS_TO_KPH 3.6 #ifdef __cplusplus extern "C" { |