position accuracy

keith preston keithpre at gmail.com
Thu Aug 9 07:30:05 PDT 2007


Interesting you bring this up.   I've been taking a look at the geoclue
position api for the last day and have been trying to clean it up make it
sane and useful.   I am trying to add a doxygen layer so that we get some
decent documentation and expand the examples.   Here is basically the new
xml files that I am proposing as of now.



   - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <node name="*
/org/freedesktop/geoclue/position*">
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <interface name="*
org.freedesktop.geoclue.position*">
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*version*"
>
   <arg type="*i*" name="*major*" direction="*out*" />
   <arg type="*i*" name="*minor*" direction="*out*" />
   <arg type="*i*" name="*micro*" direction="*out*" />
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
service_provider*">
   <arg type="*s*" name="*name*" direction="*out*" />
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
current_position*">
   <arg type="*i*" name="*timestamp*" direction="*out*" />
- <!--

 This is the NMEA standard UTC time in the format 123456 with
represents 12:34:56 hours:minutes:seconds

  -->
   <arg type="*d*" name="*latitude*" direction="*out*" />
- <!--

 Degrees

  -->
   <arg type="*d*" name="*longitude*" direction="*out*" />
- <!--

 Degrees

  -->
   <arg type="*d*" name="*altitude*" direction="*out*" />
- <!--

 Meters

  -->
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <signal name="*
current_position_changed*">
   <arg type="*i*" name="*timestamp*" direction="*out*" />
- <!--

 This is the NMEA standard UTC time in the format 123456 with
represents 12:34:56 hours:minutes:seconds

  -->
   <arg type="*d*" name="*latitude*" direction="*out*" />
- <!--

 Degrees

  -->
   <arg type="*d*" name="*longitude*" direction="*out*" />
- <!--

 Degrees

  -->
   <arg type="*d*" name="*altitude*" direction="*out*" />
- <!--

 Meters

  -->
  </signal>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
current_position_error*">
   <arg type="*d*" name="*latitude_error*" direction="*out*" />
- <!--

 Meters

  -->
   <arg type="*d*" name="*longitude_error*" direction="*out*" />
- <!--

 Meters

  -->
   <arg type="*d*" name="*altitude_error*" direction="*out*" />
- <!--

 Meters

  -->
  </method>
- <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <!--

 status enum    GEOCLUE_POSITION_NO_POSITION_AVAILABLE
      = -1,
                        GEOCLUE_POSITION_TWO_DIMENSION
              = 1,
                        GEOCLUE_POSITION_THREE_DIMENSION
              = 2,
                        GEOCLUE_POSITION_TWO_DIMENSION_DIFFERENTIAL
              = 3,
                        GEOCLUE_POSITION_THREE_DIMENSION_DIFFERENTIAL
              = 4

  -->
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
service_status*">
   <arg type="*i*" name="*status*" direction="*out*" />
   <arg type="*s*" name="*user_message*" direction="*out*" />
- <!--

 This message is a user readable string, generally used to explain why
