In some scenarios, it is necessary to use the latitude and longitude to determine the location of the module, but it does not require a very precise location. This time you can use the base station location to achieve this function without GPS.
The principle of base station location is to get the base station information through the GSM module, and then send the base station information to the location server through GPRS. The server can return to the module after calculating the rough latitude and longitude according to the base station information.
So if you need to use LBS, you can build your own server (recommended), and the GPRS module gets longitude and latitude information through long base station information.
You can also use API in SDK, but just support China now.
bool LBS_GetLocation(Network_Location_t* bsInfo, uint8_t bsNumber,int timeoutS, float* longitude, float* latitude);
Get location(longitude & latitude) from base station infomation, please ensure network activate complete already
- bsInfo: Base station infomation , Get by
- bsNumber: The number of base station
- timeoutS: socket timeout time,unit:s
- longitude: longitude,unit:dgree
- latitude: latitude, unit:dgree
- Is get location success