Fix gps parsing

The argument index used to pull in the translated hemisphere letters was
incorrect.

Fixes #418

Signed-off-by: Gopichand Paturi <gopichandpaturi@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
g1g19 2014-03-03 22:31:13 +05:30 committed by Dirk Hohndel
parent 9b0817596d
commit 917ce5aff5

View file

@ -136,7 +136,7 @@ bool parseGpsText(const QString &gps_text, double *latitude, double *longitude)
} else if (gps_text.count(QChar('"')) == 2) {
gpsStyle = SECONDS;
regExp = QString("\\s*([NS%1%2])\\s*(\\d+)[" UTF8_DEGREE "\\s]+(\\d+)[\'\\s]+(\\d+)([,\\.](\\d+))?[^EW%3%4]*"
"([EW%6%7])\\s*(\\d+)[" UTF8_DEGREE "\\s]+(\\d+)[\'\\s]+(\\d+)([,\\.](\\d+))?")
"([EW%5%6])\\s*(\\d+)[" UTF8_DEGREE "\\s]+(\\d+)[\'\\s]+(\\d+)([,\\.](\\d+))?")
.arg(tr("N"))
.arg(tr("S"))
.arg(tr("E"))
@ -146,7 +146,7 @@ bool parseGpsText(const QString &gps_text, double *latitude, double *longitude)
} else if (gps_text.count(QChar('\'')) == 2) {
gpsStyle = MINUTES;
regExp = QString("\\s*([NS%1%2])\\s*(\\d+)[" UTF8_DEGREE "\\s]+(\\d+)([,\\.](\\d+))?[^EW%3%4]*"
"([EW%6%7])\\s*(\\d+)[" UTF8_DEGREE "\\s]+(\\d+)([,\\.](\\d+))?")
"([EW%5%6])\\s*(\\d+)[" UTF8_DEGREE "\\s]+(\\d+)([,\\.](\\d+))?")
.arg(tr("N"))
.arg(tr("S"))
.arg(tr("E"))