device geo localization | Telit Cinterion IoT Developer Community
September 9, 2016 - 2:58pm, 1721 views
***** again, in Device>Location there are two options, current location and location history.
How to obtain Device geo localization ?
using information on SensorLogic Agent J2ME User Guide, page 16:
LocationReport.init();
LocationReport report = new LocationReport();
report.send();
but I get empty values:
[INFO] [TaskProcessor] MessageTask_16(sendLocation(,false,0,0,0,0,0,,false,,false,,,,,)) added
Hello,
That's the API for sending location. But your application must obtain the data from some GPS receiver or other location provider and fill in the LocationReport object using the provided setter methods. Then the report can be sent.
Example:
report.setLatitude(51.1133423f, LocationReport.LATITUDE_N);
report.setAltitude(34.6f);
report.setLongitude(16.9852872f, LocationReport.LONGITUDE_E);
report.setAccuracy(10);
report.setFixQuality(1);
report.setGpsFix((short)3);
report.setGpsHacc(15);
report.setGpsTtf(30);
report.setNewFix(true);
report.setNumOfSat((short)5);
report.setTimestamp(SystemTime.currentTimeSeconds());
Regards,
Bartłomiej