Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Task/rfr 733 filter invalid locations #53

Merged
merged 8 commits into from
Sep 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 0 additions & 136 deletions libs/model/src/main/java/de/cyface/model/CalibrationJob.java

This file was deleted.

27 changes: 21 additions & 6 deletions libs/model/src/main/java/de/cyface/model/RawRecord.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2021 Cyface GmbH
* Copyright 2021-2023 Cyface GmbH
*
* This file is part of the Serialization.
*
Expand All @@ -20,6 +20,12 @@

import org.apache.commons.lang3.Validate;

/**
* {@link GeoLocationRecord} annotated with accuracy, speed and modality.
*
* @author Armin Schnabel
* @version 1.0.0
*/
public class RawRecord extends GeoLocationRecord {

/**
Expand All @@ -32,7 +38,7 @@ public class RawRecord extends GeoLocationRecord {
*/
private double accuracy;
/**
* The traveled speed in meters per second as reported by the geo location system (e.g. GPS, GLONASS, GALILEO) during this recording.
* The traveled speed in meters per second as reported by the geographical location system (e.g. GPS, GLONASS, GALILEO) during this recording.
*/
private double speed;
/**
Expand All @@ -59,15 +65,15 @@ public RawRecord(final MeasurementIdentifier measurementIdentifier, final long t
/**
* Creates a new completely initialized <code>RawRecord</code>.
*
* @param measurementIdentifier The world wide unique identifier of the {@link Measurement} this record belongs to
* @param measurementIdentifier The worldwide unique identifier of the {@link Measurement} this record belongs to
* @param timestamp The timestamp this location was captured on in milliseconds since 1st January 1970 (epoch)
* @param latitude Geographical latitude in coordinates (decimal fraction) raging from -90° (south) to 90° (north)
* @param longitude Geographical longitude in coordinates (decimal fraction) ranging from -180° (west) to 180°
* (east)
* @param elevation The elevation above sea level in meters or null if it could not be calculated
* @param accuracy The measurement accuracy of this location in meters. This accuracy is usually the result of
* imperfect measurement hardware
* @param speed The traveled speed as reported by the geo location system (e.g. GPS, GLONASS, GALILEO) during this
* @param speed The traveled speed as reported by the geographical location system (e.g. GPS, GLONASS, GALILEO) during this
* recording
* @param modality The modality type used while collecting the location or {@code null} if the information is not
* available
Expand Down Expand Up @@ -100,7 +106,7 @@ public final void setAccuracy(double accuracy) {
}

/**
* @return The traveled speed as reported by the geo location system (e.g. GPS, GLONASS, GALILEO) during this
* @return The traveled speed as reported by the geographical location system (e.g. GPS, GLONASS, GALILEO) during this
* recording
*/
public double getSpeed() {
Expand All @@ -126,7 +132,7 @@ public void setAccuracy(int accuracy) {
}

/**
* @param speed The traveled speed as reported by the geo location system (e.g. GPS, GLONASS, GALILEO) during this
* @param speed The traveled speed as reported by the geographical location system (e.g. GPS, GLONASS, GALILEO) during this
* recording
*/
public void setSpeed(double speed) {
Expand All @@ -142,4 +148,13 @@ public void setSpeed(double speed) {
public void setModality(Modality modality) {
this.modality = modality;
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;
if (!super.equals(o)) return false;
RawRecord rawRecord = (RawRecord) o;
return Double.compare(rawRecord.accuracy, accuracy) == 0 && Double.compare(rawRecord.speed, speed) == 0 && modality == rawRecord.modality;
}
hb0 marked this conversation as resolved.
Show resolved Hide resolved
}
Loading