Determine if the user is indoors or outdoors?

Is there a way to determine if a user is indoor or outdoor? I am not interested in the internal display, just if the user is in the room or not, without asking the user.

If the user uses Wifi, the user may be indoors or if the user is on the road, for example.

+4
source share
7 answers

It is impossible to know that you are 100% sure. As a rule, the GPS signal will be weaker, but not always. In addition, the fact that the user's coordinates are on the road does not mean that he can be closed, and the signal strength can be a week, and the coordinates are corrupted. However, depending on how accurate you want your algorithm to be, you could rely on signal strength (and possibly position) to give you something.

If you want to go to the next level, although it may turn out to be a waste of time, given that the user usually has models of movement (at home for work, work in the store, Sunday in the park, etc.)), you can try above. as well as several other parameters, such as a pedometer (moving, walking, running), speed (high speed, lack of movement from the pedometer, means that it is in the car), noise, brightness, etc. and run a logistic regression algorithm, possibly requiring user feedback as a training set. However, as you can see, this will become quite large and definitely not worth it if your application is small.

+4
source

No, there is no API to verify this. Looking at things like Wifi won't help you either, because it's possible that the user is using a mobile hotspot and is currently standing on the field. I am afraid that you should ask the user what they are indoors or outdoors, but are you sure that you are solving the right problem here?

+1
source

You cannot finally determine if the user is inside or outside (and WIFI against Cellular did not help ... you can use WIFI when outside and cellular when inside). I think the closest thing you could get (and even this is too many differences to be reliable) is to note the changes in GPS signal strength (horizontalAccuracy, verticalAccuracy, etc.).

The bottom line is not a software way to test this.

+1
source

Did you use the Reachablitiy class to determine if a user is using Wi-Fi or an Internet connection method? Please check the sample here .

0
source

using the number of visible GPS satellites is one indicator, on ios you cannot get this attribute.
Gps signal strength, measured in dB, is another indicator, but not available in ios Api.
the next is the hdop value, also not available to ios.
What remains is Precise Accuracy, which somehow combines the above.

Other simple solutions:
people usually move outside: check GPS speed
A complete probabky solution is out if your scope: digital roadmaps built for navigation and other applications have the coordinates of inner city houses (not in all cities), you can check if pos is in such a polygon combined with accuracy.

I believe that you can accomplish your task with the rhevsimple solution, so that you get a 90-95% degree of correction detection

0
source

As far as I know, there is one useful API (it is also possible to work in the background): CMMotionActivityManager from CoreMotion . It provides CMMotionActivity with some motion actions such as automotive or cycling . Depending on your point of view, you can define a car as open (or closed).

It is also unlikely that you are cycling indoors. But keep in mind that cycling does not really work , although it is part of the API.

0
source

It seems that any sensor-based approach does not solve the problem. Research work solved your problem by combining all the mentioned methods in this topic.

Pengfei Zhou et al. [ 1 ] proposed by the IODetector ("Indoor / Outdoor Detector"), a detection service that detects indoor / outdoor environments. It uses various sensors, including an accelerometer, a proximity sensor, an ambient light sensor, and a magnetometer. He also observes cellular strength signals. According to their experiment, the detection efficiency of the system (accuracy / recall) is about 85%.

1 Pengfei Zhou, Yuanqing Zheng, Zhenjiang Li, Mo Li, and Gobin Shen. 2012. IODetector: General Service for Outdoor Indoor Detection. Proceedings of the 10th ACM Conference on Embedded Network Sensor Systems (SenSys '12), 113-126.8

0
source

All Articles