Location tracking in low signal locations - java

I have an app where I am trying to get users location, I need fairly accurate location tracking for my app, I have specified Criteria as High Accuracy and High Power, but at low signal places ( where both network and GPS are low in signal strength, mostly indoors ) the location tracked are like around 100 meters or more away from original location, is there any way to make it a bit more accurate ?

No, there is no software way to make it more accurate. Hardware ways include bluetooth beacons (you must install them on site), gathering more data about available WiFi networks to make better LBS (you have to gather ore data, than google and process it better than them) or launching new generation of GPS satellites with much more powerful transmitters (which is planned, but not done yet).

Related

How to find the distance between bluetooth devices

Description :
I'm trying to find a way to calculate the distance between the application, and nearby Bluetooth devices.
That, or only detect devices that are x meters away from the device with the application.
Tried so far :
I tried using the Bluetooth's signal strength, but it is not reliable, as it has so many variables other than the distance (rotation of the device, objects between the 2 devices, etc). For example, I kept an eye on a device that was still on a table, and the numbers went up by 10 mBw without neither of the devices moving.
I also thought of using GPS for distance calculation, but GPS's accuracy is vary big compared to the accuracy I'm looking for (+-1m).
I look for lowering the strength of the Bluetooth signal before searching (on newer Bluetooth versions), to find less devices within a lower range. But the people who have tried it say it is unreliable because even at the lowest energy for Bluetooth, the Bluetooth was able to find devices that are about 10m away.
Examples around us :
If anyone has an Apple Watch and a Mac, they'd know that it is possible to unlock your Mac by simpley being close to your Mac while wearing your Watch.
Also, car keys. When you get close enough to the car while carrying the key on you, the car is unlocked.
Notes :
Assume all the devices are Android devices with high their hardware. It's a special implementation, not for everyone
A good discussion of techniques for calculating distance using Bluetooth devices is here: https://vimeo.com/171186055#t=40m15s.
With respect to the Apple Watch and Mac, Apple is using Time-of-Flight via peer-to-peer WiFi to determine proximity at that level of accuracy.
Typical automatic remote keyless entry systems utilize radio pulse, not bluetooth. More advanced systems, like Tesla's Phone key, uses Bluetooth on the phone device, but relies on the driver to physically touch the door handle to complete the process.
This might be possible but not much accurately.
You should approach to it like this:-
You should measure the signal strength, and then measure the distance using the speed of bluetooth (it usually travels 1cm in 100ps). Timing it would be difficult though.
Then, using the data you can easily measure the distance ( it is usually less that 10 m but can go farther).
You would get an answer but it would be really an approximate one.
As per me, the exact measuring is not possible.

How to handle the high data rate of fluorescence microscopy camera?

