Seeed-Solution / SenseCAP-Decoder

19 stars 7 forks source link

add longitude/ latitude to support ttnmapper.org #1

Open theArcher73 opened 11 months ago

Jessie219-web commented 11 months ago

Hi, thanks for creating a PR to contribute to this decoder, but it looks like you added the wrong place, should add it on line 36:

for (let element of message) {
            if (element.errorCode) {
                decoded.err = element.errorCode
                decoded.errMessage = element.error
            } else {
                if (element.measurementId === '4197') {
                    decoded.longitude = element.measurementValue
                }
                if (element.measurementId === '4198') {
                    decoded.latitude = element.measurementValue
                }
                elements.push(element)
            }
        }
theArcher73 commented 11 months ago

Hi,I have only copied the two lines from my TTN into the code of the fork of your decoder to send them to you. Either I was lucky and the two lines work there too (which I don't really think) or I slipped in one line while pasting.Anyway, you know your code better, put it where it fits and have fun!Afterwards I thought, you could also deliver the code commented, so with one line above:// to use the TTNMapper.org please remove the comment for the following lines codeSteffenVon meinem iPhone gesesetAm 13.10.2023 um 04:34 schrieb Jessie @.***>: Hi, thanks for creating a PR to contribute to this decoder, but it looks like you added the wrong place, should add it on line 36: for (let element of message) { if (element.errorCode) { decoded.err = element.errorCode decoded.errMessage = element.error } else { if (element.measurementId === '4197') { decoded.longitude = element.measurementValue } if (element.measurementId === '4198') { decoded.latitude = element.measurementValue } elements.push(element) } }

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: @.***>

Wlanfr3ak commented 7 months ago

Hi, the Problem with ttnmapper is that we need a value for precise of the data with satellite count or accuracy value. So if you have lat and lon its even not working. Sensecap needs a firmware update and send this data too. My Wish then: Height, Satellite Count and HDOP etc.