# Airvantage GPS position

**URL:** <https://forum.sierrawireless.com/t/airvantage-gps-position/12003>\
**Category:** Uncategorized\
**Created:** [March 5, 2015, 2:29pm UTC](https://forum.sierrawireless.com/t/airvantage-gps-position/12003 "2015-03-05T14:29:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![krima919](https://avatars.discourse-cdn.com/v4/letter/k/94ad74/32.png) [@krima919](https://forum.sierrawireless.com/u/krima919)\
**Post date:** [March 5, 2015, 2:29pm UTC](https://forum.sierrawireless.com/t/airvantage-gps-position/12003/1 "2015-03-05T14:29:08Z")

</div>

It seems to be a bug in the airvantage application. To be able to use the map functionality in the AVMS portal the longitude and latitude must be supplied in the format xx.xxxxxx. From AVMS I see that airvantage app provide longitude and latitude in format x.xxxxxxxE7.

I did a quick fix for apps/airvantage/le\_tree\_hdlr/extvars.c. For the longitude I did the change below and it seems to be the correct format so the location functionality in AVMS is working.

`//varPtr->value.d = longitude;
char slongitude[8];
double table[8]={10, 1, 0.1, 0.01, 0.001, 0.0001, 0.00001, 0.000001};
double dlongitude = 0;
int i;
sprintf(slongitude,"%d",longitude);
for(i = 0; i < 8; i++)
{
   dlongitude = dlongitude + (slongitude[i] -'0')*table[i];
}
varPtr->value.d = dlongitude;`

---

<div class="post-metadata">

**Author:** ![esun](https://avatars.discourse-cdn.com/v4/letter/e/8e7dd6/32.png) [@esun](https://forum.sierrawireless.com/u/esun)\
**Post date:** [March 19, 2015, 9:25pm UTC](https://forum.sierrawireless.com/t/airvantage-gps-position/12003/2 "2015-03-19T21:25:08Z")

</div>

Thanks!
