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

getGsmLocation(...) latitude and longitude values are in reversed order. #792

Open
cognoquest opened this issue May 25, 2024 · 0 comments
Open

Comments

@cognoquest
Copy link

bool getGsmLocationImpl(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) 
// AT+CLBS=<type>,<cid>
// <type> 1 = location using 3 cell's information
//        3 = get number of times location has been accessed
//        4 = Get longitude latitude and date time
thisModem().sendAT(GF("+CLBS=4,1"));

ilat      = thisModem().streamGetFloatBefore(',');  // Latitude
ilon      = thisModem().streamGetFloatBefore(',');  // Longitude

The parameter option 4 states that it gets the longitude latitude and date time.
The code requires a small change to the fetching order from the stream, first ilon then ilat.

ilon      = thisModem().streamGetFloatBefore(',');  // Longitude
ilat      = thisModem().streamGetFloatBefore(',');  // Latitude

Regards

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

No branches or pull requests

1 participant