[RFC] A better dbus gps interface
Sascha Wessel
wessel at nefkom.net
Thu Sep 18 02:09:01 CEST 2008
Hi list,
the current frameworkd gps interface is based on Gypsy.
Gypsy was designed for simple server site implementation using c and
based on NMEA sentences. In my opinion a good api should be more
client/user oriented.
Hence, my suggestions for a better dbus gps interface:
* Remove Gypsy server interface -> frameworkd.conf
* Remove Start/Stop methods -> ousaged's RequestResource
* Remove connection status -> ousaged's GetResourceState
* Merge Position, Accuracy and Course (or is it possible that the
course changes while the position doesn't change and so on?)
* Remove all bitfields and replace by a{sd}
* Replace enum like integers by strings
* Replace this log alike timestamp/bitfield functionality by a more
powerful log (records configurable in frameworkd.conf)
* Add accuracy for time values (for leap seconds etc.)
* Improve functionality for scripts which just want a position once
*** Methods ***
GetFixStatus() -> s
* Description:
- Get current fix status.
* Returns:
- s: status
- "NO"
- "2D"
- "3D"
GetSatellites() -> a{uiuub}
* Description:
- Get current satellite list.
* Returns:
- a: array of satellites
- u: prn
- i: elevation
- u: azimuth
- u: snr
- b: used
GetData(da{s}) -> dda{sd}
* Description:
- Get the GPS data near the given time.
- E.g. get last known 2D position with GetData(INF, ("latitude", "longitude"))
* Parameters:
- d: time in seconds since epoch
- a: required tuples (see below)
* Returns:
- d: time in seconds since epoch
- d: time accuracy in seconds
- a: array of tuples
- ("latitude", double) # 3D and 2D
- ("longitude", double) # 3D and 2D
- ("altitude", double) # 3D
- ("pdop", double) # 3D
- ("hdop", double) # 3D and 2D
- ("vdop", double) # 3D
- ("speed", double) # 3D and 2D
- ("heading", double) # 3D and 2D
- ("climb", double) # 3D
RequestDataInterval(d)
* Description:
- Frequency of occurence of Data signals.
- Defaults to 1 second
- Keeps a list of clients like RequestResource (ousaged)
* Parameters:
- d: seconds between signals (use always the smallest registered value)
RequestSatellitesInterval(d)
* Description:
- Frequency of occurence of Satellites signals.
* Parameters:
-d: seconds between signals
UpdateData(u)
* Description:
- Power on and wait for a fix, emit a Data signal, then power off again.
* Parameters:
- u: timeout in seconds
*** Signals ***
FixStatus(s)
* Description:
- Sent, when the fix status changes.
* Parameters:
- s: status (see GetFixStatus)
Satellites(a{uiuub})
* Description:
- Sent, when the satellite list changes.
* Parameters:
- array of satellites (see GetSatellites)
Data(dda{sd})
* Description:
- Sent, when the GPS data changes.
* Parameters:
- d: time in seconds since epoch
- d: time accuracy in seconds
- a: array of tuples (see GetData)
What do yout think about this?
Greetings,
Sascha
More information about the smartphones-standards
mailing list