문제

I am making an ios application in which it is to be determined that wether the person is sitting or standing.I wanted to know that if there is any method to find automatically that the person is sitting or standing like we can get the height from sea level with the help of CLLocation Manager.So like this can we get the height of iPhone from the ground level in any way?

도움이 되었습니까?

해결책

This is not possible for the following reasons:

  1. The phone can tell you its height above sea level, the accuracy of which has a larger margin of error than the difference between a sitting and a standing person
  2. Even if 1. did not apply, and you knew the precise height of the ground at your current location and the additional height of the phone, this would still be meaningless, as it doesn't take into account buildings, the height of the person, their posture and so forth.

You may have more luck using the motion coprocessor on newer models, you could assume that a standing person moves about more than a sitting person, or something. Or accelerometer readings to detect changes of position. But altitude is definitely not the way to go.

다른 팁

You cannot find out by altitude if a person is standing or sitting. Accuracy of GPS is much to low. Which is at best 6m for altitude.

But if you are really clever you could try other approaches:

-Use the acceleratoin sensor: A standing person might move a bit more than a sitting one, or moves different. [Sorry, I did not saw that user jrturton has written the same, bit this indicates that this might work]

  • Sitting persons often type on the keyboard. You can measure that with the accelerometer, by frequence analysis after doing a FFT.

  • Walking persons: A person that walks does not sit: Detect typical walking steps, with aclerometer or even with an ios API that is new in ios7. (I remeber there is a step counter)

These all are no accurate detections, but may raise the probability to detect a sitting person-.

If you get that to work, I will have major respect. Post an update if you succeed.
Expect 2,5 to 3,5 fulltime working month to get that to work (in some cases)

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top