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
Changes from 1 commit
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
21 changes: 20 additions & 1 deletion libs/model/src/main/kotlin/de/cyface/model/CalibrationJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,15 @@ import java.util.UUID
* A [Job] which contains details about filtered data during calibration.
*
* @author Armin Schnabel
* @version 2.0.1
* @version 2.1.0
* @since 2.3.1
*/
@Suppress("unused") // Part of the API
class CalibrationJob : Job {
/**
* `true` when the measurement contains processable tracks.
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var isProcessable: Boolean
private set

Expand All @@ -44,12 +45,21 @@ class CalibrationJob : Job {
/**
* The number of locations which were filtered due to a rotated device.
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var rotatedLocations = 0
private set

/**
* The number of locations which where filtered due to invalid speed, accuracy or time gaps.
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var invalidLocations = 0
private set
hb0 marked this conversation as resolved.
Show resolved Hide resolved

/**
* The number of locations which were filtered during interpolation.
*/
@Suppress("MemberVisibilityCanBePrivate") // Part of the API
var nonInterpolatableLocations = 0
private set

Expand Down Expand Up @@ -99,6 +109,15 @@ class CalibrationJob : Job {
return this
}

/**
* @param invalidLocations The number of locations which where filtered due to invalid speed, accuracy or time gaps.
* @return This for chaining.
*/
fun setInvalidLocations(invalidLocations: Int): CalibrationJob {
this.invalidLocations = invalidLocations
return this
}

/**
* @param processable `true` when the measurement contains processable tracks.
* @return This for chaining.
Expand Down