=item B<dilution_of_precision>
-Vertical and horizontal dilution.
+Vertical and horizontal dilution (type instance "horizontal" or "vertical").
It should be between 0 and 3.
-Look at the documentaiton of your GPS to know more.
+Look at the documentation of your GPS to know more.
=back
Port "2947"
# 15 ms timeout
Timeout 0.015
- # PauseRead of 5 sec. between readings:
- PauseRead 5
- # PauseConnect of 1 sec. between connection tentatives:
- PauseConnect 1
+ # PauseConnect of 5 sec. between connection attempts.
+ PauseConnect 5
</Plugin>
Available configuration options:
=item B<Host> I<Host>
-The host on which gpsd runs. Defaults to B<localhost>.
+The host on which gpsd daemon runs. Defaults to B<localhost>.
=item B<Port> I<Port>
Timeout in seconds (default 0.015 sec).
-=item B<PauseRead> I<Seconds>
+The GPS data stream is fetch by the plugin form the daemon.
+It waits for data to be available, if none arrives it times out
+and loop for another reading.
+Mind to put a low value gpsd expects value in the micro-seconds area (500 us) since
+the waiting function is blocking.
-Pause to apply between readings in seconds (default 1 sec).
+This only applies from gpsd release-2.95.
=item B<PauseConnect> I<Seconds>
-Pause to apply between tentative of connection in seconds (default 1 sec).
+Pause to apply between attempts of connection to gpsd in seconds (default 5 sec).
=back
#define CGPS_TRUE 1
#define CGPS_FALSE 0
#define CGPS_DEFAULT_HOST "localhost"
-#define CGPS_DEFAULT_PORT "2947"
+#define CGPS_DEFAULT_PORT "2947" /* DEFAULT_GPSD_PORT */
#define CGPS_DEFAULT_TIMEOUT TIME_T_TO_CDTIME_T (0.015)
-#define CGPS_DEFAULT_PAUSE_READ TIME_T_TO_CDTIME_T (1)
#define CGPS_DEFAULT_PAUSE_CONNECT TIME_T_TO_CDTIME_T (5)
#define CGPS_MAX_ERROR 100
#define CGPS_CONFIG "?WATCH={\"enable\":true,\"json\":true,\"nmea\":false}\r\n"
char *host;
char *port;
cdtime_t timeout;
- cdtime_t pause_read;
cdtime_t pause_connect;
} cgps_config_t;
if (!gps_waiting (&gpsd_conn))
#endif
{
- if (cgps_thread_pause(cgps_config_data.pause_read) == CGPS_FALSE)
- {
- goto stop;
- }
-
continue;
}
cf_util_get_service (child, &cgps_config_data.port);
else if (strcasecmp ("Timeout", child->key) == 0)
cf_util_get_cdtime (child, &cgps_config_data.timeout);
- else if (strcasecmp ("Pauseread", child->key) == 0)
- cf_util_get_cdtime (child, &cgps_config_data.pause_read);
else if (strcasecmp ("PauseConnect", child->key) == 0)
cf_util_get_cdtime (child, &cgps_config_data.pause_connect);
else
return 0;
}
- DEBUG ("gps plugin: config{host: \"%s\", port: \"%s\", timeout: %.6f sec., \
-pause read: %.3f sec, pause connect: %.3f sec.}",
+ DEBUG ("gps plugin: config{host: \"%s\", port: \"%s\", timeout: %.6f sec., pause connect: %.3f sec.}",
cgps_config_data.host, cgps_config_data.port,
CDTIME_T_TO_DOUBLE (cgps_config_data.timeout),
- CDTIME_T_TO_DOUBLE (cgps_config_data.pause_read),
CDTIME_T_TO_DOUBLE (cgps_config_data.pause_connect));
status = plugin_thread_create (&cgps_thread_id, NULL, cgps_thread, NULL);
cgps_config_data.host = sstrdup (CGPS_DEFAULT_HOST);
cgps_config_data.port = sstrdup (CGPS_DEFAULT_PORT);
cgps_config_data.timeout = CGPS_DEFAULT_TIMEOUT;
- cgps_config_data.pause_read = CGPS_DEFAULT_PAUSE_READ;
cgps_config_data.pause_connect = CGPS_DEFAULT_PAUSE_CONNECT;
plugin_register_complex_config ("gps", cgps_config);