# \[SOLVED\] Setup Tabs GPS sensor & Ubidots

**URL:** <https://www.thethingsnetwork.org/forum/t/solved-setup-tabs-gps-sensor-ubidots/34486>\
**Category:** End Devices (Nodes)\
**Created:** [February 17, 2020, 4:22pm UTC](https://www.thethingsnetwork.org/forum/t/solved-setup-tabs-gps-sensor-ubidots/34486 "2020-02-17T16:22:51Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![arjanvanb](https://www.thethingsnetwork.org/forum/user_avatar/www.thethingsnetwork.org/arjanvanb/32/46626_2.png) [@arjanvanb](https://www.thethingsnetwork.org/forum/u/arjanvanb)\
**Post date:** [February 18, 2020, 11:17am UTC](https://www.thethingsnetwork.org/forum/t/solved-setup-tabs-gps-sensor-ubidots/34486/6 "2020-02-18T11:17:19Z")

</div>

In fact, later I found I already posted a slightly simpler approach for a decoder for the same device:

> [@Decoding Trackio (Tabs Object Locator) GPS data with Node-RED JS](https://www.thethingsnetwork.org/forum/t/decoding-trackio-tabs-object-locator-gps-data-with-node-red-js/24276/4):
>
> Probably easier to shift 4 and 3 bytes too far to the left, and shift it back, as the bitwise operator `>>` is the [sign-propagating right shift](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Bitwise_Operators#Right_shift):
> 
> ```javascript
> // LSB, ignoring the 4 and 3 high bits, and sign-extending to 32 bits
> // to support negative values, by shifting 4 or 3 bytes too far to
> // the left (discarding those bits, as only 32 bits are preserved),
> // followed by a sign-propagating right shift:
> var lat = bytes[3] | bytes[4]<<8 | bytes[5]<<16 | bytes[6]<<28>>4;
> var lng = bytes[7] | bytes[8]<<8 | bytes[9]<<16 | bytes[10]<<27>>3;
> 
> ```

I guess a 7:16 PM post is better than a 0:17 AM post. 😉

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/solved-setup-tabs-gps-sensor-ubidots/34486)._
