Skip to content

Commit

Permalink
fix timestamps for lora observations
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Dec 29, 2023
1 parent f6b6316 commit 4e0eb6e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public LoraResponse stopObservation() {
curFrame.setRssi((short) Float.parseFloat(parts[1]));
curFrame.setSnr(Float.parseFloat(parts[2]));
curFrame.setFrequencyError((long) Float.parseFloat(parts[3]));
curFrame.setTimestamp(Long.parseLong(parts[4]));
curFrame.setTimestamp(Long.parseLong(parts[4]) * 1000);
frames.add(curFrame);
}
result.setFrames(frames);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public IQData start() throws InterruptedException {

public static RawBeacon convert(LoraFrame frame) {
RawBeacon result = new RawBeacon();
result.setBeginMillis(frame.getTimestamp() * 1000);
result.setBeginMillis(frame.getTimestamp());
result.setRawData(frame.getData());
RxMetadata meta = new RxMetadata();
meta.setFrequencyError((long) frame.getFrequencyError());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void testSuccessStop() {
assertEquals(9655, frame.getFrequencyError());
assertEquals(-137, frame.getRssi());
assertEquals(3.2, frame.getSnr(), 0.0001f);
assertEquals(1605980902, frame.getTimestamp());
assertEquals(1605980902000L, frame.getTimestamp());
}

@Test
Expand Down

0 comments on commit 4e0eb6e

Please sign in to comment.