Measuring distance - Windows phone app - windows-phone-7

Good evening all.
I'm just trying to collate some ideas really and was wondering if I could pick some brains.
I'd like to develop an app that relies upon measuring distance reasonably accurately. So for example, I have a central point, I want to be able to detect whether the phone is within a radius of a meter.
How could I achieve this?
The points would be static but I don't think GPS would be accurate enough to rely on this solely.
I'm definitely not a hardware chap but is there a way of combining GPS and some other sort of transmitter to ensure accuracy?
Any help or suggests greatly appreciated.

One meter accuracy? It's probably not going to happen with any phone hardware out there - definitely not with any Windows Phone. GPS isn't accurace enough without a differential beacon, and phones don't have the hardware to receive that (and I doubt you have a differential transmitter either).

The location service on the phone (assuming high accuracy is selected) combines data from GPS, cell towers and WiFi hot spots to provide a location.
There is no way to include the use of other sensors to improve this data.
You also won't be able to get the level of accuracy you're after from the phone. It's just not designed for the purpose you describe.

Related

Tracking wrist position using accelerometer in a smart watch

I am working on a smartwatch project. I want the display to be turned off and only come on when the user brings his hand into the watch-viewing position.
I am running my application on the NRF52 MCU which means machine learning is out of the question. I am using a 3-axis accelerometer from STM.
How can I detect when a user moves his hand into the typically watch viewing position? How is this achieved in smartwatches?
I have the following ideas so far:
- Constantly poll accelerometer and calculate pitch and roll values. Then determine what range of pitch and roll values corresponds to this gesture. This seems a bit wasteful because the CPU will have to be always active.
Is there a simple signal processing algorithm or something similar that can achieve this?
Look into Galvanic skin response sensor - It can measure electrical connectivity of the skin.
When internal or external forces cause arousal — of any kind — the skin becomes a better conductor of electricity. Essentially, when you start to sweat, either from exercise or something else, the band will be able to monitor that.
Detecting when someone is sweating gives the software more information about what a user is doing, which allows for better health tracking. Being able to correlate the level of activity with a different source than just gravity from the accelerometer, allows these programs to take on a more trainer-like role — recommending specific exercises and levels of exertion.
Hope this helps!

Impoving ContactTracing Api efficiency with bluetooth signal strength

As per current specs only duration in 5 min increments is tracked. Suggested interval is 200-300ms it seems. In Singapore signal strength was accounted for but this is variable per device. What if we do still also track the signal strength during that time? You would get a curve from weak to strong that gives an indication of the speed of travel while approaching, and couldn't you also derive fairly accurate indications of proximity after just one day of data?
I noticed that beacon libraries already attempt to estimate distance: Understanding ibeacon distancing
But it does not seem these self-calibrate yet based for instance on min-max readings versus moving targets. I'm thinking that could work especially as phones are modified to be always on in that respect.
It is very difficult to accurately determine distance by Bluetooth RSSI measured between two phones because there is a huge variation in the way different phone models measure bluetooth signals. Check out this graph produced by the Open Trace folks behind the effort in Singapore:
Those variations are consistent with my work in this area for the Android Beacon Library open source project. The fragmentation of Android devices has made it impossible to keep up with all the variations in signal strength response.
One point that the Open Trace team did not address in their work, is that there are a number of different bluetooth channels, and RSSI varies greatly on a given phone depending on which channel is being used. Mobile phones give you no indication of what channel the radio was on when a measurement was taken. The channel difference probably accounts for much of the "height" of the blue bars in the graph.
Unfortunately, there is no way to know if a device is approaching or stationary by reading RSSI updates. The changes could be because of natural variation, motion, or changes in obstacles. I do not believe self-calibration in a contact tracing app is viable.
This does not mean that RSSI is worthless for distance estimates, but it does mean that the margin of error is very high in what you can measure. If you see a device at all, there is a very good chance it is within 50 meters. And if you see that the RSSI is stronger than -70 dBm, there is a good chance you are within 2 meters. But there will always be false positives and false negatives.

iBeacons: bearing to beacon?

