Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MapQuest API key via env variable #12

Closed
dizcza opened this issue Feb 3, 2022 · 11 comments · Fixed by #13
Closed

MapQuest API key via env variable #12

dizcza opened this issue Feb 3, 2022 · 11 comments · Fixed by #13
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@dizcza
Copy link

dizcza commented Feb 3, 2022

Hi and thanks for a unix-friendly UI to parse ublox data. I was looking for a non-Windows solution and found yours.

I have lots of files in a home directory, and typically the keys are set via environment variables. Could you add such an option to parse the MQAPIKEY env var, if set, as an alternative to the mqapikey file?

Also, is there a way to show the data in Google Maps? The current map is non-interactive: I need to wait a minute before a new zoom is applied to the map...

Thanks.

@dizcza
Copy link
Author

dizcza commented Feb 3, 2022

Also, I don't understand what the track and speed are in UI parsed data. Other tags are self-explanatory. Could you perhaps add some explanation for these two variables in the readme? For example, I get N/A for the track most of the time and I don't know how bad it is.

@semuadmin semuadmin added the question Further information is requested label Feb 3, 2022
@semuadmin
Copy link
Contributor

semuadmin commented Feb 3, 2022

Hi @dizcza ,

Thanks for your interest in PyGPSClient - glad you're finding it useful.

To answer your questions in order:

  1. There are no current plans to enable MQAPIKEY via an environment variable - this can require elevated privileges on some platforms which makes it more fiddly to implement on a consistent cross-platform basis. Hopefully the key file option can work for you.
  2. Simple answer is no - I'm using the MapQuest API because it's free (for non-commercial use up to 15,000 transactions a month) and relatively easy to implement. Out of interest, do you see any particular advantage in using Google Maps rather than MapQuest? The maps are equally reliable in my experience. If it's the refresh rate that troubles you, you can alter that by changing the MAP_UPDATE_INTERVAL constant in globals.py, but please appreciate that the map is only provided for quick visual reference purposes. It's not intended to be a full interactive navigation or geolocation aid.
  3. Can you clarify which particular UBX or NMEA message type(s) you're referring to containing the track and speed attributes? Without knowing which device you're using or how/where it's configured, I can't speak for the particular readings you're getting, but if you tell me which message type you're getting it from I can at least advise on its interpretation.

@semuadmin semuadmin added the wontfix This will not be worked on label Feb 3, 2022
@dizcza
Copy link
Author

dizcza commented Feb 3, 2022

I'm using a Neo-6M. NMEA protocol.

@semuadmin
Copy link
Contributor

ok that's a fairly old device. which specific NMEA message type are you getting speed and track from?

@dizcza
Copy link
Author

dizcza commented Feb 3, 2022

do you see any particular advantage in using Google Maps rather than MapQuest?

I can freely navigate in a google map.

@dizcza
Copy link
Author

dizcza commented Feb 3, 2022

this can require elevated privileges on some platforms which makes it more fiddly to implement on a consistent cross-platform basis.

Why? The os built-in module is cross-platform, isn't it?

import os
key = os.environ.get("MQAPIKEY")

Then I can launch the app with MQAPIKEY=... pygpsclient. Linux folks will appreciate this.

@semuadmin
Copy link
Contributor

OK so the log you've provided contains a variety of NMEA messages - the message type is bit after <NMEA(, so for example GPRMC, GPVTG, GPGLL etc. (CAUTION - the coordinates in this log are now visible in the public domain)

The spd attribute in the GPRMC message, for example, represents the speed over ground in knots; likewise the sogn attribute in GPVTG. The sogk attribute in GPVTG represents speed over ground in km/h. I would refer you to the data sheet for your particular device for further information, or post a general question in the u-blox support forum https://portal.u-blox.com/s/.

@semuadmin
Copy link
Contributor

do you see any particular advantage in using Google Maps rather than MapQuest?

I can freely navigate in a google map.

But, as I say, the map in PyGPSClient is not intended for navigation purposes - it's purely to provide a quick visual reference of the location and horizontal accuracy (where available) provided by the device. There are plenty of other apps available if you want to use a connected GNSS device for real-time navigation.

@dizcza
Copy link
Author

dizcza commented Feb 3, 2022

CAUTION - the coordinates in this log are now visible in the public domain

True. I'll delete the log.

You're right about sticking to simplicity. Your app is cool anyway and perhaps it got working from the start just because it's simple, meant to have a quick look, and lacks features that otherwise would turn your project into a gigantic dependencies list (which would make me feel to search for a simpler solution).

@dizcza
Copy link
Author

dizcza commented Feb 3, 2022

All right. Thanks for your help.

@dizcza dizcza closed this as completed Feb 3, 2022
@semuadmin
Copy link
Contributor

All right. Thanks for your help.

More than happy to consider feature requests. I will as I say look into provisioning map keys as ENV variables, but I may not get round to it for a while. In the meantime, if there's any functionality you think PyGPSClient could usefully provide within the context of a (relatively) simple Python/tkinter diagnostic and configuration tool, by all means raise the suggestion. Cheers.

@semuadmin semuadmin added enhancement New feature or request and removed wontfix This will not be worked on labels Feb 4, 2022
semuadmin added a commit that referenced this issue Feb 6, 2022
…iable

Load mqapikey from env variable -  Fixes #12
@semuconsulting semuconsulting deleted a comment from dizcza Feb 6, 2022
@semuconsulting semuconsulting deleted a comment from dizcza Feb 6, 2022
@semuconsulting semuconsulting deleted a comment from dizcza Feb 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants