Merge lp:~hopet/igotu2gpx/extended-gpx into lp:igotu2gpx

Proposed by Michael Hofmann
Status: Needs review
Proposed branch: lp:~hopet/igotu2gpx/extended-gpx
Merge into: lp:igotu2gpx
Diff against target: 64 lines (+38/-1)
1 file modified
src/gpxexporter/gpxexporter.cpp (+38/-1)
To merge this branch: bzr merge lp:~hopet/igotu2gpx/extended-gpx
Reviewer Review Type Date Requested Status
Michael Hofmann Needs Fixing
Review via email: mp+19374@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Hofmann (mh21) wrote :

Export EHPE as HDOP in gpx

Revision history for this message
Michael Hofmann (mh21) wrote :

I think the extensions should be in another namespace similar to what trekbuddy is doing, maybe igotu:...? Don't know whether this needs a dtd though. Otherwise the patch looks good to me.

review: Needs Fixing
Revision history for this message
hopet (hopet) wrote :

So - should I move it into the namespace? Talking about the DTD, I guess that if we make it a separate namespace, the DTD should be created. As it is done now, the extensions are free to be filled in according to the GPX specs and that was the reason why I haven't use any custom namespace for now.

Unmerged revisions

183. By Petr Holub <hopet@alik>

GPX extensions.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/gpxexporter/gpxexporter.cpp'
2--- src/gpxexporter/gpxexporter.cpp 2009-10-26 19:31:00 +0000
3+++ src/gpxexporter/gpxexporter.cpp 2010-02-15 23:31:11 +0000
4@@ -115,6 +115,24 @@
5 << "</time>\n"
6 << xmlIndent(2) << "<sat>" << point.satellites().count()
7 << "</sat>\n"
8+ << xmlIndent(2) << "<extensions>\n"
9+ << xmlIndent(3) << "<ehpe unit=\"m\">" << point.ehpe()
10+ << "</ehpe>\n"
11+ << xmlIndent(3) << "<course>" << point.course() << "</course>\n"
12+ << xmlIndent(3) << "<msv-qcn>" << point.msvsQcn()
13+ << "</msv-qcn>\n"
14+ << xmlIndent(3) << "<satellites>";
15+ Q_FOREACH (unsigned satellite, point.satellites())
16+ out << QString::fromLatin1(" %1").arg(satellite);
17+ out << "</satellites>\n"
18+ << xmlIndent(3) << "<timeout>" << point.timeout()
19+ << "</timeout>\n"
20+ << xmlIndent(3) << "<weight>" << point.weightCriteria()
21+ << "</weight>\n"
22+ << xmlIndent(3) << "<sleeptime>" << point.sleepTime()
23+ << "</sleeptime>\n"
24+ << xmlIndent(3) << "<flags>" << point.flags() << "</flags>\n"
25+ << xmlIndent(2) << "</extensions>\n"
26 << xmlIndent(1) << "</wpt>\n";
27 }
28 }
29@@ -125,7 +143,7 @@
30 if (!tracksAsSegments)
31 out << xmlIndent(1) << "<trk>\n";
32 out << xmlIndent(2) << "<trkseg>\n";
33- Q_FOREACH (const IgotuPoint &point, track)
34+ Q_FOREACH (const IgotuPoint &point, track) {
35 out << xmlIndent(3) << "<trkpt "
36 << qSetRealNumberPrecision(6)
37 << "lat=\"" << point.latitude() << "\" "
38@@ -138,7 +156,26 @@
39 << "</sat>\n"
40 << xmlIndent(4) << "<speed>" << point.speed() / 3.6
41 << "</speed>\n"
42+ << xmlIndent(4) << "<extensions>\n"
43+ << xmlIndent(5) << "<ehpe unit=\"m\">" << point.ehpe()
44+ << "</ehpe>\n"
45+ << xmlIndent(5) << "<course>" << point.course() << "</course>\n"
46+ << xmlIndent(5) << "<msv-qcn>" << point.msvsQcn()
47+ << "</msv-qcn>\n"
48+ << xmlIndent(5) << "<satellites>";
49+ Q_FOREACH (unsigned satellite, point.satellites())
50+ out << QString::fromLatin1(" %1").arg(satellite);
51+ out << "</satellites>\n"
52+ << xmlIndent(5) << "<timeout>" << point.timeout()
53+ << "</timeout>\n"
54+ << xmlIndent(5) << "<weight>" << point.weightCriteria()
55+ << "</weight>\n"
56+ << xmlIndent(5) << "<sleeptime>" << point.sleepTime()
57+ << "</sleeptime>\n"
58+ << xmlIndent(5) << "<flags>" << point.flags() << "</flags>\n"
59+ << xmlIndent(4) << "</extensions>\n"
60 << xmlIndent(3) << "</trkpt>\n";
61+ }
62 out << xmlIndent(2) << "</trkseg>\n";
63 if (!tracksAsSegments)
64 out << xmlIndent(1) << "</trk>\n";

Subscribers

People subscribed via source and target branches