The code is basically as follows:
Code: Select all
mobileStartTrackingSensor "location", true
put mobileSensorReading ("location",true) into geodata
put geodata["latitude"] into tlat
put geodata["longitude"] into tlong
put geodata["horizontal accuracy"] into tHA
put geodata["altitude"] into tAlt
put geodata["vertical accuracy"] into tVA
put geodata["timestamp"] into ttime
put geodata["speed"] into tspeed
However, when I try it on a real device, everything works apart from the speed, which remains blank. The horizontal accuracy figure is quite poor on the real device where I’ve tested it (65m). I don’t know whether this is causing the problem or whether it’s something wrong with the coding, or whether LC doesn't get the "speed".
I’ve read about the “speed” not being obtainable with LC but I can’t find any reference to this in the release notes for version 6.0. That doesn’t sound like its the problem though if it works OK in the simulator?
I did get it to work by calculating the distance from the latitude / longitude values and dividing it by the time, but I though if I could get the “speed” directly that would be much better.
Any ideas on what could be wrong??