gps2udp.adoc 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  1. = gps2udp(1)
  2. :author: Fulup Ar Foll
  3. :date: 25 February 2021
  4. :email: fulup@sinagot.net.
  5. :keywords: gps, gpsd, gps2udp, AIS
  6. :manmanual: GPSD Documentation
  7. :mansource: GPSD Version {gpsdver}
  8. :robots: index,follow
  9. :sectlinks:
  10. :toc: macro
  11. :type: manpage
  12. :webfonts!:
  13. include::../www/inc-menu.adoc[]
  14. == NAME
  15. gps2udp - feed the take from gpsd to one or more aggregation sites
  16. == SYNOPSIS
  17. *gps2udp* [OPTIONS] [server[:port[:device]]]
  18. *gps2udp* -h
  19. *gps2udp* -V
  20. == DESCRIPTION
  21. *gps2udp* is a tool to connect to *gpsd* and output the received sentences
  22. to one or many UDP host:port destinations. This makes the program useful
  23. for feeding AIS information from *gpsd* to aishub, marinetraffic,
  24. shipfinder,...
  25. *gps2udp* does not require root privileges, but can run as root. It
  26. can be run concurrently with other tools connecting to the local *gpsd*
  27. without causing problems.
  28. The output will consist of one or both of NMEA (*-n* option) or JSON
  29. (*-j* option) *gpsd* sentences. The output is sent to one or many
  30. destinations host through a UDP network socket (*-u HOST:PORT*
  31. options) .
  32. Optionally a server, TCP/IP port number and remote device can be given.
  33. If omitted, *gps2udp* connects to localhost on the default port (2947) and
  34. watches all devices opened by *gpsd*.
  35. *gps2udp* may be run as a daemon (*-b* option).
  36. *gps2udp* is designed to run smoothly in background; it reconnects
  37. automatically to *gpsd* whenever it is restarted. For debugging purporses,
  38. there is an option to exit gracefully after a given count of packets
  39. (*-c* option).
  40. == OPTIONS
  41. *-?*, *-h*, *--help*::
  42. -Print a usage message and exit.
  43. *-a*, *--ais*::
  44. Send only AIS messages.
  45. *-b*, *--daemon*::
  46. Causes *gps2udp* to run as a daemon.
  47. *-c COUNT*, *--count COUNT*::
  48. Exit after COUNT sentences are sent.
  49. *-d LVL*, *--debug LVL*::
  50. Set debug level to LVL. LVL = 0 prints nothing. LVL = 1 prints sent
  51. packet on stdout. LVL = 2 prints ignored packets.
  52. *-j*, *--json*::
  53. Causes JSON sentences to be output.
  54. *-n*, *--nmea*::
  55. Causes NMEA sentences to be output.
  56. *-t*, *--tpv*::
  57. Only output TPV sentences. Implies --json.
  58. *-u HOST:PORT*, *--udp HOST:PORT*::
  59. UDP destination for output sentenses (up to five destinations).
  60. *-v*, *-V*, *--version*::
  61. Prints the program version, then exit. -v is deprecated December 2020.
  62. == ARGUMENTS
  63. By default, clients collect data from the local *gpsd* daemon running
  64. on localhost, using the default GPSD port 2947. The optional argument
  65. to any client may override this behavior: *[server[:port[:device]]]*
  66. For further explanation, and examples, see the *ARGUMENTS* section in
  67. the *gps*(1) man page
  68. == EXAMPLES
  69. With a running *gpsd* accessible on the network this will collect data
  70. from localhost:gpsd display them on stdout and send a copy to test
  71. aishub in NMEA format.
  72. ----
  73. gps2udp -d 1 -n -u data.aishub.net:2222
  74. ----
  75. This will collect data from a remote *gpsd* located on fridu.net host,
  76. will filter AIS messages and send them to 3 destinations (aishub,
  77. marinetraffic, shipfinder) in NMEA format, while running in background
  78. mode
  79. ----
  80. gps2udp -a -n -b -u data.aishub.net:2222 -u 5.9.207.224:5321 \
  81. -u 109.200.19.151:4001 fridu.net:2947
  82. ----
  83. == RETURN VALUES
  84. *0*:: on success.
  85. *1*:: on failure
  86. == SEE ALSO
  87. *gpsd*(8), *gps*(1)
  88. == RESOURCES
  89. *Project web site:* {gpsdweb}
  90. == COPYING
  91. This file is Copyright 2013 by the GPSD project +
  92. SPDX-License-Identifier: BSD-2-clause