getting the location and speed via mobile platforms
Is there any possibility of getting the location of a user, moving direction, and the speed via mobile platforms(client side programming like j2me) ? if there is availability in any platform please let me know the platform and please give 开发者_开发问答me some study links to study about it?
regards, Rangana
I'm not sure if there is an API for this, mainly because I don't think that this information (velocity) is available.
You can still figure it out though, and this would work on all cell phones that allow you to access their "current location".
- Ping the phone for it's current location every n seconds (10,20,30 seconds, etc...)
- Log the location of the phone at every ping (lat,long)
- Determine the distance traveled from ping-to-ping. You may need to use vector resolution (http://www.physicsclassroom.com/class/vectors/u3l1e.cfm)
For example, if a phone moves 1000 meters over the course of a 30 second ping, that means: 1000 meters / 30 seconds = 33.333 m/s
Doing this, you can also determine acceleration, etc... This would not give you instantaneous velocity or acceleration, but instead average velocity and average acceleration.
Without GPS it is impossible to get the speed and exact location. You can however retrieve the base station location from several web services and determine your approximate location.
精彩评论