-
Notifications
You must be signed in to change notification settings - Fork 1.2k
GPS Issues
My GPS does not seem to be working
The GPS can take several minutes to get a first fix. Place the watch outside in the open and dont move around. You can use one of the Apps to switch the GPS on like GPSinfo or GPStouch (Bangle 2).
How can I tell if my GPS is working
The simplest way to do this is to connect to the watch through the IDE and then type the following commands in the left hand window.
Bangle.on('GPS', (f)=>{console.log(f);} );
Bangle.setGPSPower(1);
The first command sets up a function that is called whenever the GPS sends out an event to the Bangle. The code simply prints out the fix object sent by the GPS to the Bangle.
The second command powers on the GPS.
If the GPS is working you should see timestamps coming back from the GPS. In the example below we can see 3 events from the GPS. The first response has no data at all except the hdop value of 25.5 The 2nd response has a timestamp - this tells us that the GPS chip is responding and its clock is set If the GPS clock is not set it might take a lot longer for the GPS to get a fix. The 3rd response is 1 second later and basically the same as response 2.
{ "lat": NaN, "lon": NaN, "alt": NaN, "speed": 0,
"course": 0, "time": undefined, "satellites": 0, "fix": 0, "hdop": 25.5 }
{ "lat": NaN, "lon": NaN, "alt": NaN, "speed": NaN,
"course": NaN,
"time": Date: Wed Dec 1 2021 00:31:38 GMT+0000,
"satellites": 0, "fix": 0, "hdop": 25.5 }
{ "lat": NaN, "lon": NaN, "alt": NaN, "speed": NaN,
"course": NaN,
"time": Date: Wed Dec 1 2021 00:31:39 GMT+0000,
"satellites": 0, "fix": 0, "hdop": 25.5 }
The same check can be done using the GPStouch app in that the timestamp at the bottom of the screen will show 00:00:00 before the GPS has responded but once the GPS has sent an event to the app, the app will display the timestamp sent in the GPS fix data.