[OSM-dev] Fwd: Mobile Phone Audio Mapping Tool?

David Earl david at frankieandshadow.com
Fri Mar 27 23:34:11 GMT 2009


On 27/03/2009 21:21, Graham Jones (Physics) wrote:
> I am after a simple way of recording street names when cycling rather 
> than having to write them down.  There is a section on the Wiki on 
> "Audio Mapping", but there is no mention of using a normal mobile phone 
> and bluetooth GPS receiver - the idea is to record audio clips and 
> associated location to import into JOSM later.  The advantage of a phone 
> over the other methods is that it should be able to record both audio, 
> and GPS location at the same time, to avoid the synchronisation 
> problems.  It is also nice and small, and you don't look odd talking 
> into one.   It might even be possible to use a bluetooth headset which 
> would be even easier for cycling...
> 
> I have had a bit of a play and I think I can make it work (the GPS 
> receiver can talk to the phone, and the phone can record sounds), but I 
> haven't stitched it together in to a single application yet. 
> I can't help but think that someone will have tried this before (and 
> presumably failed because I can't find it anywhere?) - does anyone know 
> if I am onto a loser before I go too far down the road of coding it?  
> There is a bit more information at 
> http://wiki.openstreetmap.org/wiki/Talk:Audio_mapping#Mobile_Phone_Version.3F
> 
> Any pointers to where this is going to go wrong would be appreciated!
>

Hi Graham,

I wrote the audio bits in JOSM, so I can tell you what goes on at that 
end, and I also added a new bit recently to support something similar to 
this (so make sure you have a JOSM from the last couple of weeks - I'd 
have to check for the exact build number). Incidentally, the help in 
JOSM is more comprehensive than the help OSM wiki page.

However, a word of caution: the fact they are on the same device doesn't 
necessarily mean you can dispense with sync or calibration. It is quite 
likely the GPS track will generate its time stamps from the GPS 
satellite time and the audio manage its sampling and time stamps from 
the clock on the phone. They may not correspond exactly (indeed you 
probably have to set the one on the phone explicitly) and may drift a 
small amount. I think you should check this first. You may be lucky, but 
don't take it for granted. An error of only second or two can make quite 
a big difference and even if you can set the phone clock to the same as 
the GPS a drift of only 0.1% can make 100m difference on a long 
continuous recording.

How to proceed depends on whether you're recording a continuous sound 
track or a set of snippets.

In all cases you need WAV files. If your phone records another format 
you'll need to convert them to WAV (e.g. using Audacity).

If many, short files then there are two approaches

(a) have a set of WAV files whose (modified) time stamps are those of 
the original recordings (i.e. if you converted them, you'll need to use 
touch to bring the timestamps into sync with the original files).

Tick the appropriate box in the audio preferences to say this is how you 
want to work.

Then when you import audio for a track choose _all_ the files (using 
shift and ctrl click as appropriate in the file chooser dialog). That 
will associate the audio clips at those time points along the track. 
NOTE: the time stamps are those at the *end* of each recording (for 
obvious reasons, I hope), but JOSM will take this into account, so the 
point identified on the track will be at the *beginning* of the recording.

(b) postprocess the GPX file to add <link> elements to the relevant 
trackpoints to refer to audio files. This is a manual equivalent of the 
above. If you want to try this, let me know and I'll look up the exact 
spec of the <link> tag for you.

For a continuous recording, you would still need to sync, because it is 
unlikely your track and recording will start at the same moment. 
However, if you start the recording at the same moment you make a 
waypoint, you won't need to record anything to mark the sync, it will 
just be precisely the beginning of the recording, so you can just 
briefly start playing and then immediately stop the audio from the first 
waymark and sync. (Actually that's true anyway, you could do this on any 
recorder).

HTH

David




More information about the dev mailing list