This repository has been archived by the owner on Sep 5, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
defaults.go
93 lines (86 loc) · 2.25 KB
/
defaults.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
package config
const (
DefaultSourceAddress = "127.0.0.1:1235"
DefaultSampleRate = 1800e3
DefaultCenterFrequency = 740000000
DefaultBeaconOffset = 143e3
DefaultWorkDecimation = 32
DefaultGain = 20
)
const (
DefaultRTLTCPAddress = ":1234"
DefaultHTTPAddress = ":8080"
DefaultAllowControl = true
DefaultMaxWebConnections = 100
DefaultMaxRTLConnections = 5
)
const (
DefaultFFTWindowMaxVal = -70
DefaultFFTWindowRange = 40
DefaultFFTWindowWidth = 512
DefaultFFTWindowHeight = 256
DefaultFFTHighQuality = true
)
const (
DefaultTranslatorGain = 64
DefaultTranslatorTransitionWidth = 15e3
)
const (
DefaultAGCAttackRate = 0.01
DefaultAGCDecayRate = 0.2
DefaultAGCReference = 1
DefaultAGCGain = 10
DefaultAGCMaxGain = 65535
)
const (
DefaultCostasLoopBandwidth = 0.01
)
var DefaultConfig = ProgramConfig{
Source: SourceConfig{
Address: DefaultSourceAddress,
SampleRate: DefaultSampleRate,
CenterFrequency: DefaultCenterFrequency,
Gain: DefaultGain,
},
Server: ServerConfig{
RTLTCPAddress: DefaultRTLTCPAddress,
HTTPAddress: DefaultHTTPAddress,
AllowControl: DefaultAllowControl,
MaxWebConnections: DefaultMaxWebConnections,
MaxRTLConnections: DefaultMaxRTLConnections,
WebSettings: WebSettings{
Name: "PU2NVX Server",
HighQualityFFT: DefaultFFTHighQuality,
SegFFT: FFTWindowSetting{
MaxVal: DefaultFFTWindowMaxVal,
Range: DefaultFFTWindowRange,
Width: DefaultFFTWindowWidth,
Height: DefaultFFTWindowHeight,
},
FullFFT: FFTWindowSetting{
MaxVal: DefaultFFTWindowMaxVal,
Range: DefaultFFTWindowRange,
Width: DefaultFFTWindowWidth,
Height: DefaultFFTWindowHeight,
},
},
},
Processing: ProcessingConfig{
BeaconOffset: DefaultBeaconOffset,
WorkDecimation: DefaultWorkDecimation,
AGC: AGCConfig{
AttackRate: DefaultAGCAttackRate,
DecayRate: DefaultAGCDecayRate,
Reference: DefaultAGCReference,
Gain: DefaultAGCGain,
MaxGain: DefaultAGCMaxGain,
},
CostasLoop: LoopConfig{
Bandwidth: DefaultCostasLoopBandwidth,
},
Translation: TranslationConfig{
TransitionWidth: DefaultTranslatorTransitionWidth,
Gain: DefaultTranslatorGain,
},
},
}