[jdev] XEP-0080: adding location source information
Ilya Braude
ilya at drakontas.com
Wed Feb 10 15:44:43 CST 2010
I would like to propose the extension of the user location spec with
source information, i.e. where the location information is coming from.
Having discussed this topic with several people at the recent summit I
think there is enough interest to make it part of the XEP.
There are several use cases to motivate this change:
Users may get location information from GPS, set it manually, use WiFi
or cell tower triangulation, etc.
Knowing source information would enable clients to display appropriate
icons for the users who publish location.
This could also be useful when updating or aggregating information from
separate sources. For example, a client that is integrated with a car's
systems can send location updates using GPS, and more accurate speed
updates from the car's speedometer (thanks to tkoski for the use case).
Devices with built-in digital compasses to send more accurate heading
information with a different source tag (this is probably more useful if
the device is mounted in a known orientation, such as in a vehicle, but
still useful).
I think the way to accomplish this is to add a 'source' element as a
child of the 'geoloc' element:
<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'>
<source>GPS</source>
<lat>45.44</lat>
<lon>12.33</lon>
</geoloc>
An alternative would be to add a 'source' attribute to the 'geoloc'
element, but I don't like that as much:
<geoloc xmlns='http://jabber.org/protocol/geoloc' xml:lang='en'
source='GPS'>
...
</geoloc>
Another issue to consider is whether to recommend well-known values for
the field. GPS and manual are probably going to be the most common use
cases, so standardized strings to represent them would be useful for
interoperability.
Ilya
More information about the JDev
mailing list