;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Example configuration file for vtsid                                       ;
;                                                                            ;
; Copy and edit to suit your requirements                                    ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; General Settings                                                           ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Specify directory to contain output files
; When running more than one copy of vtsid, each copy should have its own
; output directory.

datadir /raw/sid

; Specify the resolution.  This can either be a number of bins, or a frequency
; in Hertz.  Give one or the other.   The number of bins doesn't have to be a
; power of two, but that is the most efficient.  Otherwise, a number of bins
; which is the product of small factors is the next most efficient.  But even
; a prime number of bins is handled reasonably well.   If a resolution is given,
; this will be rounded to correspond to the nearest integer number of bins.

; resolution 1.0       ; Specify a resolution in Hz
bins 8192     ; Specify a number of frequency bins

; Specify how often monitor output records will be generated.  
; Data will be averaged until the output interval is reached, then reported
; and cleared down.
; If this is set to zero, records will be generated as often as possible, which
; means every 1/resolution seconds, or every 2*bins/sample_rate seconds.

monitor_interval 5    ; Monitor output interval, seconds

; Indicate whether to monitor absolute phase.  This requires the input stream
; to have a suitably accurate timestamp.  Remove or comment-out if phase
; measurement is not required.

phase

; Spectrum records.
; Comment out the spectrum_interval statement to disable the spectrum records

spectrum_interval 120   ; Record the spectrum every 120 seconds.

; Specify the frequeny limits of the spectrum records.  If the lower frequency
; is not given, the default is zero.  If the upper frequency is not given,
; the default is the Nyquist frequency.  The given frequencies will be rounded
; to a multiple of the resolution specified above.

;spectrum_lower 0        ; Lower frequency, Hz
;spectrum_upper 24000    ; Upper frequency, Hz

; Signal loss, warning threshold and timeout.  If the RMS signal level on
; any channel falls below the threshold for longer than the timeout period
; an alert message will be raised.

; los 0.05 10        # RMS threshold and timeout in seconds

; Email address for alert messages
; mail someone@someplace

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Channel Configuration                                                      ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; Configure the input channels, indicating which channels are E-field or
; H-field and specify the effective azimuth of each H-field.

; Channels are specified in the order they appear in the input stream
; Format is

;    channel  type   options

; Type is either efield or hfield.
; Options are a comma-separated list
; 
;     az=   Specify effective azimuth of hfield source, mandatory for hfield.
;    cal=   Specify an amplitude calibration factor.  The channel signal is
;           multiplied by this factor before use.  This can be used to balance
;           a pair of loops, or to calibrate E/H ratio for elevation.  The
;           calibration factor defaults to 1.0

; H-field antennas need not be orthogonal, nor aligned with North/South or
; East/West.
; 
; Examples: 
;     ; Single channel of E-field
;     channel efield

;     ; Pair of orthogonal loops, ch1 is N/S aligned, ch2 is E/W
;     channel hfield az=0
;     channel hfield az=90
                
;     ; Non-orthogonal loops, not aligned with cardinal points.
;     ; ch 1 aligned 35/215 deg, ch 2 aligned 145/325 degrees
;     channel hfield az=35
;     channel hfield az=145

;     ; Orthogonal loops but not cardinal aligned, with E-field on ch3
;     channel hfield az=45
;     channel hfield az=135
;     channel efield

channel efield cal=1.0

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Monitor Settings                                                           ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; The remainder of the config file is concerned with listing the signals to
; be monitored.  Each monitor is identified by a case-sensitive 'ident' name.
;
; The format of each line is
;
;    monitor ident type,options
;
;  Type must be one of: noise, signal, msk, or cw
;  
;  The type determines how the channel is monitored and what parameters are
;  to be measured and logged.  Each type is described below.  
;

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Noise bands:

; These are intended for measuring broadband noise and the average level of
; sferics.  These monitors log only amplitude and bearing, and the amplitude
; is normalised to RMS per root Hz.
;
; Must specify center frequency and bandwidth using f= and w= options.

monitor Sferics7 noise,f=7000,w=4000    ; Sferic band, 5khz to 9kHz

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Signals:

; Ordinary signals which have no reliable phase for whatever reason. As with
; noise bands, only amplitude and bearing are logged, but the amplitude is the
; total RMS amplitude within the bandwidth.
;
; Must specify center frequency and bandwidth using f= and w= options.

; It is useful to monitor the hum levels
monitor hum50 signal,f=50,w=2       ; Monitor mains hum level
monitor hum150 signal,f=150,w=6     ; Mains 3rd harmonic

; Various MSK stations that are unreliable or too weak to give a carrier phase
monitor VTX signal,f=16300,w=200    ; 16.3 India
monitor RDL signal,f=18200,w=120    ; 18.1 Russia RDL/RLO/RKS
monitor FTA signal,f=20900,w=200    ; 20.9 France
monitor NPM signal,f=21400,w=100    ; 21.4 Hawaii
monitor HWU signal,f=22600,w=100    ; 22.6 France
monitor NAU cw,f=40800,w=200           ; Aguada, Puerto Rico

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; MSK signals:

; These monitors decode the carrier phase mod 180 and log this along with
; amplitude and bearing.  Amplitude logged is the total RMS amplitude within
; the bandwidth.
;
; The carrier frequency f= and bit rate br= must be accurately specified.
;
; By default, the MSK phase is measured on channel 1.  Use option ch=2, etc to
; specify a different channel.  Alternatively, when using a pair of loop
; antennas, you can give az= to specify a bearing in degrees and the MSK
; phase will be measured along that bearing.
;
; Accuracy can be improved by logging the phase modulo 90 degrees instead of
; 180 - use an option mod=90 to set this mode of operation.  This may become
; the default in a later revision of vtsid so if you want to stay with modulo
; 180 operation, an option mod=180 is recommended.
;
; When using short monitor intervals, eg less than a second, it is necessary
; for the monitor to use a different method of phase measurement.  Set this
; mode with the option 'fast'.  This is only available with mod=90 so you
; will have to specify mod=90,fast.  With the fast option the monitor interval
; can be as low as 5mS.

; The bandwidth of the msk monitor can be set with a w= option.  By default the
; bandwidth is set to 5 times the bitrate which is enough to capture the main
; lobe and first side lobes of the spectrum.  If the signal is strong enough,
; accuracy can be improved by setting w= to 7 or 9 times the bitrate to bring
; in the 2nd and 3rd side lobes.  If an adjacent station is very close and
; the signal weak, using w= 3 times the bitrate will accept just the main lobe.

monitor JXN msk,f=16400,br=50          ; Norway
monitor GBZ msk,f=19580,br=100         ; England
monitor NWC msk,f=19800,br=100         ; Harold Holt, Australia
monitor GQD msk,f=22100,br=50          ; England
monitor DHO msk,f=23400.000060,br=100  ; Germany
monitor NAA msk,f=24000,br=100         ; Cutler, USA
monitor TBB msk,f=26699.9990184,br=50  ; Bafa, Turkey 37:24:45.81N 27:19:24.03E
monitor NRK msk,f=37500,br=100         ; Iceland
monitor NSY msk,f=45900,br=100         ; Italy
monitor GYN2 msk,f=81009.975,br=50     ; Inskip, UK

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; CW signals:

; These monitors are intended for narrow-band signals from which the absolute
; phase is to be measured.  The source must be locked to a frequency standard.
; Typically, time signals and navigation beacons are of this type.

;  Must specify frequency f= and bandwidth w=

monitor MSF cw,f=60000,w=5    ; 60.0 England
monitor DCF cw,f=77500,w=5    ; 77.5 Germany