dump1090.lua 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. -- Copyright 2014-2015 Álvaro Fernández Rojas <noltari@gmail.com>
  2. -- Licensed to the public under the Apache License 2.0.
  3. m = Map("dump1090", "dump1090", translate("dump1090 is a Mode S decoder specifically designed for RTLSDR devices, here you can configure the settings."))
  4. s = m:section(TypedSection, "dump1090", "")
  5. s.addremove = true
  6. s.anonymous = false
  7. enable=s:option(Flag, "disabled", translate("Enabled"))
  8. enable.enabled="0"
  9. enable.disabled="1"
  10. enable.default = "1"
  11. enable.rmempty = false
  12. respawn=s:option(Flag, "respawn", translate("Respawn"))
  13. respawn.default = false
  14. device_index=s:option(Value, "device_index", translate("RTL device index"))
  15. device_index.rmempty = true
  16. device_index.datatype = "uinteger"
  17. gain=s:option(Value, "gain", translate("Gain (-10 for auto-gain)"))
  18. gain.rmempty = true
  19. gain.datatype = "integer"
  20. enable_agc=s:option(Flag, "enable_agc", translate("Enable automatic gain control"))
  21. enable_agc.default = false
  22. freq=s:option(Value, "freq", translate("Frequency"))
  23. freq.rmempty = true
  24. freq.datatype = "uinteger"
  25. ifile=s:option(Value, "ifile", translate("Data file"))
  26. ifile.rmempty = true
  27. ifile.datatype = "file"
  28. iformat=s:option(ListValue, "iformat", translate("Sample format for data file"))
  29. iformat:value("", translate("Default"))
  30. iformat:value("UC8")
  31. iformat:value("SC16")
  32. iformat:value("SC16Q11")
  33. throttle=s:option(Flag, "throttle", translate("When reading from a file play back in realtime, not at max speed"))
  34. throttle.default = false
  35. raw=s:option(Flag, "raw", translate("Show only messages hex values"))
  36. raw.default = false
  37. net=s:option(Flag, "net", translate("Enable networking"))
  38. modeac=s:option(Flag, "modeac", translate("Enable decoding of SSR Modes 3/A & 3/C"))
  39. modeac.default = false
  40. net_beast=s:option(Flag, "net_beast", translate("TCP raw output in Beast binary format"))
  41. net_beast.default = false
  42. net_only=s:option(Flag, "net_only", translate("Enable just networking, no RTL device or file used"))
  43. net_only.default = false
  44. net_bind_address=s:option(Value, "net_bind_address", translate("IP address to bind to"))
  45. net_bind_address.rmempty = true
  46. net_bind_address.datatype = "ipaddr"
  47. net_http_port=s:option(Value, "net_http_port", translate("HTTP server port"))
  48. net_http_port.rmempty = true
  49. net_http_port.datatype = "port"
  50. net_ri_port=s:option(Value, "net_ri_port", translate("TCP raw input listen port"))
  51. net_ri_port.rmempty = true
  52. net_ri_port.datatype = "port"
  53. net_ro_port=s:option(Value, "net_ro_port", translate("TCP raw output listen port"))
  54. net_ro_port.rmempty = true
  55. net_ro_port.datatype = "port"
  56. net_sbs_port=s:option(Value, "net_sbs_port", translate("TCP BaseStation output listen port"))
  57. net_sbs_port.rmempty = true
  58. net_sbs_port.datatype = "port"
  59. net_bi_port=s:option(Value, "net_bi_port", translate("TCP Beast input listen port"))
  60. net_bi_port.rmempty = true
  61. net_bi_port.datatype = "port"
  62. net_bo_port=s:option(Value, "net_bo_port", translate("TCP Beast output listen port"))
  63. net_bo_port.rmempty = true
  64. net_bo_port.datatype = "port"
  65. net_fatsv_port=s:option(Value, "net_fatsv_port", translate("FlightAware TSV output port"))
  66. net_fatsv_port.rmempty = true
  67. net_fatsv_port.datatype = "port"
  68. net_ro_size=s:option(Value, "net_ro_size", translate("TCP raw output minimum size"))
  69. net_ro_size.rmempty = true
  70. net_ro_size.datatype = "uinteger"
  71. net_ro_interval=s:option(Value, "net_ro_interval", translate("TCP raw output memory flush rate in seconds"))
  72. net_ro_interval.rmempty = true
  73. net_ro_interval.datatype = "uinteger"
  74. net_heartbeat=s:option(Value, "net_heartbeat", translate("TCP heartbeat rate in seconds"))
  75. net_heartbeat.rmempty = true
  76. net_heartbeat.datatype = "uinteger"
  77. net_buffer=s:option(Value, "net_buffer", translate("TCP buffer size 64Kb * (2^n)"))
  78. net_buffer.rmempty = true
  79. net_buffer.datatype = "uinteger"
  80. net_verbatim=s:option(Flag, "net_verbatim", translate("Do not apply CRC corrections to messages we forward"))
  81. net_verbatim.default = false
  82. forward_mlat=s:option(Flag, "forward_mlat", translate("Allow forwarding of received mlat results to output ports"))
  83. forward_mlat.default = false
  84. lat=s:option(Value, "lat", translate("Reference/receiver latitude for surface posn"))
  85. lat.rmempty = true
  86. lat.datatype = "float"
  87. lon=s:option(Value, "lon", translate("Reference/receiver longitude for surface posn"))
  88. lon.rmempty = true
  89. lon.datatype = "float"
  90. max_range=s:option(Value, "max_range", translate("Absolute maximum range for position decoding"))
  91. max_range.rmempty = true
  92. max_range.datatype = "uinteger"
  93. fix=s:option(Flag, "fix", translate("Enable single-bits error correction using CRC"))
  94. fix.default = false
  95. no_fix=s:option(Flag, "no_fix", translate("Disable single-bits error correction using CRC"))
  96. no_fix.default = false
  97. no_crc_check=s:option(Flag, "no_crc_check", translate("Disable messages with broken CRC"))
  98. no_crc_check.default = false
  99. phase_enhance=s:option(Flag, "phase_enhance", translate("Enable phase enhancement"))
  100. phase_enhance.default = false
  101. agressive=s:option(Flag, "agressive", translate("More CPU for more messages"))
  102. agressive.default = false
  103. mlat=s:option(Flag, "mlat", translate("Display raw messages in Beast ascii mode"))
  104. mlat.default = false
  105. stats=s:option(Flag, "stats", translate("Print stats at exit"))
  106. stats.default = false
  107. stats_range=s:option(Flag, "stats_range", translate("Collect/show range histogram"))
  108. stats_range.default = false
  109. stats_every=s:option(Value, "stats_every", translate("Show and reset stats every seconds"))
  110. stats_every.rmempty = true
  111. stats_every.datatype = "uinteger"
  112. onlyaddr=s:option(Flag, "onlyaddr", translate("Show only ICAO addresses"))
  113. onlyaddr.default = false
  114. metric=s:option(Flag, "metric", translate("Use metric units"))
  115. metric.default = false
  116. snip=s:option(Value, "snip", translate("Strip IQ file removing samples"))
  117. snip.rmempty = true
  118. snip.datatype = "uinteger"
  119. debug_mode=s:option(Value, "debug", translate("Debug mode flags"))
  120. debug_mode.rmempty = true
  121. ppm=s:option(Value, "ppm", translate("Set receiver error in parts per million"))
  122. ppm.rmempty = true
  123. ppm.datatype = "uinteger"
  124. html_dir=s:option(Value, "html_dir", translate("Base directory for the internal HTTP server"))
  125. html_dir.rmempty = true
  126. html_dir.datatype = "directory"
  127. write_json=s:option(Value, "write_json", translate("Periodically write json output to a directory"))
  128. write_json.rmempty = true
  129. write_json.datatype = "directory"
  130. write_json_every=s:option(Flag, "write_json_every", translate("Write json output every t seconds"))
  131. write_json_every.rmempty = true
  132. write_json_every.datatype = "uinteger"
  133. json_location_accuracy=s:option(ListValue, "json_location_accuracy", translate("Accuracy of receiver location in json metadata"))
  134. json_location_accuracy:value("", translate("Default"))
  135. json_location_accuracy:value("0", "No location")
  136. json_location_accuracy:value("1", "Approximate")
  137. json_location_accuracy:value("2", "Exact")
  138. oversample=s:option(Flag, "oversample", translate("Use the 2.4MHz demodulator"))
  139. oversample.default = false
  140. dcfilter=s:option(Flag, "dcfilter", translate("Apply a 1Hz DC filter to input data"))
  141. dcfilter.default = false
  142. measure_noise=s:option(Flag, "measure_noise", translate("Measure noise power"))
  143. measure_noise.default = false
  144. return m