mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2024-11-15 22:49:26 +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
|
||||
ser.attribute(null, "lon", formatLocation(location.getLongitude()));
|
||||
ser.attribute(null, "lat", formatLocation(location.getLatitude()));
|
||||
ser.startTag(NS_GPX_URI, "ele").text(formatLocation(location.getAltitude())).endTag(NS_GPX_URI, "ele");
|
||||
if (location.getAltitude() != -20000) {
|
||||
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");
|
||||
String description = point.getDescription();
|
||||
if (description != null) {
|
||||
|
@ -179,7 +179,9 @@ public class HuamiActivityDetailsParser {
|
||||
|
||||
baseLongitude += longitudeDelta;
|
||||
baseLatitude += latitudeDelta;
|
||||
baseAltitude += altitudeDelta;
|
||||
if (baseAltitude != -20000) {
|
||||
baseAltitude += altitudeDelta;
|
||||
}
|
||||
|
||||
GPSCoordinate coordinate = new GPSCoordinate(
|
||||
convertHuamiValueToDecimalDegrees(baseLongitude),
|
||||
|
Loading…
Reference in New Issue
Block a user