rakwireless / rui_lora_node_payload_decoder Goto Github PK
View Code? Open in Web Editor NEWThis decoder can be used for all LoRa nodes which are built based on RUI.
License: MIT License
This decoder can be used for all LoRa nodes which are built based on RUI.
License: MIT License
Hi RAK Team
I found a bug in the GPS6digitPrecision Decoder for TTN. If I use it as you published here in the git
https://github.com/RAKWireless/RUI_LoRa_node_payload_decoder/blob/master/RUISensorDataDecoder_GPS6digitPrecison_for_TTN.js
With the Payload: 01 88 07 29 C2 01 22 7B 00 D8 72 08 02 01 87 03 71 00 27 FF 86 04 12 05 86 00 40 00 7C FF C4 09 02 08 52 0A 02 00 0F 0B 02 F8 35
The out put will be:
{
"altitude": "19131274.2m",
"latitude": "120.177153°",
"longitude": "578.486488°",
"magnetometer_y": "0.15μT",
"magnetometer_z": "-19.95μT"
}
With the standard decoder it is - this one https://github.com/RAKWireless/RUI_LoRa_node_payload_decoder/blob/master/RUISensorDataDecoder_for_TTN.js:
{
"acceleration_x": "0.039g",
"acceleration_y": "-0.122g",
"acceleration_z": "1.042g",
"altitude": "554.1m",
"battery": "3.91V",
"gyroscope_x": "0.64°/s",
"gyroscope_y": "1.24°/s",
"gyroscope_z": "-0.6°/s",
"latitude": "46.9442°",
"longitude": "7.4363°",
"magnetometer_x": "21.3μT",
"magnetometer_y": "0.15μT",
"magnetometer_z": "-19.95μT"
}
I did found the error in the JS file and it is in the case 0x0188:// GPS - The decoder should not change the Substring value! The Payload size is always the same - as defined by the openmobilealliance.org the precision is only for the decoder
If I try to use the decoder I get:
{
"code": 3,
"message": "error:pkg/applicationserver:field_value (invalid value of field `formatters.up_formatter_parameter`)",
"details": [
{
"@type": "type.googleapis.com/ttn.lorawan.v3.ErrorDetails",
"namespace": "pkg/applicationserver",
"name": "field_value",
"message_format": "invalid value of field `{field}`",
"attributes": {
"field": "formatters.up_formatter_parameter"
},
"correlation_id": "98a4150f65d04bff8c86a4765e384506",
"cause": {
"namespace": "pkg/applicationserver",
"name": "formatter_script_too_large",
"message_format": "formatter script size exceeds maximum allowed size",
"attributes": {
"max_size": 4096,
"size": 4207
},
"code": 3
},
"code": 3
}
],
"request_details": {
"url": "/as/applications/iiie-trackers/devices/wistrio-tracker-1",
"method": "put",
"stack_component": "as"
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.