Poor Man's Digital Survey Device

TheBitterEnd

Well-known member
I wasn't going to post about this until I had done a bit more work but since something similar has come up on another thread here goes ...

Let me start out by saying that this is not what I thought I'd end up with when I thought about trying to make a cheaper disto about a year ago. But this approach has the main advantage that it works with any Laser Measure and requires no hardware modifications.

I used a ?50 Laser Distance Measure off ebay
dsd1.JPG


An Android phone
dsd2.JPG


and an enclosure that allows buttons on both devices to be pressed
dsd3.JPG


The phone is the clever bit. It has a 3 axis magnetometer and a 3 axis accelerometer, it also has a camera. The basic process is to point the Laser, read the bearing, measure the distance and then then use the camera to OCR (optical character recognition) the Laser distance reading. All the readings are logged on the phone and there is the option to save the Image of the distance measurement so that the OCR can be verified.

The phone has a Flight Mode which turns off all the transmitters and reduces the interference with the magnetometers. However there is a crucial thing to note about Android phone magnetometers - THEY ARE ALWAYS IN CALIBRATE MODE - this has pros and cons. The main advantage is that it is really easy to calibrate the magnetometers, the main disadvantage is that you always need to calibrate before taking a reading.

The upshot is that I can get better than 1% loop closures (as good as I can get with a compass).

As I said at the start I wasn't really intending to put this out there yet so I haven't had chance to post any code (and it probably needs a bit of tidying and documentation). I also think I can improve the capturing process to reduce the effects of the phone display on the calibration so work still to do. But if anyone wants to have a o let me know.

 

martinm