Partly a coding problem, partly math problem.
Q1. I have an iOS device with compass active. If it knows I'm moving through the field of an iBeacon - or the Beacon is moving through my detection range - would it be possible for a phone to work out (roughly) the relative direction/bearing of that beacon with a series of readings by comparing signal strengths? Has anyone had a try at this?
Q2. Would it be possible to change the Major and Minor values of a beacon regularly (eg: every second) to pass small pieces of info - such as a second user's Bearing and Course?
Q1. It MIGHT be possible but you would need a controlled environment. Either the beacon or the phone needs to be fixed. You also need to be in an area with no obstructions or sources of radio interference.
Then you'd need to use the signal strength (which is sloppy and varies by a fair amount) as one input, and the device's heading info (which is also grossly inaccurate) and do some petty gnarly math on it.
Assuming you could work out the math, the slop in the input readings might make the results too iffy to be useful. (For example, how would you distinguish moving directly towards the beacon from moving 30 degrees to one side or the other? The signal strength would still increase, just not as quickly.
And your algorithm would have to deal with edge cases like moving along a circle around the beacon. In that case the signal strength should not change.
My gut is that even with clever algorithms that input data is just too unreliable to make much sense out of it, beyond "getting warmer" and "getting colder."
As mentioned above, you'd have to track your device's movement within the field, including distance covered and direction, then with multiple readings of signal strength you could theoretically calculate relative direction to the beacon to some degree of accuracy.
As to your second question about changing the minor version number, I have not seen any beacon APIs that allow that, either from the beacon manufacturers or from Apple's implementation.
However, a typical beacon is an ARM or other low power processor with a BLE transceiver, running a program. In theory it should be possible to create your own iBeacon transmitter that changed one of the parameters in order to transmit changing information. You'd have to set up the iOS device with the beacon region only specifying the UUID or UUID and major ID (depending on whether you wanted to change just the minor or change both the major and minor ID in order to transmit changing information.)
Note, too, that iBeacons are a special case of BLE, and the BLE standard does support the sending of arbitrary, changing data. You might be better off implementing your own BLE scheme either instead of or in addition to iBeacons.

Time measurement between two points

i need to measure the time between 2 points. I can not use a simple watch because i have no free hands for this. (mountainbike - downhill)
My first idea was to set two GPS points and measure the the time between those points, but I think it will be to inaccurate.
my second idea was to set one bluetooth device to each Point and just measure the distance from me to the bluetooth device , check the shortest distance and save the time.
But than I realized that I would need 3 bluetooth devices to make a distance calculation, which is kinda annoying.
Any idea how i can measure the time between two points with an accuarcy <1sec ?
I want to control this via smartphone.
edit:
Okay i have another idea. Maybe i could set one bluetooth device to each point. I set the signal strenth to <=1m. Than i could easily start and stop the time until i receive the bluetooth signal on my android.
Do you think this would be the best approach ?
It seems you're trying to take total and split times for a course. Definitively, forget of using bluetooth for other things that are not constant transmissions, with slow connection time... (I speak from experience). Of course you want to do it in the cheap, because there already professional solutions for that (e.g.).
From my point of view, if you want something accurate and been able to integrate it with you phone, you'll need the following:
DIY photocell sensors. Maybe involving simple chip (e.g. msp430), phototransistor-diode pair, cheap 433mhz transmitter and batteries.
DIY 433mhz receiver for your phone. There already many boards that supports android open accessory library, (e.g. 49$ from sparkfun), so you only have to connect it to a 433mhz receiver and to your phone.
Custom code programming in your android phone. To be able to receive the signals from the split signal senders and keep track of all times.
It seems to be a pretty decent project for under $250-200(if you self made it :P).
One possible solution that does not require any special hardware would be to use a smartphone at the finish line. You would only need an extra smartphone (SP) with net connection, and some software.
SP sends the start signal to your phone. You start when you hear the signal.
SP uses its camera to detect when you reach the finish line.
SP calculates the time between start and stop and displays it, and possibly sends the info to your phone, too.
Maybe you could even record a video with time stamps.
(Of course, the low cost solution would be to let one of the guys to use a stopwatch at the finish line.)

device to measure vibration - retrieving data?

hey guys,
i'm working on a concept for university. i wonder what's the easiest and best way to measure certain vibration in a room. imagine a room full o people dancing. is there any affordable device i can put on the floor that sends data to my computer so i can read out vibration values or use vibration as data?
thank you for your help
I would guess that a microphone, as Pointy suggested, would work, but if you're on a near-zero budget, find an old speaker and bolt it face-down to the floor. Connect the wires to a 1/8" phono plug and plug it into the microphone-in jack on your sound card. Record the vibration data using Audacity. The floor's vibration will flex the speaker cone and generate small amounts of electricity, which the sound card input will see. If you put a foam-lined box over the top (actually back) of the speaker you'll minimize the effect of sound waves from the air on the speaker cone.
There is specific noise monitoring equipment which could serve that purpose, depending on how accurate the information you are monitoring needs to be.
I used to operate sound monitoring equipment as part of a rotating equipment inspection program when I was in the Navy. Basically it was a set of transducers you mounted to the equipment you wanted to monitor, and a proprietary box for recording and analyzing the results. I'm sure you could easily replicate that functionality with a PC.
Do a search for "Vibration Monitoring Equipment" or "Condition Monitoring" and see what turns up. If you are at a University with an engineering department I would imagine the ME's would have something like what you're looking for.

Resources