From 01e8e1b1143f3b795417c17b2e433cd3d5cc35c6 Mon Sep 17 00:00:00 2001 From: Archer <45237523+theArcher73@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:39:05 +0200 Subject: [PATCH 1/2] Update SenseCAP_T1000_TTN_Decoder.js --- T1000/TTN/SenseCAP_T1000_TTN_Decoder.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js b/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js index 8044f1b..efe7841 100644 --- a/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js +++ b/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js @@ -37,7 +37,9 @@ function decodeUplink (input) { } } if (elements.length > 0) { - decoded.messages.push(elements) + elements.push(element); + if (element.measurementId === "4197") { decoded.longitude = element.measurementValue }; + if (element.measurementId === "4198") { decoded.latitude = element.measurementValue } } } // decoded.messages = measurement @@ -843,4 +845,4 @@ function loraWANV2PositiveDataFormat (str, divisor = 1) { let strReverse = bigEndianTransform(str) let str2 = toBinary(strReverse) return parseInt(str2, 2) / divisor -} \ No newline at end of file +} From 95019b705cf30c727d75026a0fcae4f36a4b2c4a Mon Sep 17 00:00:00 2001 From: Archer <45237523+theArcher73@users.noreply.github.com> Date: Thu, 12 Oct 2023 11:42:01 +0200 Subject: [PATCH 2/2] Update SenseCAP_T1000_TTN_Decoder.js Longitude/ latidtude added to decoded_payload in order to use ttnmapper.org --- T1000/TTN/SenseCAP_T1000_TTN_Decoder.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js b/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js index efe7841..a3e1e8a 100644 --- a/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js +++ b/T1000/TTN/SenseCAP_T1000_TTN_Decoder.js @@ -1,3 +1,6 @@ +// Added Longitude/ Latitude in decoded_payload in order to use ttnmapper.org +// 03.10.2023 / steffen@grau-zone.online + function decodeUplink (input) { const bytes = input['bytes'] const fport = parseInt(input['fPort'])