I am trying to get accurate GPS data. I noticed the lat lon was not accurate and when I ran this command it says the GPS and mode are off so I ran a “card.location.mode”, “mode”: “periodic”.
{“req”: “card.location”}
{
“status”: “GPS is off {gps-inactive}”,
“mode”: “off”,
“lat”: 41.91852750000001,
“lon”: -72.68678515625,
“dop”: 20,
“time”: 1745233528
}
{“req”: “card.location.mode”, “mode”: “periodic”}
but after several minutes it says mode=“periodic”, but the GPS still says Off.
{
“status”: “GPS is off {gps-inactive}”,
“mode”: “periodic”,
“lat”: 41.89525749999996,
“lon”: -72.67134765624999,
“dop”: 21,
“time”: 1770993740
}
{“req”: “card.location.mode”}
{“mode”:“periodic”}
Also the red LED on the notecard is flashing about once per second, not sure if that is related ?
I am testing this at home using the flat antenna it came with, I have tested other GPS devices here with that style antenna and never had a problem connecting.
then after a minute it is back to inactive:
{“req”: “card.location”}
{
“status”: “GPS inactive {gps-inactive}”,
“mode”: “periodic”,
“lat”: 41.89525749999996,
“lon”: -72.67134765624999,
“dop”: 21,
“time”: 1770994947,
“count”: 1
}
Starting to wonder does the cardlocation mode ‘seconds’ value say how often to connect the GPS, get lat/lon and then disconnect ? I really only need an somewhat accurate position every hour and this will be running off a battery so I want to optimize it for battery usage as much as possible but when it does wakeup get an accurate fix, is that possible ?
It’s really important to understand that both cellular and GPS cannot be enabled simultaneously, GPS won’t even start if the accelerometer doesn’t detect motion (i.e. why use battery power if the device hasn’t moved), and your GPS antenna needs clear access to the sky to work.
More importantly, there are a couple of really important doc articles that I’d recommend reading through that will shed light on using GPS with Notecard:
ok let me read those over, I did not realize cellular captures lat/lon which is probably why I am seeing the lat/lon is so far off. Hopefully I can enable the GPS long enough to get a accurate lat and lon and then turn it off if that is possible. thanks
after reading those docs it sounds like I want to use the GNSS to get an accurate location but I also want to optimize power. As I said I just need an accurate lat/lon on startup. I set this back to 300 (5 mins but could go even more to conserve battery power ? My data sensors in the arduino code only transmit every 5 minutes, I use a "hub.sync every 5 minutes. Ideally I want the GNSS to sync every 30 minutes or so after an initial sync on startup if that is possible and I also read in those docs unless the builtin accelerometer detects movement it will not get another GNSS reading ?
{
"status": "GPS inactive {gps-inactive}",
"mode": "periodic",
"lat": 41.89844768333334,
"lon": -72.67656783333334,
"dop": 2,
"time": 1770995345,
"count": 1
}
and the time is from early today at 10:09am, Should't it refresh every 5 mins according to the cmd above of 300 seconds ?
also I have noticed when I plug in the USB cable to the notecarrier and connect to the dev.blues.io/terminal/ the red light on the notecarrier flashes red until I unplug it, is that normal ? thanks
After doing more testing over the weekend and reading the links you sent me I think I am all set. As a test I ran this command:
{“req”: “card.location.mode”, “mode”: “periodic”, “seconds”: 300 } every 5 mins
(In production I would set the seconds a little longer, it is my understand the notecard will not make a GPS connection unless the board senses movement since the last reading ?)
Then I shook the board to make sure the built-in accelerometer would detect a new location, waited 5 minutes , ran this command {“req”: “card.location”} and confirmed a recent unix timestamp “time” and verified the GPS reading on Google Maps
Then over the next hour I ran more {“req”: “card.location”} and noted the “time” stamp did not change. (which is expected since the board did not move). I shook it one last time, waited five more minutes and then got an updated “time” stamp.
I think I am all set, if you see any errors in my testing or understanding let me know.
Thanks !