the backend cannot locate the current position  ("Weak GPS Signal, no
internet connection available for lookup")

  -->
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <signal name="*
service_status*">
   <arg type="*i*" name="*status*" direction="*out*" />
   <arg type="*s*" name="*user_message*" direction="*out*" />
- <!--

 This message is a user readable string, generally used to explain why
the backend cannot locate the current position  ("Weak GPS Signal, no
internet connection available for lookup")

  -->
  </signal>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
current_velocity*">
   <arg type="*i*" name="*timestamp*" direction="*out*" />
- <!--

 This is the NMEA standard UTC time in the format 123456 with
represents 12:34:56 hours:minutes:seconds

  -->
   <arg type="*d*" name="*north_velocity*" direction="*out*" />
- <!--

 Meters per Second

  -->
   <arg type="*d*" name="*east_velocity*" direction="*out*" />
- <!--

 Meters per Second

  -->
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
satellites_in_view*">
   <arg type="*ai*" name="*prn_numbers*" direction="*out*" />
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
satellites_data*">
   <arg type="*i*" name="*prn_number*" direction="*in*" />
   <arg type="*d*" name="*elevation*" direction="*out*" />
- <!--

 Degrees

  -->
   <arg type="*d*" name="*azimuth*" direction="*out*" />
- <!--

 Degrees

  -->
   <arg type="*d*" name="*signal_noise_ratio*" direction="*out*" />
   <arg type="*b*" name="*differential*" direction="*out*" />
   <arg type="*b*" name="*ephemeris*" direction="*out*" />
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <method name="*
civic_location*">
   <arg type="*s*" name="*country*" direction="*out*" />
   <arg type="*s*" name="*region*" direction="*out*" />
   <arg type="*s*" name="*locality*" direction="*out*" />
   <arg type="*s*" name="*area*" direction="*out*" />
   <arg type="*s*" name="*postalcode*" direction="*out*" />
   <arg type="*s*" name="*street*" direction="*out*" />
   <arg type="*s*" name="*building*" direction="*out*" />
   <arg type="*s*" name="*floor*" direction="*out*" />
   <arg type="*s*" name="*room*" direction="*out*" />
   <arg type="*s*" name="*description*" direction="*out*" />
   <arg type="*s*" name="*text*" direction="*out*" />
  </method>
 - <?view=page&name=htmlcompose&ver=1chdyj2lqwlxk#> <signal name="*
civic_location_changed*">
   <arg type="*s*" name="*country*" direction="*out*" />
   <arg type="*s*" name="*region*" direction="*out*" />
   <arg type="*s*" name="*locality*" direction="*out*" />
   <arg type="*s*" name="*area*" direction="*out*" />
   <arg type="*s*" name="*postalcode*" direction="*out*" />
   <arg type="*s*" name="*street*" direction="*out*" />
   <arg type="*s*" name="*building*" direction="*out*" />
   <arg type="*s*" name="*floor*" direction="*out*" />
   <arg type="*s*" name="*room*" direction="*out*" />
   <arg type="*s*" name="*description*" direction="*out*" />
   <arg type="*s*" name="*text*" direction="*out*" />
  </signal>
   <method name="*shutdown*" />
  </interface>
  </node>


Discussion:   So I've addressed many of your issues.   First of all Fix_type
has been changed to service status.   It has a positioning status (with a
few GPS specific terms) and a user readable message about the status
(typically to explain unavailable).  Secondly all position returns have
added altitude into the mix.   We should be thinking 3D.   Hostip can return
0 for altitude and have a large margin of error.   GPS can return what they
know.    As for latitude, longitude error.   They typically should always be
the same, but I think it makes sense because all our other methods have 3
dimensions.   I don't think we should limit ourself based on this
assumption,  you never know what backends people will think of.   I have
also added timestamps to the API.   I believe this is important, because of
some of the future improvement to be discussed.   Then I have added many
signals for the most used methods.   That way applications don't have to
poll.

Improvements to the api
I guess I should probably add a 3 dimension to the velocity api.
Do you see any good addition to the status enum?   I was going to add a
bunch and then I though a human readable string would be better.   The only
ones I thought might be useful are.   "No Service Available, No Position
Available, Currently acquiring position.", are these useful to a program or
just the user?  If it is useful to the program, then I would add, to the
user then piggy back on the string message.
I think now I'm am going to change timestamp.   It probably should be
seconds to the epoch instead of the specific NMEA Time.   This will give us
date accuracy (except for the rollover in 2038)
I've been thinking now that we should add a "position_hint" input to the API
for use in auto submitting your position to Host IP.   There could be some
kind of configuration for privacy in geoclue master.  I wonder if this could
be generic for more API.   I know you can do assisted GPS.   is there a good
way to add this too?

Big changes (sorry this is becoming a spew of thoughts from the last few
days of thinking.)
I think I am going to change the internals to all positioning calls
defaultly go to geoclue master and it farms out calls to the available
backends and arbitrates based on accuracy or some gconf keys (preferred,
default).
I think this means that all positioning calls (in C) will have an extra
arguement on the front of them.
geoclue_posotion_init( geopos* , ...)
geoclue_get_position(geopos*, ...)
Basically the idea will that be normal callers can pass NULL to this
arguement and the internal C code will use a static internal geopos that
defaults to geoclue master.   However if callers want to do something
specific they can make a geopos with the right names and directly connect to
a specific backend.
Geoclue master will need to get an upgrade to have all this arbitration
stuff done.   But I think it should also store the most recent position from
each backend, that way if none of them are available it can default to the
last timestamp (and maybe prompt the user for manually inputing their
position)
Oh yeah, and I don't know if Jussi, you have done some of the object
oriented refactor, but I'm going to do some for the positioning api to try
and make it easier to add a new backend.
Ok, so I think that is all I have.   Once this gets done, I think we can go
"beta stable" on positioning and working on making our automake, debian and
doxygen very clean so that other program can start using us more.

Keith Preston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/geoclue/attachments/20070809/431dc7b6/attachment-0001.htm 


More information about the GeoClue mailing list