mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-07 10:47:02 +01:00
Huami: do not write elevation to GPX if we have a base altitude of -20000
( #2001 )
This commit is contained in:
parent
d3aaef4948
commit
f2bfab0491
@ -130,7 +130,9 @@ public class GPXExporter implements ActivityTrackExporter {
|
|||||||
// lon and lat attributes do not have an explicit namespace
|
// lon and lat attributes do not have an explicit namespace
|
||||||
ser.attribute(null, "lon", formatLocation(location.getLongitude()));
|
ser.attribute(null, "lon", formatLocation(location.getLongitude()));
|
||||||
ser.attribute(null, "lat", formatLocation(location.getLatitude()));
|
ser.attribute(null, "lat", formatLocation(location.getLatitude()));
|
||||||
|
if (location.getAltitude() != -20000) {
|
||||||
ser.startTag(NS_GPX_URI, "ele").text(formatLocation(location.getAltitude())).endTag(NS_GPX_URI, "ele");
|
ser.startTag(NS_GPX_URI, "ele").text(formatLocation(location.getAltitude())).endTag(NS_GPX_URI, "ele");
|
||||||
|
}
|
||||||
ser.startTag(NS_GPX_URI, "time").text(DateTimeUtils.formatIso8601UTC(point.getTime())).endTag(NS_GPX_URI, "time");
|
ser.startTag(NS_GPX_URI, "time").text(DateTimeUtils.formatIso8601UTC(point.getTime())).endTag(NS_GPX_URI, "time");
|
||||||
String description = point.getDescription();
|
String description = point.getDescription();
|
||||||
if (description != null) {
|
if (description != null) {
|
||||||
|
@ -179,7 +179,9 @@ public class HuamiActivityDetailsParser {
|
|||||||
|
|
||||||
baseLongitude += longitudeDelta;
|
baseLongitude += longitudeDelta;
|
||||||
baseLatitude += latitudeDelta;
|
baseLatitude += latitudeDelta;
|
||||||
|
if (baseAltitude != -20000) {
|
||||||
baseAltitude += altitudeDelta;
|
baseAltitude += altitudeDelta;
|
||||||
|
}
|
||||||
|
|
||||||
GPSCoordinate coordinate = new GPSCoordinate(
|
GPSCoordinate coordinate = new GPSCoordinate(
|
||||||
convertHuamiValueToDecimalDegrees(baseLongitude),
|
convertHuamiValueToDecimalDegrees(baseLongitude),
|
||||||
|
Loading…
Reference in New Issue
Block a user