diff --git a/src/main/java/ru/r2cloud/lora/loraat/LoraAtSerialClient.java b/src/main/java/ru/r2cloud/lora/loraat/LoraAtSerialClient.java index 4d66c7b3..13010339 100644 --- a/src/main/java/ru/r2cloud/lora/loraat/LoraAtSerialClient.java +++ b/src/main/java/ru/r2cloud/lora/loraat/LoraAtSerialClient.java @@ -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); diff --git a/src/main/java/ru/r2cloud/satellite/reader/LoraAtReader.java b/src/main/java/ru/r2cloud/satellite/reader/LoraAtReader.java index 948de741..c3ff003b 100644 --- a/src/main/java/ru/r2cloud/satellite/reader/LoraAtReader.java +++ b/src/main/java/ru/r2cloud/satellite/reader/LoraAtReader.java @@ -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()); diff --git a/src/test/java/ru/r2cloud/lora/loraat/LoraAtSerialClientTest.java b/src/test/java/ru/r2cloud/lora/loraat/LoraAtSerialClientTest.java index 62f9c206..05c69ffb 100644 --- a/src/test/java/ru/r2cloud/lora/loraat/LoraAtSerialClientTest.java +++ b/src/test/java/ru/r2cloud/lora/loraat/LoraAtSerialClientTest.java @@ -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