how can I correctly identify if the user is driving or not ? I am trying to make an app where I can find my parked car's location.
The simplest way was to ask user to press a button after parking the car so that my app can remember its location.
But I want my app to be automatic. It should correctly recognize if the user is in vehicle or not without interacting with the user.
I tried out Activity Recognition as well but it does not give me exact/correct result. Even when I am walking it says driving and vice versa. I cannot trust it.
There are several apps in the play store which achieve this. I want to learn this as well.
Would some one take some time and help me out on this. It will be of greate help. Thanks a lot in advance :)
I've never done this before, but here are some things I'd try:
location - mainly, how fast their location is changing. probably not great for slow traffic, but if they are moving 60mph, there's no way they are walking. You could also combine this with map data about known roads, or maybe even use locations of well-known airports to know that someone is more likely flying than driving
use the device's accelerometers to compute it's speed (in conjunction with location info to correct for accumulated error).
have the user connect their device to the car with bluetooth - and then when the connection drops, you know they aren't in their car. Or better yet, figure out if you can just detect they are in the car from strength of the bluetooth signal. Though I'm not sure that's possible.
(maybe) ask your users to use a simple RFID chip in their car, and then use that as an indicator of whether or not the phone is in the car. Of course this has implications on the user experience.
in a different vein, maybe some sensor on the device could pick up vibrations? Just thinking that car rides aren't perfectly smooth, so any vibration sensing + some signal processing (DFT the data, then look for certain low frequencies that correspond to driving - probably low frequency and below audible).
The best? Probably a combination of all of the above. The more signals you can gather, the better. Perhaps you could even collect a bunch of data, and try to use it to train a classifier? Then again, if any one of these signals turns out to be strong enough, you might not need the others. Be sure to test a variety of scenarios, e.g. phone in the cup holder v. in your pocket, city driving & slow traffic v. highway driving / empty streets, etc.
I'd be curious to know if any of these ideas pan out.
Also fwiw, Determining if user is driving using gps appears relevant - though it's a simple speed-based check - if you cruise around a parking lot at 8mph looking for a spot, you'll completely fail at catching where the car is parked if your threshold is 10mph.
If the speed drops from above 40km/h to under 7km/h, and stays low for more than 5 minutes.
Related
I'm trying to find a good way to track location of people in a building. I would ultimately like to be able to create a graphic on demand showing where employees are in a building - which floor (elevation), and where on the floor they are located (lat/lon). I have read that elevation is relative to the WGS84 ellipsoid, not sea level necessarily, which is fine. I can define a baseline of where the first floor is, for example, and then calculate the difference of a person's current location from there. If I understand correctly, the general precision lat/lon for a GPS is as fine as 1m, which should be sufficient for me.
Part of my problem is finding a device to use for employees to carry around. The other is finding a device with a supported API (read: "free API") or other programming options. I would like this to be manufacturer-independent.
I would love to do cross-platform development - iOS, Android, PC, web, etc.
Does anyone have experience with something like this, and what recommendations can you offer on where to start? I know this is a little open ended but I'm not sure where to start.
Thanks.
This all does not work (tracking within a building).
GPS Signal is very poor or non existent within a building.
(Next time search here on Stackoverflow. It has been asked some times.)
The only robust and working solution, are BlueTooth beacons.
Such small hardware pieces are mounted within the building.
Such beacons (search for iBeacon) just send out an id.
The phone receives the id, and the approximate distance to it.
You have to administrate and know which id is at which level of the building.
Even when having good reception the GPS signal is not precise enough to determine the floor a person is location.
Some phones have a barometer, like the ipHone, this can track relative heigh changes, and may be used to determine level within a building. (Once calibrated before entering the buulding)
unsure if this questions is right for this site, but anyway...
In few months I'll be beginning my Uni dissertation and I have a few ideas, some revolve around tracking the position of a smartphone in 3D space, I'm wondering if there is any way to do this.
I believe there is no way to do this solely with the phone and its' gyroscope and accelerometer, even though I feel it might be possible. I am expecting the best case will be to use 1-3 Raspberry Pi and hopefully apply something to them which will enable them to track the phone in 3D space.
Ideally I'd like something which can get precise readings of the phones' movements, even through objects such as a TV screen or even a wall, but to simply get the phones location in space as a blank dot. I'm not sure of any signals smartphones emit, or one the external 1-3 raspberry Pis could give out which could be used to precisely triangulate it's position, but I feel its possible.
Interesting question. I am probably just narrowing down the field of options suggested by Jim, but Android does have a WiFi manager class. http://developer.android.com/reference/android/net/wifi/WifiManager.html , which seems to have methods for calculating and comparing signal strengths. I would say with a sufficient number of cheap wifi routers/access points at known locations, and a little bit if math this would be very doable, not to mention fun. It almost seems too easy, but if you have to factor in some sort of calibration of the strength of each access point, etc,, it might make a good dissertation.
Your question is about "tracking with an outside source" but you later reference it's internal sensors like you will have access to them. You also reference a signal it might emit that you could measure and track.
Tracking in 3D space requires a reference point (a known location) and then coordinates indicating the object position relative to that point (called "triangulation" by most people). Cell towers have enough data to triangulate position based on their constant collection of the phone's cellular radio signal and the ability for several known locations to collect that data. So, is it possible? Absolutely and they do it all the time. Look up "cell tower hand off" or "handover" for more information. However, in most situations you will not have access to all of this data and several known locations to make appropriate determinations. Also, they typically don't need very fine location data (less than a meter), so it isn't necessarily helpful to you. Maybe a good dissertation though...
Most other signals produced by the device (e.g.. bluetooth, wifi) use much shorter wavelengths (higher frequency) and are subject to much more interference caused by objects like walls to use for exact triangulation purposes. However, it seems like that might make a good dissertation, since that's what you're interested in doing. It's heavy on signal processing and it may not even be possible. Further reading here:
http://www.networkworld.com/article/2170751/tech-primers/location-based-wi-fi-services-can-add-immediate-value-to-wi-fi-deployments.html
http://en.wikipedia.org/wiki/Radio_spectrum
So, if we assume access to sensors, it helps. However, you still need "known locations" because sensor data is subject to error. And as the device moves and reports information about how it is moving, small errors turn into big ones. Think about shooting a laser across a room vs. across a city. Again, not a bad concept for a dissertation wherein you might spend the time and energy collecting various sensor data in order to reduce the impact of the error on location calculations.
EDIT
Signal timing is radar and the devices probably are precise enough, but maybe you could find a way. Signal strength is what is used currently. Roughly it's like this - Station A measures the device signal at "X". Station B measures the same signal at "1/8 of X". Because signal strength is typically a cube root function, you might assume Station B is twice as far from the signal as Station A. If you add another station, you could triangulate the position - if it were a perfect world. However, the phone might be in the person's pocket while they are standing next to Station B. How would you know? You need several stations. Also, if the phone is next to a surface that reflects it's signal back to Station A, it may "appear" to be closer if the reflection occurs just right.
We haven't even covered things like station calibration (how do we know the signal is "1/8" strength at B compared to A?), determining the actual location of each station, doing real-time signal processing and other types of interference.
I don't do this kind of work. I did some signal processing a long time ago, so this is just high-level stuff that I find interesting. You should also look at this (in case you weren't aware):
http://en.wikipedia.org/wiki/IBeacon
I'm new in Android and I would like to ask you is there any possible way to know if the Android phone moved about 5 meters from its current location ?
One idea is to use the accelerometer to detect when the phone is moving. Naturally, you can't estimate the distance moved very accurately, but it might work for your application. If the accelerometer says the phone is moving for more than 5 seconds or so (maybe you can detect a pattern of movement?) you might infer that the phone moved significantly from its original position.
Of course, the user can trick your app by shaking the phone...
A good resource concerning GPS can be found at the official site: http://www.gps.gov/systems/gps/performance/accuracy/
The short answer, however, is that the GPS accuracy of a specific phone at a given moment is dependent upon several variables. Those that are most pertinent to your question would be the actual hardware of the device, and the environmental conditions at present. Typically, a phone under good conditions can expect at best 10m of lateral accuracy. Taking into account poor conditions, local interference, limited satellite connectivity, etc, can push the error of a reading much higher. Unfortunately, consistently and precisely measuring a movement of 5m is unlikely.
After doing some asking around and reading, it sounds like you're lucky to get even within 10 meters of accuracy with a GPS on a mobile device (specifically Android).
I've seen a video that shows a home-made device reading out to several decimals. Is this only because of the data format from the chip? (aka, not really precise either?)
Is there any real working way that I can use an Android device to track real static positions within rooms in a building?
Ideally, I'd be able to mark a point in a room and come back to it later with virtually no drift.
The LocationProvider is different from each Android Device you are using. The SDK does not handle the calculation of your exact location but the phone does. But each device can have one or mare LocationProvider, thats why you need to set some Criterias when your picking a LocationProvider.
To get your exact position on the earth the GPS needs 3 points from 3 different satellites. Thats why the GPS works best in the open space. Regarding making a precise calculation on a static persion inside a building, this conflict with the whole scenario of the GPS-System. I'm not saying it's impossible to get a location inside a building but as with any other signals, obstacles that blocks the signal makes is weaker.
If you are inside a barn with thin walls this might work, but inside a 10 storage building your scenario seems quite impossible.
You can though force your phone to get the best LocationProvider and hopefully that will give you the most precise location. And yes, you can get inside 1-2m in precision outside.
I hope this helps a little. Enjoy your project.
I have the requirment to navigate the user from floor to floor using wifi and gps. If user have have android tablet with wifi connection and walking to get lattitude and longitude .I have to draw or voice recognition to go left or right to tell to the user.Is it possible? if it is can anybody tell how to dO?
Thanks
First of all GPS doesn't work well/at all in closed spaces. WIFI does give you a location but its not very accurate (above 100 meters radius).
in conclusion i would say its a waste of time trying to do something like that because it will perform poorly and be pretty useless.
if you really want to go on and make it then go google for samples and examples and tutorials on how to implement the location Receiver both for FINE and COARSE location.
for the drawing part you will need the orientation sensor to tell you which way you are facing or get the bearing from the gps provider.
this is pretty general info but it should be enough to get you started.
One solution would be to have people walk around and take wifi measurements at different places on each floor, then you can store this, and then you can tell where they are on that particular floor.
You may want to break the building up into grids so you can state they are in Grid 5 D for example, if that is how you label them, or at least show that on a map.
Indoors the GPS will most likely not be working.
The wifi approach isn't foolproof but if you take multiple measurements by stair entrances and elevators you should get a good idea when they change floors, and perhaps have some people able to correct the database if they know they are in a particular grid but the app tells them it is somewhere else, so you can start to get a fuzzy idea where people are.