1<?xml version="1.0" encoding="ISO-8859-1"?>
2<!--
3This file is Copyright (c) 2013 by the GPSD project
4SPDX-License-Identifier: BSD-2-clause
5-->
6<!DOCTYPE refentry PUBLIC
7   "-//OASIS//DTD DocBook XML V4.1.2//EN"
8   "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd">
9<refentry id='gps2udp.1'>
10<refentryinfo><date>01 Marc 2013</date></refentryinfo>
11<refmeta>
12<refentrytitle>gps2udp</refentrytitle>
13<manvolnum>1</manvolnum>
14<refmiscinfo class="source">The GPSD Project</refmiscinfo>
15<refmiscinfo class="manual">GPSD Documentation</refmiscinfo>
16</refmeta>
17<refnamediv id='name'>
18<refname>gps2udp</refname>
19<refpurpose>feed the take from gpsd to one or more aggregation sites</refpurpose>
20</refnamediv>
21<refsynopsisdiv id='synopsis'>
22
23<cmdsynopsis>
24  <command>gps2udp</command>
25      <arg choice='opt'>-h</arg>
26      <arg choice='opt'>-n</arg>
27      <arg choice='opt'>-j</arg>
28      <arg choice='opt'>-a</arg>
29      <arg choice='opt'>-u <replaceable>hostname:udpport</replaceable></arg>
30      <arg choice='opt'>-c <replaceable>count</replaceable></arg>
31      <arg choice='opt'>-d <replaceable>1|2</replaceable></arg>
32      <arg choice='opt'>-v</arg>
33      <group>
34	<replaceable>server</replaceable>
35	  <group><replaceable>:port</replaceable>
36	    <group><replaceable>:device</replaceable></group>
37	</group>
38      </group>
39</cmdsynopsis>
40</refsynopsisdiv>
41
42<refsect1 id='description'><title>DESCRIPTION</title>
43
44<para><application>gps2udp</application> is a tool to connect to
45<application>gpsd</application> and output the received sentences to
46one or many UDP host:port destinations.  This makes the program useful
47for feeding AIS information from <application>gpsd</application> to
48aishub, marinetraffic, shipfinder,... </para>
49
50<para><application>gps2udp</application> does not require root
51privileges, and can be run concurrently with other tools connecting
52to the local <application>gpsd</application> without causing problems.</para>
53
54<para>The output will consist of one or both of NMEA (-n option) or
55JSON (-j option) <application>gpsd</application> sentences. The
56output is sent to one or many destinations host through a UDP network
57socket (-u host:port options) .</para>
58
59<para>Optionally a server, TCP/IP port number and remote device can be given.
60If omitted, <application>gps2udp</application> connects to localhost on
61the default port (2947) and watches all devices opened by
62<application>gpsd</application>.</para>
63
64<para><application>gps2udp</application> may be run as a daemon (-b
65option).</para>
66
67<para><application>gps2udp</application> is designed to run smoothly in
68background; it reconnects automatically to
69<application>gpsd</application> whenever it is restarted. For
70debugging purporses, there is an option to exit gracefully after a given
71count of packets (-c option).</para>
72
73</refsect1>
74<refsect1 id='options'><title>OPTIONS</title>
75
76<para>-h makes <application>gps2udp</application> print
77a usage message and exit.</para>
78
79<para>-n causes NMEA sentences to be output.</para>
80<para>-j causes JSON sentences to be output.</para>
81<para>-u host:port UDP destination for output sentenses (up to five
82destinations).</para>
83
84<para>-a output only AIS messages.</para>
85<para>-b causes <application>gps2udp</application> to run as a daemon.</para>
86<para>-c [count] causes [count] sentences to be output.
87<application>gps2udp</application> will then exit gracefully.</para>
88
89<para>-d 1 prints sent packet on stdout.</para>
90<para>-d 2 prints unsent packet on stdout.</para>
91<para>-v prints the version, then exits.</para>
92</refsect1>
93
94<refsect1 id='exampletitle'><title>EXAMPLE</title>
95<para>With a running <application>gpsd</application> accessible on the
96network </para>
97
98<para><command>gps2udp -d 1 -n -u data.aishub.net:2222 </command> will
99collect data from localhost:gpsd display them on stdout and send a
100copy to test aishub in NMEA format.</para>
101
102<para><command>gps2udp -a -n -b -u data.aishub.net:2222 -u 5.9.207.224:5321 -u 109.200.19.151:4001 fridu.net:2947</command> will collect
103data from a remote gpsd located on fridu.net host, will filter AIS
104messages and send them to 3 destination (aishub, marinetraffic,
105shipfinder) in NMEA format, command is running in background
106mode</para>
107</refsect1>
108
109<refsect1 id='see_also'><title>SEE ALSO</title>
110<para>
111<citerefentry><refentrytitle>gpsd</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
112<citerefentry><refentrytitle>gps</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
113<citerefentry><refentrytitle>libgps</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
114<citerefentry><refentrytitle>libgpsmm</refentrytitle><manvolnum>3</manvolnum></citerefentry>,
115<citerefentry><refentrytitle>gpsprof</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
116<citerefentry><refentrytitle>gpsfake</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
117<citerefentry><refentrytitle>gpsctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
118<citerefentry><refentrytitle>gpscat</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
119<citerefentry><refentrytitle>gpsmon</refentrytitle><manvolnum>1</manvolnum></citerefentry>.
120</para>
121</refsect1>
122
123<refsect1 id='maintainer'><title>AUTHOR</title>
124
125<para>Fulup Ar Foll <email>fulup@sinagot.net</email>.</para>
126
127</refsect1>
128
129</refentry>
130
131