vshymanskyy / TinyGSM

A small Arduino library for GSM modules, that just works
GNU Lesser General Public License v3.0
1.94k stars 719 forks source link

Doubt about GSM localization #484

Closed Hammerschmidt closed 3 years ago

Hammerschmidt commented 3 years ago

My doubt is only about if this library have a command that can return the latitude and longitude with GSM chip. Does anyone know about it?

SRGDamia1 commented 3 years ago

Yes. Some modems support it. Check the ReadMe.

Use getGPS(float* lat, float* lon, float* speed = 0, float* alt = 0, int* vsat = 0, int* usat = 0, float* accuracy = 0, int* year = 0, int* month = 0, int* day = 0, int* hour = 0, int* minute = 0, int* second = 0) or getGsmLocation(float* lat, float* lon, float* accuracy = 0, int* year = 0, int* month = 0, int* day = 0, int* hour = 0, int* minute = 0, int* second = 0) Depending on which you want and what your module supports.