2020-01-09 10:44:32 +01:00
|
|
|
/* Copyright (C) 2017-2020 Carsten Pfeiffer, Daniele Gobbetti
|
2018-06-25 18:35:46 +02:00
|
|
|
|
|
|
|
This file is part of Gadgetbridge.
|
|
|
|
|
|
|
|
Gadgetbridge is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU Affero General Public License as published
|
|
|
|
by the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
Gadgetbridge is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU Affero General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Affero General Public License
|
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2017-10-19 21:52:38 +02:00
|
|
|
package nodomain.freeyourgadget.gadgetbridge.model;
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
2019-01-26 15:52:40 +01:00
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
2017-10-19 21:52:38 +02:00
|
|
|
// https://www8.garmin.com/xmlschemas/TrackPointExtensionv1.xsd
|
|
|
|
/*
|
|
|
|
<trkpt lat="54.8591470" lon="-1.5754310">
|
|
|
|
<ele>29.2</ele>
|
|
|
|
<time>2015-07-26T07:43:42Z</time>
|
|
|
|
<extensions>
|
|
|
|
<gpxtpx:TrackPointExtension>
|
|
|
|
<gpxtpx:atemp>11</gpxtpx:atemp>
|
|
|
|
<gpxtpx:hr>92</gpxtpx:hr>
|
|
|
|
<gpxtpx:cad>0</gpxtpx:cad>
|
|
|
|
</gpxtpx:TrackPointExtension>
|
|
|
|
</extensions>
|
|
|
|
</trkpt>
|
|
|
|
*/
|
|
|
|
public class ActivityPoint {
|
|
|
|
private Date time;
|
|
|
|
private GPSCoordinate location;
|
|
|
|
private int heartRate;
|
2023-12-12 15:12:00 +01:00
|
|
|
private float speed = -1;
|
2017-10-19 21:52:38 +02:00
|
|
|
|
|
|
|
// e.g. to describe a pause during the activity
|
|
|
|
private @Nullable String description;
|
|
|
|
|
|
|
|
public ActivityPoint() {
|
|
|
|
}
|
|
|
|
|
|
|
|
public ActivityPoint(Date time) {
|
|
|
|
this.time = time;
|
|
|
|
}
|
|
|
|
|
|
|
|
public Date getTime() {
|
|
|
|
return time;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setTime(Date time) {
|
|
|
|
this.time = time;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Nullable
|
|
|
|
public String getDescription() {
|
|
|
|
return description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setDescription(@Nullable String description) {
|
|
|
|
this.description = description;
|
|
|
|
}
|
|
|
|
|
|
|
|
public GPSCoordinate getLocation() {
|
|
|
|
return location;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setLocation(GPSCoordinate location) {
|
|
|
|
this.location = location;
|
|
|
|
}
|
|
|
|
|
|
|
|
public int getHeartRate() {
|
|
|
|
return heartRate;
|
|
|
|
}
|
|
|
|
|
|
|
|
public void setHeartRate(int heartRate) {
|
|
|
|
this.heartRate = heartRate;
|
|
|
|
}
|
|
|
|
|
2023-12-12 15:12:00 +01:00
|
|
|
public float getSpeed() {
|
|
|
|
return speed;
|
2017-10-19 21:52:38 +02:00
|
|
|
}
|
|
|
|
|
2023-12-12 15:12:00 +01:00
|
|
|
public void setSpeed(float speed) {
|
|
|
|
this.speed = speed;
|
2017-10-19 21:52:38 +02:00
|
|
|
}
|
|
|
|
}
|