mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-27 21:24:47 +01:00
Compare commits
No commits in common. "22c7ea7de64886b3571e7719a22c8bb88e357124" and "364867101fdc4ca1d5404002448a37a694a67c78" have entirely different histories.
22c7ea7de6
...
364867101f
@ -374,32 +374,32 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="221"/>
|
<location filename="../src/GUI/gui.cpp" line="221"/>
|
||||||
<source>Open...</source>
|
<source>Open...</source>
|
||||||
<translation>Megnyitás…</translation>
|
<translation>Megnyitás...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="228"/>
|
<location filename="../src/GUI/gui.cpp" line="228"/>
|
||||||
<source>Open directory...</source>
|
<source>Open directory...</source>
|
||||||
<translation>Könyvtár megnyitása…</translation>
|
<translation>Könyvtár megnyitása...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="233"/>
|
<location filename="../src/GUI/gui.cpp" line="233"/>
|
||||||
<source>Print...</source>
|
<source>Print...</source>
|
||||||
<translation>Nyomtatás…</translation>
|
<translation>Nyomtatás...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="239"/>
|
<location filename="../src/GUI/gui.cpp" line="239"/>
|
||||||
<source>Export to PDF...</source>
|
<source>Export to PDF...</source>
|
||||||
<translation>Exportálás PDF-be…</translation>
|
<translation>Exportálás PDF-be...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="246"/>
|
<location filename="../src/GUI/gui.cpp" line="246"/>
|
||||||
<source>Export to PNG...</source>
|
<source>Export to PNG...</source>
|
||||||
<translation>Exportálás PNG-be…</translation>
|
<translation>Exportálás PNG-be...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="253"/>
|
<location filename="../src/GUI/gui.cpp" line="253"/>
|
||||||
<source>Close</source>
|
<source>Close</source>
|
||||||
<translation>Bezárás</translation>
|
<translation>Fájl bezárása</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="260"/>
|
<location filename="../src/GUI/gui.cpp" line="260"/>
|
||||||
@ -409,7 +409,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="266"/>
|
<location filename="../src/GUI/gui.cpp" line="266"/>
|
||||||
<source>Statistics...</source>
|
<source>Statistics...</source>
|
||||||
<translation>Statisztika…</translation>
|
<translation>Statisztika...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="276"/>
|
<location filename="../src/GUI/gui.cpp" line="276"/>
|
||||||
@ -419,7 +419,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="288"/>
|
<location filename="../src/GUI/gui.cpp" line="288"/>
|
||||||
<source>Load POI file...</source>
|
<source>Load POI file...</source>
|
||||||
<translation>POI fájl betöltése…</translation>
|
<translation>POI fájl betöltése...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="292"/>
|
<location filename="../src/GUI/gui.cpp" line="292"/>
|
||||||
@ -459,12 +459,12 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="339"/>
|
<location filename="../src/GUI/gui.cpp" line="339"/>
|
||||||
<source>Load map...</source>
|
<source>Load map...</source>
|
||||||
<translation>Térkép betöltése…</translation>
|
<translation>Térkép betöltése...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="344"/>
|
<location filename="../src/GUI/gui.cpp" line="344"/>
|
||||||
<source>Load map directory...</source>
|
<source>Load map directory...</source>
|
||||||
<translation>Térképmappa megadása…</translation>
|
<translation>Térképmappa megadása...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="347"/>
|
<location filename="../src/GUI/gui.cpp" line="347"/>
|
||||||
@ -683,7 +683,7 @@
|
|||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="604"/>
|
<location filename="../src/GUI/gui.cpp" line="604"/>
|
||||||
<source>Options...</source>
|
<source>Options...</source>
|
||||||
<translation>Beállítások…</translation>
|
<translation>Beállítások...</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../src/GUI/gui.cpp" line="611"/>
|
<location filename="../src/GUI/gui.cpp" line="611"/>
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <QDataStream>
|
#include <QDataStream>
|
||||||
#include <QTimeZone>
|
|
||||||
#include "common/tifffile.h"
|
#include "common/tifffile.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
#include "exifparser.h"
|
#include "exifparser.h"
|
||||||
@ -214,7 +213,7 @@ bool EXIFParser::parseTIFF(QFile *file, QVector<Waypoint> &waypoints)
|
|||||||
GPSIFD.value(GPSAltitudeRef)));
|
GPSIFD.value(GPSAltitudeRef)));
|
||||||
wp.setTimestamp(QDateTime(QDate::fromString(text(tiff,
|
wp.setTimestamp(QDateTime(QDate::fromString(text(tiff,
|
||||||
GPSIFD.value(GPSDateStamp)), "yyyy:MM:dd"), time(tiff,
|
GPSIFD.value(GPSDateStamp)), "yyyy:MM:dd"), time(tiff,
|
||||||
GPSIFD.value(GPSTimeStamp)), QTimeZone::utc()));
|
GPSIFD.value(GPSTimeStamp)), Qt::UTC));
|
||||||
wp.setDescription(text(tiff, IFD0.value(ImageDescription)).trimmed());
|
wp.setDescription(text(tiff, IFD0.value(ImageDescription)).trimmed());
|
||||||
|
|
||||||
waypoints.append(wp);
|
waypoints.append(wp);
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <QtEndian>
|
#include <QtEndian>
|
||||||
#include <QTimeZone>
|
|
||||||
#include "GUI/format.h"
|
#include "GUI/format.h"
|
||||||
#include "fitparser.h"
|
#include "fitparser.h"
|
||||||
|
|
||||||
@ -308,7 +307,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
switch (field->id) {
|
switch (field->id) {
|
||||||
case 1:
|
case 1:
|
||||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(
|
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(
|
||||||
val.toUInt() + 631065600, QTimeZone::utc()));
|
val.toUInt() + 631065600, Qt::UTC));
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
waypoint.rcoordinates().setLat(
|
waypoint.rcoordinates().setLat(
|
||||||
@ -381,7 +380,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
} else if (def->globalId == RECORD) {
|
} else if (def->globalId == RECORD) {
|
||||||
if (ctx.trackpoint.coordinates().isValid()) {
|
if (ctx.trackpoint.coordinates().isValid()) {
|
||||||
ctx.trackpoint.setTimestamp(QDateTime::fromSecsSinceEpoch(
|
ctx.trackpoint.setTimestamp(QDateTime::fromSecsSinceEpoch(
|
||||||
ctx.timestamp + 631065600, QTimeZone::utc()));
|
ctx.timestamp + 631065600, Qt::UTC));
|
||||||
ctx.trackpoint.setRatio(ctx.ratio);
|
ctx.trackpoint.setRatio(ctx.ratio);
|
||||||
ctx.segment.append(ctx.trackpoint);
|
ctx.segment.append(ctx.trackpoint);
|
||||||
ctx.trackpoint = Trackpoint();
|
ctx.trackpoint = Trackpoint();
|
||||||
@ -392,7 +391,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
} else if (def->globalId == LOCATION) {
|
} else if (def->globalId == LOCATION) {
|
||||||
if (waypoint.coordinates().isValid()) {
|
if (waypoint.coordinates().isValid()) {
|
||||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
||||||
+ 631065600, QTimeZone::utc()));
|
+ 631065600, Qt::UTC));
|
||||||
ctx.waypoints.append(waypoint);
|
ctx.waypoints.append(waypoint);
|
||||||
}
|
}
|
||||||
} else if (def->globalId == LAP && trigger >= 0) {
|
} else if (def->globalId == LAP && trigger >= 0) {
|
||||||
@ -402,7 +401,7 @@ bool FITParser::parseData(CTX &ctx, const MessageDefinition *def)
|
|||||||
else
|
else
|
||||||
waypoint.setName("Lap " + QString::number(++ctx.laps));
|
waypoint.setName("Lap " + QString::number(++ctx.laps));
|
||||||
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
waypoint.setTimestamp(QDateTime::fromSecsSinceEpoch(ctx.timestamp
|
||||||
+ 631065600, QTimeZone::utc()));
|
+ 631065600, Qt::UTC));
|
||||||
if (trigger != 7 || ctx.laps > 1)
|
if (trigger != 7 || ctx.laps > 1)
|
||||||
ctx.waypoints.append(waypoint);
|
ctx.waypoints.append(waypoint);
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <QTimeZone>
|
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
#include "igcparser.h"
|
#include "igcparser.h"
|
||||||
|
|
||||||
@ -161,7 +160,7 @@ bool IGCParser::readBRecord(CTX &ctx, const char *line, int len,
|
|||||||
ctx.time = time;
|
ctx.time = time;
|
||||||
|
|
||||||
Trackpoint t(Coordinates(lon, lat));
|
Trackpoint t(Coordinates(lon, lat));
|
||||||
t.setTimestamp(QDateTime(ctx.date, ctx.time, QTimeZone::utc()));
|
t.setTimestamp(QDateTime(ctx.date, ctx.time, Qt::UTC));
|
||||||
t.setElevation(ele);
|
t.setElevation(ele);
|
||||||
segment.append(t);
|
segment.append(t);
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <QTimeZone>
|
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
#include "nmeaparser.h"
|
#include "nmeaparser.h"
|
||||||
|
|
||||||
@ -283,8 +282,7 @@ bool NMEAParser::readRMC(CTX &ctx, const char *line, int len,
|
|||||||
|
|
||||||
if (!date.isNull()) {
|
if (!date.isNull()) {
|
||||||
if (ctx.date.isNull() && !ctx.time.isNull() && !segment.isEmpty())
|
if (ctx.date.isNull() && !ctx.time.isNull() && !segment.isEmpty())
|
||||||
segment.last().setTimestamp(QDateTime(date, ctx.time,
|
segment.last().setTimestamp(QDateTime(date, ctx.time, Qt::UTC));
|
||||||
QTimeZone::utc()));
|
|
||||||
ctx.date = date;
|
ctx.date = date;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -292,7 +290,7 @@ bool NMEAParser::readRMC(CTX &ctx, const char *line, int len,
|
|||||||
if (valid && !ctx.GGA && c.isValid()) {
|
if (valid && !ctx.GGA && c.isValid()) {
|
||||||
Trackpoint t(c);
|
Trackpoint t(c);
|
||||||
if (!ctx.date.isNull() && !time.isNull())
|
if (!ctx.date.isNull() && !time.isNull())
|
||||||
t.setTimestamp(QDateTime(ctx.date, time, QTimeZone::utc()));
|
t.setTimestamp(QDateTime(ctx.date, time, Qt::UTC));
|
||||||
segment.append(t);
|
segment.append(t);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -365,7 +363,7 @@ bool NMEAParser::readGGA(CTX &ctx, const char *line, int len,
|
|||||||
if (c.isValid()) {
|
if (c.isValid()) {
|
||||||
Trackpoint t(c);
|
Trackpoint t(c);
|
||||||
if (!(ctx.time.isNull() || ctx.date.isNull()))
|
if (!(ctx.time.isNull() || ctx.date.isNull()))
|
||||||
t.setTimestamp(QDateTime(ctx.date, ctx.time, QTimeZone::utc()));
|
t.setTimestamp(QDateTime(ctx.date, ctx.time, Qt::UTC));
|
||||||
if (!std::isnan(ele))
|
if (!std::isnan(ele))
|
||||||
t.setElevation(ele - gh);
|
t.setElevation(ele - gh);
|
||||||
segment.append(t);
|
segment.append(t);
|
||||||
|
@ -46,7 +46,7 @@ bool OMDParser::readHeaderFile(const QString &omdPath, Header &hdr)
|
|||||||
quint8 avgHr = buffer[12];
|
quint8 avgHr = buffer[12];
|
||||||
quint8 maxHr = buffer[13];
|
quint8 maxHr = buffer[13];
|
||||||
|
|
||||||
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m), QTimeZone::utc());
|
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m), Qt::UTC);
|
||||||
if (!date.isValid()) {
|
if (!date.isValid()) {
|
||||||
qWarning("%s: invalid date", qPrintable(path));
|
qWarning("%s: invalid date", qPrintable(path));
|
||||||
return false;
|
return false;
|
||||||
@ -80,7 +80,7 @@ bool OMDParser::readF1(const char *chunk, const Header &hdr, Sequence &seq,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
t.setTimestamp(QDateTime(hdr.date.date(),
|
t.setTimestamp(QDateTime(hdr.date.date(),
|
||||||
hdr.date.time().addSecs(sec), QTimeZone::utc()));
|
hdr.date.time().addSecs(sec), Qt::UTC));
|
||||||
if (hdr.elevation)
|
if (hdr.elevation)
|
||||||
t.setElevation(alt);
|
t.setElevation(alt);
|
||||||
|
|
||||||
@ -200,7 +200,7 @@ bool GHPParser::readHeaderFile(const QString &ghpPath, Header &hdr)
|
|||||||
quint8 avgHr = buffer[61];
|
quint8 avgHr = buffer[61];
|
||||||
quint8 maxHr = buffer[60];
|
quint8 maxHr = buffer[60];
|
||||||
|
|
||||||
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m, s), QTimeZone::utc());
|
QDateTime date(QDate(Y + 2000, M, D), QTime(h, m, s), Qt::UTC);
|
||||||
if (!date.isValid()) {
|
if (!date.isValid()) {
|
||||||
qWarning("%s: invalid date", qPrintable(path));
|
qWarning("%s: invalid date", qPrintable(path));
|
||||||
return false;
|
return false;
|
||||||
@ -230,7 +230,7 @@ bool GHPParser::readF0(const char *chunk, const Header &hdr, int &time,
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
t.setTimestamp(QDateTime(hdr.date.date(),
|
t.setTimestamp(QDateTime(hdr.date.date(),
|
||||||
hdr.date.time().addMSecs(time * 100), QTimeZone::utc()));
|
hdr.date.time().addMSecs(time * 100), Qt::UTC));
|
||||||
t.setSpeed(speed / 360.0);
|
t.setSpeed(speed / 360.0);
|
||||||
t.setElevation(alt);
|
t.setElevation(alt);
|
||||||
if (hdr.hr)
|
if (hdr.hr)
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
#ifndef ONMOVEPARSERS_H
|
#ifndef ONMOVEPARSERS_H
|
||||||
#define ONMOVEPARSERS_H
|
#define ONMOVEPARSERS_H
|
||||||
|
|
||||||
#include <QTimeZone>
|
|
||||||
#include "parser.h"
|
#include "parser.h"
|
||||||
|
|
||||||
class OMDParser : public Parser
|
class OMDParser : public Parser
|
||||||
@ -15,8 +14,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
struct Header
|
struct Header
|
||||||
{
|
{
|
||||||
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0),
|
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0), Qt::UTC)),
|
||||||
QTimeZone::utc())), elevation(true), hr(true) {}
|
elevation(true), hr(true) {}
|
||||||
|
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
bool elevation;
|
bool elevation;
|
||||||
@ -51,8 +50,8 @@ public:
|
|||||||
private:
|
private:
|
||||||
struct Header
|
struct Header
|
||||||
{
|
{
|
||||||
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0),
|
Header() : date(QDateTime(QDate(1970, 1, 1), QTime(0, 0), Qt::UTC)),
|
||||||
QTimeZone::utc())), hr(true) {}
|
hr(true) {}
|
||||||
|
|
||||||
QDateTime date;
|
QDateTime date;
|
||||||
bool hr;
|
bool hr;
|
||||||
|
Loading…
Reference in New Issue
Block a user