diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/GlobalFITMessage.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/GlobalFITMessage.java index c0138ea9c..432a5a834 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/GlobalFITMessage.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/GlobalFITMessage.java @@ -106,8 +106,18 @@ public class GlobalFITMessage { new FieldDefinitionPrimitive(19, BaseType.UINT8, "max_cadence"), new FieldDefinitionPrimitive(22, BaseType.UINT16, "total_ascent"), new FieldDefinitionPrimitive(23, BaseType.UINT16, "total_descent"), + new FieldDefinitionPrimitive(25, BaseType.UINT16, "first_lap_index"), + new FieldDefinitionPrimitive(26, BaseType.UINT16, "num_laps"), + new FieldDefinitionPrimitive(29, BaseType.SINT32, "nec_latitude", FieldDefinitionFactory.FIELD.COORDINATE), + new FieldDefinitionPrimitive(30, BaseType.SINT32, "nec_longitude", FieldDefinitionFactory.FIELD.COORDINATE), + new FieldDefinitionPrimitive(31, BaseType.SINT32, "swc_latitude", FieldDefinitionFactory.FIELD.COORDINATE), + new FieldDefinitionPrimitive(32, BaseType.SINT32, "swc_longitude", FieldDefinitionFactory.FIELD.COORDINATE), + new FieldDefinitionPrimitive(38, BaseType.SINT32, "end_latitude", FieldDefinitionFactory.FIELD.COORDINATE), + new FieldDefinitionPrimitive(39, BaseType.SINT32, "end_longitude", FieldDefinitionFactory.FIELD.COORDINATE), new FieldDefinitionPrimitive(110, BaseType.STRING, 64, "sport_profile_name"), - new FieldDefinitionPrimitive(178, BaseType.UINT16, "estimated_sweat_loss"), + new FieldDefinitionPrimitive(124, BaseType.UINT32, "enhanced_avg_speed", 1000, 0), // m/s + new FieldDefinitionPrimitive(125, BaseType.UINT32, "enhanced_max_speed", 1000, 0), // m/s + new FieldDefinitionPrimitive(178, BaseType.UINT16, "estimated_sweat_loss"), // ml new FieldDefinitionPrimitive(253, BaseType.UINT32, "timestamp", FieldDefinitionFactory.FIELD.TIMESTAMP) )); diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/messages/FitSession.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/messages/FitSession.java index a4b7e0f27..41284081c 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/messages/FitSession.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/devices/garmin/fit/messages/FitSession.java @@ -110,11 +110,61 @@ public class FitSession extends RecordData { return (Integer) getFieldByNumber(23); } + @Nullable + public Integer getFirstLapIndex() { + return (Integer) getFieldByNumber(25); + } + + @Nullable + public Integer getNumLaps() { + return (Integer) getFieldByNumber(26); + } + + @Nullable + public Double getNecLatitude() { + return (Double) getFieldByNumber(29); + } + + @Nullable + public Double getNecLongitude() { + return (Double) getFieldByNumber(30); + } + + @Nullable + public Double getSwcLatitude() { + return (Double) getFieldByNumber(31); + } + + @Nullable + public Double getSwcLongitude() { + return (Double) getFieldByNumber(32); + } + + @Nullable + public Double getEndLatitude() { + return (Double) getFieldByNumber(38); + } + + @Nullable + public Double getEndLongitude() { + return (Double) getFieldByNumber(39); + } + @Nullable public String getSportProfileName() { return (String) getFieldByNumber(110); } + @Nullable + public Double getEnhancedAvgSpeed() { + return (Double) getFieldByNumber(124); + } + + @Nullable + public Double getEnhancedMaxSpeed() { + return (Double) getFieldByNumber(125); + } + @Nullable public Integer getEstimatedSweatLoss() { return (Integer) getFieldByNumber(178);