# Adafruit GPS Photon problem

**URL:** <https://community.particle.io/t/adafruit-gps-photon-problem/20229>\
**Category:** Troubleshooting\
**Created:** [February 19, 2016, 4:03pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229 "2016-02-19T16:03:47Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![samhendrickx](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/samhendrickx/32/8926_2.png) [@samhendrickx](https://community.particle.io/u/samhendrickx)\
**Post date:** [February 27, 2016, 8:05pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/21 "2016-02-27T20:05:03Z")

</div>

Interesting. Why does the battery helps getting a fix?

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [February 27, 2016, 8:17pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/22 "2016-02-27T20:17:41Z")

</div>

It holds its last position lock in memory so when you power it up next time it already knows where it is and just needs to reconnect to the satellites VS starting from scratch which usually takes quite a bit more time.

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [February 27, 2016, 9:54pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/23 "2016-02-27T21:54:30Z")

</div>

Additionally downloading the GPS almanac (the table where all the satellites are supposed to be where in this very moment and other data to calculate exact position) takes time.  
If it’s not delivered via cell radio and forwarded to the GPS device this data will be downloaded off the satellites with rather limited bandwidth - so it’s best to keep it alive via battery backup.

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 1, 2016, 4:48am UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/24 "2016-03-01T04:48:30Z")

</div>

Regarding “preloading” the GPS almanac; from the module manual:

The AGPS (EPO in flash™) supply the predicated Extended Prediction Orbit data to speed TTFF. Users  
can download the EPO data to GPS engine from the FTP server via internet or wireless network. The  
GPS engine of the module will use the EPO data to assist position calculation when the navigation  
information from satellites is not enough as is the case of weak signal. For more details on EPO, visit  
our website.

I couldn’t find anything on their website. I sent an inquiry, but have not yet gotten a response. I’m not sure exactly how to go about sending this information to the module. Anyone have any experience on this?

---

<div class="post-metadata">

**Author:** ![ScruffR](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/scruffr/32/6952_2.png) [@ScruffR](https://community.particle.io/u/ScruffR)\
**Post date:** [March 1, 2016, 8:18am UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/25 "2016-03-01T08:18:49Z")

</div>

AFAIK someone at Particle (can’t remember if @BDub or @Dave) has already mentioned that they are working on strategies to provide ways to do something like that.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 1, 2016, 2:58pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/26 "2016-03-01T14:58:14Z")

</div>

Yup! I have code to preload time/date and starting location, and I’ve collected info on preloading almanac and EPO and Ephemeris data, as well as good sources of that data. 🙂 My hope is to provide an EPO sample in the coming week or two, and the preload date/time/loc sample today or tomorrow.

I’ll put those examples here - [https://github.com/dmiddlecamp/fancy-asset-tracker](https://github.com/dmiddlecamp/fancy-asset-tracker)

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 1, 2016, 3:34pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/27 "2016-03-01T15:34:34Z")

</div>

@dave Do you know what exactly what data the Adafruit Ultimate GPS is saving when the battery is installed? Is it time, date, and EPO data?

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 1, 2016, 3:40pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/28 "2016-03-01T15:40:57Z")

</div>

In theory the battery should allow the GPS to keep the GPS RTC going, and keep the satellite almanac, and ephemeris data going. In my testing I’m not sure if this only happens after a really good lock or not, I’ve had some trouble getting the battery backup to behave quite like I expect so far.

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 1, 2016, 3:42pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/29 "2016-03-01T15:42:51Z")

</div>

Looking forward to your new GPS code regardless.

The battery has made a decent difference for me. I can usually get a GPS lock inside my garage in 120 seconds or less using the Adafruit Ultimate GPS + battery.

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 1, 2016, 10:32pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/30 "2016-03-01T22:32:34Z")

</div>

@Dave: Excellent!

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 1, 2016, 10:58pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/31 "2016-03-01T22:58:31Z")

</div>

> [@Dave](#):
>
> I have code to preload time/date and starting location...

I didn't see this code in your fancy-asset-tracker. Did I misunderstand?

Also, I've been using the TinyGPS++ library with good results (it seems a little cleaner to me than the Adafruit library): [TinyGPS++&nbsp;|&nbsp;Arduiniana](http://arduiniana.org/libraries/tinygpsplus/)

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 2, 2016, 12:44am UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/32 "2016-03-02T00:44:18Z")

</div>

By the way, I’ve noticed that the number of satellites reported by $GPGGA never exceeds 4. Is that an internal limit of the GPS module (i.e. once it has 4 satellites locked, it won’t bother to use any more, even if it can “see” others)? Has anyone else seen a higher reported value?

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 2, 2016, 3:38pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/33 "2016-03-02T15:38:52Z")

