Location manager, not accurate even after setting kCLLocationAccuracyBest - mapkit

Hi there
I am using location manager and mapkit, i am able to get the curernt location, but its not accurate enough - This is my problem
My current location on the map is for example 3.0856333888778926, 101.67204022407532, but location manager's location only returns +3.08370327, +101.67506444; which is short of a few decimal numbers
This is resulting in the wrong location (about 1 KM away) when i try to show directions
I have already set location to be kCLLocationAccuracyBest -
Any suggestions?

Where do you try it? Inside, the accuracy of GPS is inherently limited (usually not to 1km, though. But within big cities, reflections from buildings are possible). Ahh, and another thing: is the measurement done inside the simulator? I'm not sure how the location is determined within it. But in my tests, I'm also usually quite off my actual position.

It may be related on how you have setup your locationmanager.
Could you please post it here for us to check? Maybe this could help.

Are you on wifi? This happens to me if I am on wifi. When I switch to edge/3g, everything turns to normal. Just try with standard map application if it also shows you wrong.

the highest possible accuracy and combine it with additional sensor data.
kCLLocationAccuracyBestForNavigation
This level of accuracy is intended for use in navigation applications that require precise position information at all times and are intended to be used only while the device is plugged in.

Related

Vuforia for Hololens

I was wondering if someone else tried developing a hololens application using vuforia. Specifically, using vuforia's capacity to recognize and track objects.
I tried and it seems like it's working. I was just not sure about the result I got from the Debug.Log that print the name of the tracked object.
I tried putting two trackable targets millimeters away from each other and pointed my Gaze towards the distance between the objects(hoping it takes both).
Some how the output window gave me this.
It seems like I was able to track both targets but I want to know if I tracked two different objects at the same time.
I have this doubt because at some point, eventhough the hololens was in the same position as before, the output started to change and started printing only one of the two objects(the one in the right).
I think of this as a problem caused by hololens' small camera window or by hololens limited hardware.
In the vuforiaconfiguration you should be able to set the maximum simultaneous amount of objects your app can track. You need to make sure it is set to more than 1.
In the image above you see how you can set the maximum amount of tracked images in unity.
If you are not using unity you'll have to access the vuforiaconfiguration in another way and set the maximum simultaneous amount of tracked object there.
From code you can do it in c# like this:
VuforiaConfiguration.Instance.Vuforia.MaxSimultaneousImageTargets = 2;

Using GPS, How can i detect if user on road or inside a building

I am currently developing technique to help users find a spot to park.
But i face a little problem:
if a user indicates that he is parking right now in a free spot but he is lying and he is at home right now.
How can i detect from GPS if he is inside a building or along side the road?
Thanks
You'll need map data (OpenStreetMap is free), and figure out whether the user is somewhere on that map or not. You do that by comparing GPS data to the map data.
What I do in such situations is measure the distance between the lat/lon and each road, and compare the GPS angle to that of each line. The more context information you use the more accurate you can get your results:
If the speed is 60km/h, you're probably not in a building. You're probably not on a 30km/h road either.
If you're standing still for more than 2 minutes, you're probably not in a car.
If you know the buildings, and there are only a few of them, you could check if you see a certain wifi router or not.
Basically you'll calculate a score for each road, and then pick the road with the highest score to know where you are.
Score = DistScore*DistWeight + AngleScore+AngleWeight etc.
Also, from iOS and Android you get an accuracy in meters. You can also calculate that yourself if you can access raw GPS data. Using that, you set the area that you need to scan. For example, for a high accuracy (3m), you probably don't have many roads to scan. If the accuracy is 50m, you should probably match roads that are farther away.
If accuracy is important, you should look at series of GPS data, and test if the followed route is a logical path or not.

Accuracy of GpsLocation.Heading on Windows Mobile

I've been use GpsLocation.Heading to get the current direction/orientation of my device.
But it seems not accurate, where the value is either:
keep changing with a huge difference even I just put the device on the table without moving it
or the value didn't change even I move around and rotate the device.
means, it was very inconsistent and inaccurate.
As, I believe, from the documentation, Heading suppose to give me the value(in degrees) of where my device currently heading.
Does anybody know how to use it properly, or how to get the accurate value?
This heading will only be accurate when you move.
Look for a magnetic field sensor (compass) (if any) in the device and then use that.

3D Objects are not being in their regular shape at distance

I am working on a game which was developed by some other guy earlier. I am facing a problem that when player(with camera) start running on the road the buildings are not being shown up in their regular shape and as we move forward (more closer to the buildings) they gain their original shapes, and some times the buildings present on either side of the road are not visible by camera ( empty space ) and when we move closer to the building it comes up as visible object suddenly. I think it may be some unity3d setting problem (rendering , camera or quality). May be, it was being done due to increase performance on mobile devices.
can anybody know what may be the issue or how to resolve it.
Any help will be appreciated. Thanks in advance
This sounds like it's a problem with the available LODs for each building's 3D model.
Basically, 3d games work by having 2-3 different versions of each 3D model, with varying *L*evels *O*f *D*etail. So for example, if you have a house model which uses 500 polygons, you'll probably have another 2 versions (eg 250 polys and 100 polys), which are used depending on the distance between the player and the object. The farther away he is, the simpler the version used will be.
The issue occurs when developers use automatically generated LOD models, which will look distorted or won't appear at all. Unity probably auto generates them, but I'm unsure where you'll find the settings for this in unity. However I've seen 3d models on the unity store offering models with different LODs, so unity probably gives you the option to set your own. The simplest solution would be to increase the distance the LODs change at, while the complicated solution would be to fix custom versions of the 3D models for larger distances, with a lower poly count.
I have resolved the problem. This was due to the LOD (level of details) used for objects (buildings) in Unity3d to enhance the performance on the slower device. LOD provides many level of details (of an object) which you can adjust according to your need . In my specific problem the buildings were suddenly appear due to the different (wrong) position for LOD1, i.e. for LOD1 the building was at wrong place but for LOD0 it was at its right place. So when my camera see from the distance it see LOD1 which was at wrong place thence it sees empty space with no building at the expected position. But when camera comes closer it sees LOD0 in which building is at the right position and it seems that buildings are suddenly come or become visible.

Indoor positioning

I am trying to get indoor gps by trying to orient my floorplan with the actual building from google maps. I know perfect accuracy is not possible. Any idea how to do this ? Do the maps need to be converted to kml format?
Forget that!
Only with luck you can get indoor GPS signals, probably only near the window, and then it is likely to be more distorted than the size of your building.
You only can try to get the coordinates outside, at the corner of the buildings.
For precise measures you would need some averaging of the measures, which only a few GPS devices offer. For less precision, take the coordinate, or measure it on differnet hours, days.
Otherwise, you should think about geolocation using Wifi/HF and any other wireless/radio sources that you can precisely locate since you probably install it yourself or at least someone from your company/service is responsible of them and could give you the complete list with coordinates. Then, once you've got the radio location, you can geolocate the devices using radio propagation and location.
I know that's not the answer you were looking for, but think about it as an alternate one if you really need to locate people inside your building.
PS: I did it at work and it works pretty well (except some areas where radio emitter are broken).