I have a question how I can learn to handle (with perhaps java) high data rates. My task is:
I will have a fluorescence microscopy camera with around 1Gigabyte/s and number of images between 100/s and 1000/s.
The image data should be written uncompressed as raw data on the disk. The storage system is not yet decided and should be dimensioned based on the needed performance. During the data acquisition a more or less live image should be shown.
Has somebody some suggestions for books or lecture notes for me?
Your question is pretty open ended, but I can give you advice based upon my past experience building multi-camera, real time data acquisition systems.
Typically these data acquisition systems require (though you may have to purchase it separately) a video capture card. the cards typically buffer some number of frames and the frame rate you can support depends on home long you need to run the acquisition system and the slowest data transfer rate in the "camera->capture card->hard drive" chain. These cards typically come with a documented API (typically in a C variant, I've never seen a Java variant but that doesn't mean it doesn't exist) and libraries that you can compile against that support code using the documented API functions to record data to storage.
When I have worked on systems that just needed a full motion video frame rate (~ 30 Hz) a windows box with a capture card has sufficed just fine. I am pretty sure you can get cards that will sample in the 1kHz range or higher (depending on your camera resolution), but you may be limited on the duration you can sample (given the limited available storage) during the acquisition process if you are sampling data faster than the buffer can clear it to final storage.
Also there is no reason for you to display >30 Hz at one time, no display system is going to support a 1kHz refresh rate, and the human eye can't process >30 Hz anyway.
Unfortunately in my experience these systems are put together piece meal because they are highly specialized which limits the market and disincentivies a standardized approach. The bottom line is that you are probably looking at either using a capture card manufacturer provided API interface (I'd advocate against wrapping it in JAVA because you'll just be adding extra latency that you can't afford at the acquisition rates you are talking about) or having an Electrical Engineer custom fit your solution. If I were in your shoes, I'd be searching for a capture card that meets my requirements, perhaps from the microscopy camera manufacturer.

Increasing the accuracy of proximity alerts in Android

My application keeps track of a user's location, and sets up proximity alerts for nearby stores returned by an API for an automatic-chickin type functionality. I'm hitting my head against the wall trying to figure out how to improve the accuracy when the proximity alert is triggered by network location. I need some way to confirm that the user is at the location by either checking again within a few minutes, or by confirming their current position via GPS.
Part of the issue is that the Context handling the proximity alert is an intent service, so anything that works asynchronously causes issues when the alerts fire in rapid succession. Clearly there's a way to do this properly (e.g. Google+ checkin notifications), but I'm at a loss as to where to look next.
My experience is that network location is often less accurate than GPS location, although neither is 100% reliable. Sometimes GPS will be perfect, but at other times it's wrong my maybe 50 metres or more. To handle the this, I think the best way is to combine the two location sources using a simple Kalman filter, so that neither network or GPS trigger promimity alerts directly, instead it's the result of the Kalman filtering that is used. See my answer to Smooth GPS data for full details of a Kalman filter that might work.

GPS Location Tracking

I would like to implement GPS Tracking service. After a search on the web I'm still a bit confused on the best way to practice this feature.
I want to start following the user when he gets a mile away from his home.
I thought that the app will be installed at user's home and using:
locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
I'll get the user's coordinates and compare it with changing coordinates as he travels.
When the user gets away a mile from his home I'll send SMS messages with his maps location every predefined time interval.
I was wondering if there is someone who done something similar before and can recommend a best practice for this task.
Also, how accurate the GPS can be, and what might be the best practice to get distance?
Thanks in advance.
From my experience it is not a good idea to use GPS all the time to track when a user departs from his home location because it burns the battery in no time. I ended up learning the home location by looking at the cell tower IDs over night (assuming the user is at home then). If you reach a certain level of confidence that you know the user's home location you can ask him something like "Are you at home right now?" to be completely sure (although this is somehow creepy for many users).
If you follow this strategy you can start the GPS if the user connects to a new cell tower and save a lot of battery.
Regarding accuracy. You can get the accuracy provided with each Android.Location object. If you are outside, this is usually 5 or 10 meters. But be aware that there is only an 68% chance this value is correct, according to the documentation:
We define accuracy as the radius of 68% confidence. In other words, if you draw a circle centered at this location's latitude and longitude, and with a radius equal to the accuracy, then there is a 68% probability that the true location is inside the circle.
Be carefull, the getLastKnownLocation method will not necessary return the user home position.
You shoud rather get the current position. Most of the time, getLastKnownLocation is used to get a location quickly (avoiding heavy background work).
GPS accuracy depends on many factors:
Weather, quality of the chip, field, ...
But, most of the time, it's more accurate that the network provider.
Here a very good link : http://developer.android.com/guide/topics/location/strategies.html
You will learn a lot with that.

how to calibrate the orientation sensor in android?

I'm writing an app in Google Android 2.1 that needs to know which direction (n/w/s/e) the device (HTC Hero) is facing. The sensor and its listener are working great, but the values I get from the sensor are totally crappy. e.g. it tells me I'd be facing north when the device is facing SW or so...
This seems to be a known problem with android devices. The "solutions" I found on the web look like this:
shake the device around
move the device like an eight
tap on the devices back
This is thought to trigger the sensors recalibration. And: the thing with the "moving around" works for me... but that's not very professional I guess...
so - how do I trigger the recalibration of the orientation sensor from the SDK? I need the sensor to be properly calibrated without any fancy stuff that would make users of this app look like complete idiots while they are "manually" recalibrating their phones...
Is there any way to do this "right"?
EDIT:
Or: is there any way to determine PROGRAMMATICALLY, if the device is correctly calibrated or not? As a fallback-option so to speak... then I could warn the user that the device needs "manual" recalibration.
I don't believe there is a way to know programatically if you compass sensor is calibrated correctly unless you use a secondary data source like GPS. If you can use GPS then when the user is moving you can compare the GPS movement with the compass heading and correct. Remember that local magnetic fields can screw up the compass readings and the devices has no idea if you are out in the middle of a forest or next to a transformer.
With these micro devices there is always a bit of skew you'll have to deal with. If you check the values for the accelerometer as well you'll see that at rest they aren't always returning 9.8 m/s^2 (or at least consistently between devices).
In your help you may just need to tell the user to rotate/twist their phone in a figure eight to reset the compass.
I assume you are referring to the Magnetometer inside the Hero.
Callibrating it is a tough one and will/should always require user interaction for a realiable callibration. There are seperate strategies to deal with that. You could ask users to hold there device in north direction and then recallibrate. If the users don't know where north is, you can ask them to direct zhe device towards the sun and based on location and time you can calculate where that is.
Leaving callibration aside, I would guess that your problem is that the readings you get from the sensor are inaccurate. Of course callibration is a prerequisite for accurate readings, but there are also other factors in play.
It is common practice to complement sensor data from one sensor with the data a different sensor to increase accuracy. You could use the GPS to determine a heading when the user is moving. If he's moving slowly however, this is inaccurate as well. You could integrate the data reported by the Accelerometer to guess about orientation changes (not the absolute orientation). But honestly a Gyrometer would be more ideal in this case.
Systems that work like this are sometimes called Inertial Navigation Systems (INS) because they can, given a fixed point in space, determine their subsequent relative position and orientation accurately without further external data. Using a Kalman filter is common practice to recallibrate the system from time to time when an absolute position (e.g. retrieved via GPS) is available.
Although it is unrealistic to implement a full-fledged INS, you can certainly draw a few ideas from how they work to make your orientation readings more accurate.

Categories