[Telepathy] Geolocation in Telepathy

Mikhail Zabaluev mikhail.zabaluev at gmail.com
Sun Mar 2 14:29:04 PST 2008


Hi,

2008/3/2, Jussi Kukkonen <jhkukkon at cc.hut.fi>:
>
>
> Using a dictionary for position data is somehow compelling, but I am
> worried about the "heaviness" and somehow it feels conceptually wrong: a
> Position is latitude/longitude (and possibly altitude) in WGS-84, not a
> varying collection of values like Address... That said, it is an
> interesting idea, one that I hadn't thought of.


Let me expand on that, using your code example:

    pos.get_position (&time, &lat, &lon, &alt, &accuracy)


What alt receives here if the provider lacks altitude data? How to tell if
it does?

Then, if we consider Python bindings, a straightforward binding would turn
the above into:
(time, lat, lon, alt, accuracy) = pos.get_position()

Not very convenient if you need only some of those values.

I would prefer some kind of a compound value returned, which then could be
mined for data as necessary. It'd also be better, perhaps, for dynamic
language bindings. I can't see where data structure overhead would become a
performance concern, until there's an API that calls for passing massive
position lists. Maybe, separate types for 2D and 3D positions could be
helpful too, if the freeform dictionary approach looks undesirable.

Best regards,
  Mikhail
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/telepathy/attachments/20080303/97407166/attachment.htm 


More information about the Telepathy mailing list