Fixed unit conversion in CSV importer

This commit is contained in:
Thomas Weichmann
2009-12-24 00:11:50 -05:00
committed by Sean Rhea
parent 9d1ed11186
commit 30b931bedb
2 changed files with 4 additions and 0 deletions

View File

@@ -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;
}
}

View File

@@ -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