</div>

Hi @Eric24,

Good questions! I haven’t posted the time suggest code yet, will do that soon.

In general, at any given time it’s rare to have more than ~8-9 satellites visible on the horizon. If you use an external antenna, or you have a very clear view of the sky, you should see more. I routinely get 7-9 with my external antenna outdoors facing up on a level surface.

There is a really fantastic gif on wikipedia that relates the visible satellite thing:  
(Wow, that upload really killed the resolution, check it out on wikipedia for a better version)

![](https://us1.discourse-cdn.com/flex026/uploads/particle/original/2X/a/a47facddf281a5b803102c7935449c004538922f.gif)

> **[Global Positioning System | Space segment](https://en.wikipedia.org/wiki/Global_Positioning_System#Space_segment)**
>
> The space segment (SS) is composed of 24 to 32 satellites, or Space Vehicles (SV), in medium Earth orbit, and also includes the payload adapters to the boosters required to launch them into orbit. The GPS design originally called for 24 SVs, eight each in three approximately circular orbits, but this was modified to six orbital planes with four satellites each. The six orbit planes have approximately 55° inclination (tilt relative to the Earth's equator) and are separated by 60° right asc Orbitin...

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 2, 2016, 3:53pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/34 "2016-03-02T15:53:27Z")

</div>

Good info, @Dave

What I’m basing my observation on is a comparison of two cell phones running GPS apps (that show the satellites in view) and the content of the $GPGGA sentence from the G.Top GPS module. I’ve never seen that value be greater than 4. When you are seeing 7-9 satellites, exactly where are you seeing this?

I look forward to seeing the time suggest code. Does that include the EPO upload? I was working on both of these, but couldn’t find any information anywhere on even how to start, so go nowhere.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 2, 2016, 3:55pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/35 "2016-03-02T15:55:37Z")

</div>

The EPO upload will be more complex, and will take me longer. But I’ve found data, and most of the specs needed to base the work on. It took quite a lot of searching to find the relevant information, but I’m happy to share if you want to build that part 🙂

edit: just added suggest-time-and-place to the repo

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 2, 2016, 4:24pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/36 "2016-03-02T16:24:52Z")

</div>

@Dave: Sure, if you have any info, let me take a look and see what’s involved. I’m happy to help if I can.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 2, 2016, 4:32pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/37 "2016-03-02T16:32:03Z")

</div>

Heya @Eric24,

Sure thing! If you have time and want to take a stab at it, here’s the info I collected so far:

> **[dmiddlecamp/fancy-asset-tracker](https://github.com/dmiddlecamp/fancy-asset-tracker/tree/master/ephemeris-loader)**
>
> fancy-asset-tracker - a place for fancy asset tracker demos!

Checkout the last few lines in that readme, it links to another awesome project that actually implemented this. I was going to use that as inspiration to build a version that does this in firmware. Ideally I’d love for the firmware to be able to do this on the fly / in the wild – without needing to be tethered to a laptop, etc.

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 2, 2016, 4:32pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/38 "2016-03-02T16:32:30Z")

</div>

@Dave: New code looks good–simple and straightforward. It was the PMTK740 and PMTK741 commands that I couldn’t find in the docs I was looking in. But it’s my interpretation that if you are sending PMTK741, then PMTK740 isn’t also needed (i.e. if you have only time, send PMTK740; if you have time and coordinates, send PMTK741).

On the topic of coordinates, my ultimate objective is to use the ublox CellLocate service (currently not working, as described on another thread) to determine the initial fix and use that to seed the GPS.

---

<div class="post-metadata">

**Author:** ![Eric24](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/eric24/32/9031_2.png) [@Eric24](https://community.particle.io/u/Eric24)\
**Post date:** [March 2, 2016, 4:34pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/39 "2016-03-02T16:34:49Z")

</div>

@Dave: Good info; lots to digest!

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 2, 2016, 4:41pm UTC](https://community.particle.io/t/adafruit-gps-photon-problem/20229/40 "2016-03-02T16:41:54Z")

</div>

Agreed, I wanted the time/location demo to use CellLocate, but I didn’t have that example yet.

Yes, finding those NMEA commands was HARD, probably didn’t need both, but I wanted to include both in case someone had time, but not starting location. 🙂

Thanks,  
David

[Previous page](https://community.particle.io/t/adafruit-gps-photon-problem/20229.md?page=1)

[Next page](https://community.particle.io/t/adafruit-gps-photon-problem/20229.md?page=3)
