Skip to content
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
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ public LocationOffsetter() {
* The first number "seen" is used as offset and returned as absolute number. Subsequent numbers are returned in the
* diff-format, i.e. as the relative difference to the previous number passed.
*
* TODO: When we support nullable elevations, we need to ensure we implement it the same as communicated in STAD-827.
* - 100, 101, null, 200, 201, null, null → 100, +1, null, 200, +1, null, null
*
* @param location the data point to be converted.
* @return the data point in the offset-format
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ public static de.cyface.protos.model.LocationRecords locations(final List<RawRec
l.getLongitude(), l.getSpeed(), l.getAccuracy());
final Formatter.Location offsets = offsetter.offset(formatted);

// TODO: When we support nullable elevations, we need to ensure we implement it the same as communicated in STAD-827.
// - 100, 101, null, 200, 201, null, null → 100, +1, null, 200, +1, null, null
builder.addTimestamp(offsets.getTimestamp())
.addLatitude(offsets.getLatitude())
.addLongitude(offsets.getLongitude())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ public class Offsetter {
* The first number "seen" is used as offset and returned as absolute number. Subsequent numbers are returned in the
* diff-format, i.e. as the relative difference to the previous number passed.
*
* TODO: When we support nullable elevations, we need to ensure we implement it the same as communicated in STAD-827.
* - 100, 101, null, 200, 201, null, null → 100, +1, null, 200, +1, null, null
*
* @param absoluteNumber the number to be returned in the diff-format
* @return the difference to the previous number or the absolute number for the first number.
*/
Expand Down