Create README.md
[project/luci.git] / applications / luci-dump1090 / luasrc / model / cbi / dump1090.lua
1 --[[
2 LuCI - Lua Configuration Interface - dump1090 support
3
4 Copyright 2014 Álvaro Fernández Rojas <noltari@gmail.com>
5
6 Licensed under the Apache License, Version 2.0 (the "License");
7 you may not use this file except in compliance with the License.
8 You may obtain a copy of the License at
9
10         http://www.apache.org/licenses/LICENSE-2.0
11
12 $Id$
13 ]]--
14
15 m = Map("dump1090", "dump1090", translate("dump1090 is a Mode S decoder specifically designed for RTLSDR devices, here you can configure the settings."))
16
17 s = m:section(TypedSection, "dump1090", "")
18 s.addremove = true
19 s.anonymous = false
20
21 enable=s:option(Flag, "disabled", translate("Enabled"))
22 enable.enabled="0"
23 enable.disabled="1"
24 enable.default = "1"
25 respawn=s:option(Flag, "respawn", translate("Respawn"))
26 respawn.default = false
27
28 device_index=s:option(Value, "device_index", translate("RTL device index"))
29 device_index.rmempty = true
30 device_index.datatype = "uinteger"
31
32 gain=s:option(Value, "gain", translate("Gain (-10 for auto-gain)"))
33 gain.rmempty = true
34 gain.datatype = "integer"
35
36 enable_agc=s:option(Flag, "enable_agc", translate("Enable automatic gain control"))
37 enable_agc.default = false
38
39 freq=s:option(Value, "freq", translate("Frequency"))
40 freq.rmempty = true
41 freq.datatype = "uinteger"
42
43 ifile=s:option(Value, "ifile", translate("Data file"))
44 ifile.rmempty = true
45 ifile.datatype = "file"
46
47 raw=s:option(Flag, "raw", translate("Show only messages hex values"))
48 raw.default = false
49
50 net=s:option(Flag, "net", translate("Enable networking"))
51
52 modeac=s:option(Flag, "modeac", translate("Enable decoding of SSR Modes 3/A & 3/C"))
53 modeac.default = false
54
55 net_beast=s:option(Flag, "net_beast", translate("TCP raw output in Beast binary format"))
56 net_beast.default = false
57
58 net_only=s:option(Flag, "net_only", translate("Enable just networking, no RTL device or file used"))
59 net_only.default = false
60
61 net_http_port=s:option(Value, "net_http_port", translate("HTTP server port"))
62 net_http_port.rmempty = true
63 net_http_port.datatype = "port"
64
65 net_ri_port=s:option(Value, "net_ri_port", translate("TCP raw input listen port"))
66 net_ri_port.rmempty = true
67 net_ri_port.datatype = "port"
68
69 net_ro_port=s:option(Value, "net_ro_port", translate("TCP raw output listen port"))
70 net_ro_port.rmempty = true
71 net_ro_port.datatype = "port"
72
73 net_sbs_port=s:option(Value, "net_sbs_port", translate("TCP BaseStation output listen port"))
74 net_sbs_port.rmempty = true
75 net_sbs_port.datatype = "port"
76
77 net_bi_port=s:option(Value, "net_bi_port", translate("TCP Beast input listen port"))
78 net_bi_port.rmempty = true
79 net_bi_port.datatype = "port"
80
81 net_bo_port=s:option(Value, "net_bo_port", translate("TCP Beast output listen port"))
82 net_bo_port.rmempty = true
83 net_bo_port.datatype = "port"
84
85 net_ro_size=s:option(Value, "net_ro_size", translate("TCP raw output minimum size"))
86 net_ro_size.rmempty = true
87 net_ro_size.datatype = "uinteger"
88
89 net_ro_rate=s:option(Value, "net_ro_rate", translate("TCP raw output memory flush rate"))
90 net_ro_rate.rmempty = true
91 net_ro_rate.datatype = "uinteger"
92
93 net_heartbeat=s:option(Value, "net_heartbeat", translate("TCP heartbeat rate in seconds"))
94 net_heartbeat.rmempty = true
95 net_heartbeat.datatype = "uinteger"
96
97 net_buffer=s:option(Value, "net_buffer", translate("TCP buffer size 64Kb * (2^n)"))
98 net_buffer.rmempty = true
99 net_buffer.datatype = "uinteger"
100
101 lat=s:option(Value, "lat", translate("Reference/receiver latitude for surface posn"))
102 lat.rmempty = true
103 lat.datatype = "integer"
104
105 lon=s:option(Value, "lon", translate("Reference/receiver longitude for surface posn"))
106 lon.rmempty = true
107 lon.datatype = "integer"
108
109 fix=s:option(Flag, "fix", translate("Enable single-bits error correction using CRC"))
110 fix.default = false
111
112 no_fix=s:option(Flag, "no_fix", translate("Disable single-bits error correction using CRC"))
113 no_fix.default = false
114
115 no_crc_check=s:option(Flag, "no_crc_check", translate("Disable messages with broken CRC"))
116 no_crc_check.default = false
117
118 phase_enhance=s:option(Flag, "phase_enhance", translate("Enable phase enhancement"))
119 phase_enhance.default = false
120
121 agressive=s:option(Flag, "agressive", translate("More CPU for more messages"))
122 agressive.default = false
123
124 mlat=s:option(Flag, "mlat", translate("Display raw messages in Beast ascii mode"))
125 mlat.default = false
126
127 stats=s:option(Flag, "stats", translate("Print stats at exit"))
128 stats.default = false
129
130 stats_every=s:option(Value, "stats_every", translate("Show and reset stats every seconds"))
131 stats_every.rmempty = true
132 stats_every.datatype = "uinteger"
133
134 onlyaddr=s:option(Flag, "onlyaddr", translate("Show only ICAO addresses"))
135 onlyaddr.default = false
136
137 metric=s:option(Flag, "metric", translate("Use metric units"))
138 metric.default = false
139
140 snip=s:option(Flag, "snip", translate("Strip IQ file removing samples"))
141 snip.rmempty = true
142 snip.datatype = "uinteger"
143
144 debug_mode=s:option(Flag, "debug", translate("Debug mode flags"))
145 debug_mode.rmempty = true
146
147 ppm=s:option(Flag, "ppm", translate("Set receiver error in parts per million"))
148 ppm.rmempty = true
149 ppm.datatype = "uinteger"
150
151 return m