2015-12-19 20:23:07 +01:00
|
|
|
#ifndef UNITS_H
|
|
|
|
#define UNITS_H
|
|
|
|
|
|
|
|
enum Units {
|
|
|
|
Metric,
|
2018-02-11 23:51:57 +01:00
|
|
|
Imperial,
|
|
|
|
Nautical
|
2015-12-19 20:23:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
#define M2KM 0.001000000000 // m -> km
|
|
|
|
#define M2MI 0.000621371192 // m -> mi
|
2018-02-11 23:51:57 +01:00
|
|
|
#define M2NMI 0.000539956803 // m -> nmi
|
2015-12-19 20:23:07 +01:00
|
|
|
#define M2FT 3.280839900000 // m -> ft
|
|
|
|
#define MS2KMH 3.600000000000 // m/s -> km/h
|
|
|
|
#define MS2MIH 2.236936290000 // m/s -> mi/h
|
2018-02-11 23:51:57 +01:00
|
|
|
#define MS2KN 1.943844490000 // m/s -> kn
|
2016-01-14 00:37:51 +01:00
|
|
|
#define FT2MI 0.000189393939 // ft -> mi
|
2016-05-27 22:45:58 +02:00
|
|
|
#define MM2IN 0.039370100000 // mm -> in
|
2016-09-19 00:56:10 +02:00
|
|
|
#define H2S 0.000277777778 // h -> s
|
|
|
|
#define MIN2S 0.016666666667 // min -> s
|
2016-01-14 00:37:51 +01:00
|
|
|
|
2018-02-11 23:51:57 +01:00
|
|
|
#define KMINM 1000.0 // 1 km in m
|
|
|
|
#define MIINFT 5280.0 // 1 mi in ft
|
|
|
|
#define NMIINFT 6076.11549 // 1 nm in ft
|
|
|
|
#define MIINM 1609.344 // 1 mi in m
|
2018-02-12 08:23:38 +01:00
|
|
|
#define NMIINM 1852.0 // 1 nmi in m
|
2018-02-11 23:51:57 +01:00
|
|
|
#define MININS 60.0 // 1 min in s
|
|
|
|
#define HINS 3600.0 // 1 hins
|
2015-12-19 20:23:07 +01:00
|
|
|
|
2016-12-07 21:38:36 +01:00
|
|
|
#define C2FS 1.8 // Celsius to Farenheit - scale
|
|
|
|
#define C2FO 32.0 // Celsius to Farenheit - offset
|
2016-06-16 20:47:32 +02:00
|
|
|
|
2016-02-13 12:13:56 +01:00
|
|
|
#define UNIT_SPACE QString::fromUtf8("\xE2\x80\x89")
|
2016-02-12 10:29:18 +01:00
|
|
|
|
2015-12-19 20:23:07 +01:00
|
|
|
#endif // UNITS_H
|