vshymanskyy / TinyGSM

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

modem.getGsmLocation lat and lon reversed #663

Open mitchellkennedy opened 2 years ago

mitchellkennedy commented 2 years ago

What type of issues is this?

[ ] Request to support a new module [ ] Bug or problem compiling the library [X ] Bug or issue with library functionality (ie, sending data over TCP/IP) [ ] Question or request for help

Modem: SIMCOM SIM7000A R1351 Main processor board: esp32 TinyGSM version: latest (0.11.5) Code: modem.getGsmLocation

Scenario, steps to reproduce

Per documentation (AllFunctions.ino, line 346-414), return values, and convention, lat should come before lon. When running (modem.getGsmLocation(&lat, &lon, &accuracy, &year, &month, &day, &hour, &min, &sec)) lon is returned before lat and is mislabeled.

Expected result

This function as demonstrated in AllFunctions.ino should return lat, lon, accuracy, etc.

Actual result

This function's reversal causes incorrect results when running AllFunctions.ino as it returns lon, lat, accuracy, etc.