New member
That is very cool. I already have an Android phone (only 2.1 I'm afraid, a Motorola Defy) and a Disto A3, would this work with that setup? I've been thinking about Android development for a while now (got Eclipse, the Google SDK, ADT, etc.) but not quite got round to it yet...
 

TheBitterEnd

Well-known member
Mine is a Galaxy Y, 2.3.6 although I believe the code compiles for 2.2. I don't know about 2.1 but I get the impression there are some fairly significant differences.

I found there to be a bit of a learning curve with Android development and there is an awful lot of rubbish out there on the development forums, but when you get into it it is good for quick results.

As I said, the code really isn't ready for release but if you are interested I don't mind sending you a copy to see how you get on with it.
 

martinm

New member
OK Cool. You've got 2.3.x Gingerbread then. It's OK, I'll wait awhile. I'm due an upgrade in January so will hopefully be on 2.3.x then or even 4.0.x Ice Cream Sandwich or 4.1.x Jelly Bean.

I guess the OCR will work ok with a Disto A3, so this setup would save me a lot of dosh. If you need any help testing, etc. when I've upgraded u r welcome...

Actually, I might go into the t-mobile shop this week and see if I can get my Defy upgraded. I'm very happy with it otherwise and see no reason to upgrade other than to get a later version of Android...

Regards, Mel.
 

TheBitterEnd

Well-known member
Yes the OCR should work with most LCDs (as long as the digits are reasonably large). It would be good to get it tested on a different phone/Android/Laser because I'm sure they all have theor quirks.
 

wookey

Active member
Nifty! As you say, somewhat cheap and cheerful over an integrated device, but being able to make it from widely-available hardware is clearly very useful. You say your code 'isn't ready' but that really shouldn't matter. PLease put it up somewhere so other people can try it out with other devices, help you improve it and so on. Code is never 'finished' and rarely 'ready', and the sooner you put it up the sooner you might get some help and feedback. Don't worry if it looks like crap at the moment - it's still one of, if not _the_ best in the world for this application, right now.

Could you bring it to one of the CSG training meets (Swales (SWCC), 24/25th November and Yorks (Bull Pot Farm) Jan19/ 20th), or, perhaps better, the next technology symposium next year sometime so we can have a play?
 

martinm

New member
Cave_Troll said:
not all android phones have a compass though

Do you know of a list of which ones do CT? I'm due an upgrade in Jan anyway, so if my Defy doesn't, I'll try and get one which does then. Ta.
 

TheBitterEnd

Well-known member
It's not that the code is a mess it's more that as it stands it needs some fairly careful use to make it work accurately, it is also in 3 bits and would need quite a lot of documentation and support. Experience shows that if I release early beta code, especially on this forum people don't understand the spftware development process and get bored with testing it or just write it off as rubbish. I'd rather write code than write docs and do support so I would like to get the process a bit more nailed down* before it has too wide a distribution.


*Full disclosure: it turns out that the biggest single effect on the magnetometers comes from the screen back light. Keeping the screen at a constant brightness allows the calibration to compensate for this but doing something such as popping up an input box (to input station data for example) messes this up, so I want to refine the process so it goes something like Station Data ? Calibrate ? Read Bearing ? Read Distance. It's not far off, possibly a week or two.
 

martinm

New member
TheBitterEnd said:
I'd rather write code than write docs and do support so I would like to get the process a bit more nailed down* before it has too wide a distribution.

I'm quite happy to help with the docs when you feel the code is ready, it's what I do anyway!  (y)

Regards, Mel.
 

Cave_Troll

Active member
mmilner said:
Cave_Troll said:
not all android phones have a compass though

Do you know of a list of which ones do CT? I'm due an upgrade in Jan anyway, so if my Defy doesn't, I'll try and get one which does then. Ta.
I don't. just that mine (HTC Desire C) seems not to.
my shopping list was mainly,  android v4 +, size (i don't want a 4.5"), and what was available to me on contract.
I didn't think to ask about compass
 

TheBitterEnd

Well-known member
mmilner said:
TheBitterEnd said:
I'd rather write code than write docs and do support so I would like to get the process a bit more nailed down* before it has too wide a distribution.

I'm quite happy to help with the docs when you feel the code is ready, it's what I do anyway!  (y)

Regards, Mel.

Thanks Mel, I'll be in touch.

As for which Android phones have magnetic sensors the ultimate way to find out is to get up the keypad, dial  *#0*# (yes really!) and click sensors - you should see Accelerometers, Proximity and Magnetic.
 

martinm

New member
TheBitterEnd said:
As for which Android phones have magnetic sensors the ultimate way to find out is to get up the keypad, dial  *#0*# (yes really!) and click sensors - you should see Accelerometers, Proximity and Magnetic.

Hmm, my Defy comes up with a network error when I try that. (Prob cos it's Android 2.1.) BUT I went to Location & Security settings and besides the 'Use wireless networks' & 'Use GPS Satellites' entries there's a 'Calibrate Compass' option! I did what it said and it seems to be pointing in the right direction for North, so it seems my Defy (which is dust, scratch and water resistant) has a compass! 8) With your software I may be able to get all this working!  (y)
 

Cave_Troll

Active member
TheBitterEnd said:
As for which Android phones have magnetic sensors the ultimate way to find out is to get up the keypad, dial  *#0*# (yes really!) and click sensors - you should see Accelerometers, Proximity and Magnetic.

I get "Connection problem or invalid MMI Code" when i try that
 

kdxn

New member
An interesting development but the magnetic compass chips in mobile phones are not good enough for a BCRA cave survey Grade 3 let alone Grade 5.

The DistoX has three orthogonal high resolution sensors for the magnetic field which is why it can be used for BCRA Grade 5 cave surveys.
 

martinm

New member
kdxn said:
An interesting development but the magnetic compass chips in mobile phones are not good enough for a BCRA cave survey Grade 3 let alone Grade 5.

The DistoX has three orthogonal high resolution sensors for the magnetic field which is why it can be used for BCRA Grade 5 cave surveys.

But a Grade 3-ish survey is better than none, don't you think. I have a number of caves to survey and a Grade 3-ish survey will do fine for me. No-one else will do it so it'll be good just good to get even a rough survey done on them...

Regards, Mel.
 
Top