MQTT Position Messages with NaN values

Hey everyone,

I’ve been developing a system that integrates the position data with a cloud service through an MQTT bridge. I’ve successfully set up the system and recently tested it in the following conditions:

  • On a 20x40 meters area;
  • Initially 4 anchors on each corner and by the end with 8;
  • 2 tags, both with the stationary and normal update rate settings set to 100ms/10Hz;
  • 1 gateway, bridging the topics from the local MQTT broker in the gateway with my remote one with mosquitto’s built in bridging capabilities.

I tested about 12 situations, where I placed the gateway in various spots to test its reliability. In every situation about 1/3 of the messages received had NaN as location values, something like this:

{ 
  "position": { 
    "x": NaN,
    "y": NaN,
    "z": NaN,
    "quality": 0
  },
  "superFrameNumber": 941
}

Whilst the remaining 2/3 were correct positions.

I tried using the mobile app and the position data is always consistent through this method, which leads me to believe that the problem might be with the MQTT side of things. The only solution which comes to mind is adding one or more gateways to the system so, I wanted to ask if anyone has any tips about this problem?

Thanks,
Nuno