Due to high demand expect some shipping delays at this time, orders may not ship for 1-2 business days.
0

Support for Circuit Python Library for some other GPS module
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Support for Circuit Python Library for some other GPS module

by adrafrator on Thu Apr 29, 2021 2:14 am

Hello ,
I have installed this lib : adafruit-circuitpython-gps using pip3 install adafruit-circuitpython-gps

and wanted to see the where this gps_simpletest.py is installed?
WHat would be the location of this file?

Also

the code says we have to send these commands :

gps.send_command(b"PMTK314,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0")
# Turn on just minimum info (RMC only, location):
# gps.send_command(b'PMTK314,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0')
# Turn off everything:
# gps.send_command(b'PMTK314,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0')
# Turn on everything (not all of it is parsed!)
# gps.send_command(b'PMTK314,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0')

I am using some other gps module and I am getting the continuous gps nmea data $GPGLL and $GPGSV $GLGSV.

Can i use the circuit python library for determining the fix and the latitude or longitude or this library will work with only
MTK3339 GPS (Adafruit Ultimate GPS V3)??
Please assist,

Thanks ,
R

adrafrator
 
Posts: 5
Joined: Thu Apr 29, 2021 2:03 am

Re: Support for Circuit Python Library for some other GPS mo

by blnkjns on Thu Apr 29, 2021 3:46 am

For GPS data you basically don't need a library. It's a really "dumb" format, just plain text over UART. If you see the data stream, you can just cut it up with regular string processing.
The only thing you need to know is the longitude and latitude have a strange notation. So isolate the lines that start with $GPGLL.
Say it has this part in it:
4003.9040,N,10512.5792,W
You need to chop it up by the comma's. The number in front of the N is the latitude north of the equator. The one in front of the W is the longitude west of Greenwich.
4003.9040 needs to be parsed as follow:
Break it up from 2 positions in front of the decimal point, you can do so with integer divide:
4003.9040//100=40
and a reminder-dividide for the second part
4003.9040%100=03.9040
Now the second one has to be divided by 60 and multiplied by 100:
(4003.9040%100)/60*100
So latitude is 40°6.5067'
Same procedure for longitude.

blnkjns
 
Posts: 472
Joined: Fri Oct 02, 2020 3:33 am

Re: Support for Circuit Python Library for some other GPS mo

by adrafrator on Thu Apr 29, 2021 5:02 am

@blnkjns thanks for your reply,
I agree with you , it is plain simple NMEA sentences text.
Is it not possible to use the existing library (circuit python) , and the simpletest_gps.py .
Because in this code we are sending soem commands over usart to the module.
For my module I dont need this commands , i can simply read the serial data.
I tried that but then I found it is continuously logging this line :
Waiting for the fix..
Waiting for the fix..
Waiting for the fix..
Waiting for the fix..
..

So is it possible to reuse the library or the circuit python library is tightly tied to the GPS board provided by adrafruit.
code > https://learn.adafruit.com/circuitpytho ... -code-8-28

Regards,
R

adrafrator
 
Posts: 5
Joined: Thu Apr 29, 2021 2:03 am

Re: Support for Circuit Python Library for some other GPS mo

by blnkjns on Thu Apr 29, 2021 5:24 am

Waiting for the fix means it's not seeing satelites.
Are you outside?
Did you wait at least 1 minute?

blnkjns
 
Posts: 472
Joined: Fri Oct 02, 2020 3:33 am

Re: Support for Circuit Python Library for some other GPS mo

by adrafrator on Thu Apr 29, 2021 5:40 am

Thanks for the feedback,
yes I am outside. in the GPLL data i can clearly see my coordinates. Is the fix related to that?

my question is again the same :

Is it possible to reuse the library or the circuit python library is tightly tied to the GPS board provided by adrafruit.

Is waiting for fix dependent on the Adrafuit Ultimate GPS Shield?

Best Regards,

adrafrator
 
Posts: 5
Joined: Thu Apr 29, 2021 2:03 am

Re: Support for Circuit Python Library for some other GPS mo

by blnkjns on Thu Apr 29, 2021 5:54 am

I don't know details about the library, I always work bare-bones with GPS. Strange it also outputs "Waiting for fix". Do you use the library, or do you just pass through serial data?
Try this barebones example:
https://learn.adafruit.com/circuitpytho ... art-serial
Does that already output "waiting for fix"?
If not, then it is a GPS library thing.

blnkjns
 
Posts: 472
Joined: Fri Oct 02, 2020 3:33 am

Re: Support for Circuit Python Library for some other GPS mo

by adrafrator on Thu Apr 29, 2021 8:21 am

thanks, I will try this ...
thanks once again !
Best Regards,

adrafrator
 
Posts: 5
Joined: Thu Apr 29, 2021 2:03 am

Re: Support for Circuit Python Library for some other GPS mo

by adrafrator on Thu Apr 29, 2021 11:28 pm

thanks it worked using pyserial.

adrafrator
 
Posts: 5
Joined: Thu Apr 29, 2021 2:03 am

Please be positive and constructive with your questions and comments.