Skip to content

Conversation

@daehwankim112
Copy link

Hello I have found that this library does not support milliseconds of GPS time.

I have created an issue but no update yet so I made my fix to add miliseconds in this library.

GlobalTop PMTK Command packet documentation from Adafruit suggests that reading NMEA can be set up to 10Hz. Therefore, we are able to read GPS time in precision of 100 milliseconds.

I have updated the examples accordingly as well. If you want to test it, don't forget to set the update rate using PMTK220 command. For example,

gps = adafruit_gps.GPS(uart, debug=False)
# gps = adafruit_gps.GPS_GtopI2C(i2c, debug=False)
gps.send_command(b"PMTK220,100")

Copy link
Member

@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

datetime is an additional dependency that some boards may no longer be able to fit. How about adding a new datetime_us property that imports datetime when accessed? That way existing use will work without the additional dependency.

I realize the current datetime property is misnamed but I don't want to break existing code by changing it.

@daehwankim112
Copy link
Author

Hello @tannewt ! Thank you for the feedback!

I couldn't find anything about datetime_us. Can you please direct me where I can find more about it?

Best regards,
David Kim

@tannewt
Copy link
Member

tannewt commented Oct 23, 2025

I'm suggesting you add it instead of modifying the existing datetime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants