Giter VIP home page Giter VIP logo

rui_lora_node_payload_decoder's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

rui_lora_node_payload_decoder's Issues

Decoder for GPS6digitPrecison is broken

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

Can not use decoder in The Tings Stack (v3)

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"
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.