![]() |
![]() |
![]() |
Gypsy Reference Manual | ![]() |
---|---|---|---|---|
GypsyAccuracy; #define GYPSY_ACCURACY_DBUS_SERVICE #define GYPSY_ACCURACY_DBUS_INTERFACE enum GypsyAccuracyFields; GypsyAccuracy* gypsy_accuracy_new (const char *object_path); GypsyAccuracyFields gypsy_accuracy_get_accuracy (GypsyAccuracy *accuracy, double *pdop, double *hdop, double *vdop, GError **error);
GypsyAccuracy is used whenever the client program wishes to know about GPS accuracy changes. It can report the current accuracy, and has a signal to notify listeners to changes.
typedef struct _GypsyAccuracy GypsyAccuracy;
There are no public fields in GypsyAccuracy.
#define GYPSY_ACCURACY_DBUS_SERVICE "org.freedesktop.Gypsy"
A define containing the address of the Accuracy service
#define GYPSY_ACCURACY_DBUS_INTERFACE "org.freedesktop.Gypsy.Accuracy"
A define containing the name of the Accuracy interface
typedef enum { GYPSY_ACCURACY_FIELDS_NONE = 0, GYPSY_ACCURACY_FIELDS_POSITION = 1 << 0, GYPSY_ACCURACY_FIELDS_HORIZONTAL = 1 << 1, GYPSY_ACCURACY_FIELDS_VERTICAL = 1 << 2, } GypsyAccuracyFields;
A bitmask telling which fields in the accuracy_changed callback are valid
GypsyAccuracy* gypsy_accuracy_new (const char *object_path);
Creates a new GypsyAccuracy object that listens for accuracy changes
from the GPS found at object_path
.
object_path : |
Object path to the GPS device |
Returns : | A GypsyAccuracy object |
GypsyAccuracyFields gypsy_accuracy_get_accuracy (GypsyAccuracy *accuracy, double *pdop, double *hdop, double *vdop, GError **error);
Obtains the current accuracy, if known, from the GPS device. pdop
, hdop
and vdop
can be NULL if the result is not required.
accuracy : |
A GypsyAccuracy |
pdop : |
Pointer to store the position DOP |
hdop : |
Pointer to store the horizonal DOP |
vdop : |
Pointer to store the vertical DOP |
error : |
Pointer to store a GError |
Returns : | Bitmask of GypsyAccuracyFields indicating what fields were set |
void user_function (GypsyAccuracy *fields, gint pdop, gdouble hdop, gdouble vdop, gdouble arg4, gpointer user_data) : Run First / No Recursion
The ::accuracy-changed signal is emitted when the GPS device
indicates that one or more of the accuracy fields has changed.
The fields which have changed will be indicated in the fields
bitmask.
fields : |
A bitmask of GypsyAccuracyFields indicating which of the following fields are valid |
pdop : |
The new position DOP |
hdop : |
The new horizonal DOP |
vdop : |
The new vertical DOP |
user_data : |
user data set when the signal handler was connected. |