# [OSM-dev] Develop a Simple Mapping Tool for Mobile Phones

Nic Roets nroets at gmail.com
Thu Mar 24 12:00:27 GMT 2011

```On Thu, Mar 24, 2011 at 12:08 PM, Yarik <Iaroslav.Sheptykin at hs-bremen.de> wrote:
>        You have offered help in triangulation in one of the prev
>        emails. A couple links would be awesome for a quick

Firstly, sensors give you magnetism and gravity as 3D vectors. For
every picture, obtain magnetic East (in the horizontal plane) you take
the cross product of the two vectors. Then you get magnetic North by
taking the cross product of magnetic East and gravity. Then you
project the camera vector onto the horizontal plane to get the azimuth
angle. Then get elevation angle with the cosine rule.

When the user selects multiple photos aimed at the same point, you can
estimate that point using some least squares method. Preferably the
photos should have a large angular separation (as seen from the point
being observed), otherwise the results will be inaccurate (in GPS, it
is called Dilution Of Precision).

All these terms are described on Wikipedia, but they focus on linear
variables. Angles are non-linear. So either one should look at books
or papers describing theodolite computations, or just make your own
approximations and simulations. For example it may be sufficient to
assume the Earth is flat after applying the equirectangular
projection.

>
> Greets,
> Yarik
>
>
> On Wed, 2011-03-23 at 20:22 +0200, Nic Roets wrote:
>> On Wed, Mar 23, 2011 at 5:30 PM, Yarik <Iaroslav.Sheptykin at hs-bremen.de> wrote:
>> > Hi Nic!
>> >
>> >        Great to hear! I has been thinking of building a tool like that
>> >        for quite a long time already with slightly different
>> >        functionality than you describe but still very similar. I wrote
>> >        already that I worked on location based mobile games. In many
>> >        games players are encouraged to take pictures of different
>> >        objects. The challenge I always faced in data analyzes was to
>> >        extract any useful information out of those pics about features
>> >        (landmarks in particular). You offer an interesting approach. Do
>> >        you know anything about the last year SoC project? Would it make
>> >        sense to extend its achievements?
>>
>> No, I haven't looked at it.
>>
>> >        Since you say such apps are useful for community, I will develop
>> >        the idea further. I will also try to apply to SoC this year. But
>> >        even in case I fail I would be interested in the development.
>> >        Are you going to apply for SoC too / mentoring?
>>
>> I'm not going to apply for SoC.
>>
>> I'd be happy to informally mentor anyone developing software to
>> process sensor and GPS data. I built up a little bit of experience
>> with my KeypadMapper project, as well as porting Gosmore to Android.
>>
>> In the long term (i.e. not this year) it would be nice to detect logos
>> (trademarks), perhaps do OCR or even photosynth type survey.
>>
>> But in the short term there is no image processing necessary. Simply
>> show the user a crosshair. He can then take multiple "shots" of an
>> object to collect it's height and location.
>
>
>

```