# Library Error Message

**URL:** <https://www.thethingsnetwork.org/forum/t/library-error-message/39211>\
**Category:** LMIC\
**Created:** [August 13, 2020, 2:57pm UTC](https://www.thethingsnetwork.org/forum/t/library-error-message/39211 "2020-08-13T14:57:19Z")\
**Posts on this page:** 1\
**Showing post:** 46

<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:** [August 17, 2020, 1:51pm UTC](https://www.thethingsnetwork.org/forum/t/library-error-message/39211/46 "2020-08-17T13:51:20Z")

</div>

> [@JohnLaidler](#):
>
> coords[1] = LPP\_GPS

Where is this `LPP_GPS` defined? If defined in some library then I’d assume it would also provide functions such as, say, `addGPS`? Also, if properly encoded using Cayenne LPP then TTN Console can decode for you out of the box, if you select the proper payload format:

![TTN Console](https://www.thethingsnetwork.org/forum/uploads/default/original/3X/e/6/e61554120fe9c7d0c754a1ede91916e1d17506ff.png)

That said, assuming `coords` is some 8 bits data type, then it seems your code looks okay. You don’t need to use the channel in `bytes[0]` if your device only has a single GPS receiver. Also, you don’t _need_ to validate `bytes[1]` if you know what you’re sending… In fact, you could also not use Cayenne LPP and not send those 2 bytes, and use a decoder like you did. Altitude could then maybe use fewer bytes too. In all, that would only limit the total payload from 13 + 11 = 24 bytes to about 13 + 7 or 8 = 20 or 21 bytes. (A LoRaWAN packet always needs at least 13 bytes of overhead.)

Aside: please see [How do I format my forum post? [HowTo]](https://www.thethingsnetwork.org/forum/t/how-do-i-format-my-forum-post-howto/8735)

---

_[View the full topic](https://www.thethingsnetwork.org/forum/t/library-error-message/39211)._
