mirror of
https://github.com/GoldenCheetah/GoldenCheetah.git
synced 2026-02-13 08:08:42 +00:00
Fixed unit conversion in CSV importer
This commit is contained in:
committed by
Sean Rhea
parent
9d1ed11186
commit
30b931bedb
@@ -153,6 +153,7 @@ RideFile *CsvFileReader::openRideFile(QFile &file, QStringList &errors) const
|
||||
if (!metric) {
|
||||
km *= KM_PER_MILE;
|
||||
kph *= KM_PER_MILE;
|
||||
alt *= METERS_PER_FOOT;
|
||||
}
|
||||
}
|
||||
else if (iBike) {
|
||||
@@ -174,6 +175,7 @@ RideFile *CsvFileReader::openRideFile(QFile &file, QStringList &errors) const
|
||||
if (!metric) {
|
||||
km *= KM_PER_MILE;
|
||||
kph *= KM_PER_MILE;
|
||||
alt *= METERS_PER_FOOT;
|
||||
}
|
||||
}
|
||||
else {
|
||||
@@ -204,6 +206,7 @@ RideFile *CsvFileReader::openRideFile(QFile &file, QStringList &errors) const
|
||||
if (!metric) {
|
||||
km *= KM_PER_MILE;
|
||||
kph *= KM_PER_MILE;
|
||||
alt *= METERS_PER_FOOT;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
#define KM_PER_MILE 1.609344
|
||||
#define MILES_PER_KM 0.62137119
|
||||
#define FEET_PER_METER 3.2808399
|
||||
#define METERS_PER_FOOT 0.3047999
|
||||
|
||||
#endif // _GC_Units_h
|
||||
|
||||
|
||||
Reference in New Issue
Block a user