Pytrack does not find location
I am using a Fipy on LTE in combination with a Pytrack, the data is send to Pybytes.
The Pytrack sends two types of data. When he wakes up by the timer he sends location and battey voltage.
When he wakes by the accelerometer he sends the pitch roll and accelaration.
Connection on LTE works fine, waking up by timer and movement also.
But sending the location does not work.
I use this piece of code for sending the lat and lon.
while (pybytes): def get_location(): location = gps.coordinates() return location location = get_location() latitude = location longitude = location pybytes.send_signal(12, str(latitude)) pybytes.send_signal(13, str(longitude)) print(latitude) print(longitude)
The response in the terminal is
Does somebody know how to solve this issue?
Best regards, Han
@han any time you power off the GPS chip it has to restart from scratch. To find its location, a GPS chip needs to get a lot of data from the satellites (almanac, ephemerides) which take take up to 15 minutes to receive, and are only valid for a few hours. It also needs to lock on to several satellites.
So if you leave you GPS on while you develop and then query for position, you may get a location. Power it down and back up and it may take a long while.
I’m not quite sure what if anything the L76 saves to non-volatile storage when powered off, you’d have to check the docs for that.
@jcaron thank you for your reply, but the strange thing is that tuesday he had directly the location of the Pytrack and yesterday he couldn`t find it.
@han The GPS chip takes a long time to return a result after it is powered on. This is called "time to first fix", and is inherent to GPS technology. It also needs to have good visibility of several satellites. This has been discussed several times on the forum, I recommend you make a quick search which should return quite a few results.