i want to create android app that read the coordinates according to the speed (if the app holder driving ,walking etc.)
if the app want to read the coordinates first check the speed of the holder,if he driving slowly then the app read the coordinates in each 10m and if he driving fast the app read the coordinates in each 1km.
how can i do that?
You can get the speed using getSpeed()
Based on the speed you can choose to get location fixes every x meters
Related
I'm new to android programming and currently involved in gps tracking development. I managed to create location listener and start the tracking and record the movement into database on server. What i'm concern is that the coordinate seems jump from one location to another. I can see the main pattern of movement, but get wonder what would made that jump. Tracked device is using network as provider (FINE & COARSE) and I'm suspecting the marker jump is due to the device seeing nearby BTS. Any suggestion to avoid/eliminate this? Thank you
For acurate positions you need GPS provider. To avoid jumps, move with a speed a bit higher than walking speed.
Having a clean movement path for low speeds is difficult to achieve.
I a trying to create an application that will be able to guide people in a city, with points of interest. For this, I need the better accuracy I get, in order not to place POI where there is nothing...
To do this I use droidAR (it gives me a radar, and I can place my POI thanks to their coordinates). But the accuracy is so bad I can't see how this can used.
For exemple, to determine if I a close to a POI, I calculate the distance between it and my GPS position. It can be that, with a 10 meters accuracy given by Android when I place the POI, it is then 80 meters away when I try to find it.
SO I looked forward to find another position systems, I found :
skyhook, which is supposed to give a more accurate position. With this, I took 1000 points and checked their distance to the last point, it is always moving and it was sometimes 300m away, so it seems even less precise. Maybe anyone could use it successfully ?
someone told me to use DCM algo (Direct Cosine Matrix), that can give me an accurate relative position (no problem for my use cases to do every positioninf relative to a start point). Some drones are using it, it could reach 1 meter accuracy. But I couldn't find any implementation or help with Android.
Did anyone succeed into using the android GPS with accuracy ?
Either your android phone has a bad GPS device, or more probably you are doing something wrong. you can set a POI in city aprox. 5m acuracy, sometimes 20m. that is sufficient. check it with another GPS app that allows setting a waypoint.
In your app you could concentrate on the 95% GPS accuracy. There is nothing better than GPS (espcecialla yon a mobile phone), the other methods you described are for short time assistance to GPS, but they will not work good for pedestrians, they are made for vehicles (vehicles move straight most of the times, they cannot change its direction so fast like a human does).
Your problem is not the GPS location accuracy, it is the augmented reality projection of droidAR.
This seems like it should be simple enough, but I can't seem to get a clear example of how to calculate my speed using Android's Location Services.
All I want to do is calculate my speed based on my previous and current GPS position. getSpeed() doesn't work, because it needs to be set at some point using setSpeed().
So is there any sample code out there that I can run in Eclipse against my Android emulator running a GPX file, that will show me my pace in any measure (meters, feet, miles, etc., doesn't matter - I can always convert this to what I need).
Thanks in advance,
Alex
Do you just mean something like this? Gives you the speed in m/s.
oldLocation.distanceTo(newLocation) / (newLocation.getTime() - oldLocation.getTime())
getSpeed() doesn't work, because it needs to be set at some point using setSpeed().
(In case you are using an actual device -- ). No, the speed is determined by the GPS chipset and it should be more accurate than getting the distance and time between two consecutive locations. You do not need to setSpeed() . Call hasSpeed() to see if the speed is valid.
(In case you're not using an actual device)
I've had good success using the mock location provider where you can set the Location object you want with setSpeed() in meters/second
Here are some ways of doing this :
Mocking using NMEA
Mocking using code
I would like to find the position of an Android device with respect to a fixed point in space.
I need a precision close to one or two meters.
My goal is to determine the position of the android device user inside a building (a museum), to detect the floor and the room she is in, and - if possible - even a more precise position in the room (to know which painting she is close to).
I did already excluded to use GPS, since it is not so precise (expecially with respect to elevation), it only reliably works outdoors, it quickly consumes battery power, and it doesn't return the location quickly.
I did already excluded to use Network Location Provider too, since it is even less accurate.
In Android you have three possibilities to detect the location of a Android phone:
1) GPS
2) Network
3) Triangulation
But none of these three possibilities is suited for you're problem. The GPS is the most accurate one, but as you already noticed it is not working in buildings, and it won't be able to differentiate between different floors. The problem is that the accuracy of GPS is at best 3 or 4 meters. The other two possibilities are far less accurate. That's why there isn't a real solution for your problem.
One thing that might be a possibility is the motion sensor. If you know where the user starts, you maybe can use the motion sensor to calculate how many meters the user moves. But I don't think that this is accurate enough.
Is it possible to get the location of the building shown in the Camera view using Augmented Reality in Android??
I have the GPS coordinates of the mobile but now i want to get the GPS coordinates of the building shown in the Camera view???
Please suggest me some ideas?????
If you have the GPS coordinate of your mobile phone and the direction (using the compass of the mobile phone) in which it is hold, you could use some trigonometry to approximate the location of the building. The remaining problem is that you have to somewhere estimate how far the building is away from your phone.
But if you assume for example that you're always walking in streets and the point to a building, it should be easier to find the building.
I would not depend on the compass output, it's always in question.
What I did was use Gogle maps, get a location fix, draw the point on the map (if you want to draw a line use bearing that would be a better hint I guess) then let the user draw or adjust the line using sattelite view to pinpoint the target. You can then get the new geo-coord and get a fairly accurate bearing ( if that's required )
I would also suggest using both the network and gps provider, in cities sometimes the network provider is more accurate than the GPS if the glass/metal canyon is preventing it, even a couple of hundred yards can get you close to your position.
Anyway it's a somewhat manual process but it's more reliable then trying to guess distance and hoping the azimuth is reliable (rarely is)