% specify global variables
%
global HUGE_VAL;	HUGE_VAL = 1e99;
global DEBUG;		DEBUG = 0;
global LOADED;		LOADED = 0;	% problem number

global K;		K = 1;		% number of tracks
global L;		L = 1;		% number of best to keep
global M;				% number of states, columns(combos) for K>1
global MP;				% columns(perms)
global N;				% number of samples

global combos;				% combinations and permutations
global perms;
global unique_perms;

global merge_period;    merge_period = HUGE_VAL;	% how often to merge similar paths
global tr_period;       tr_period = HUGE_VAL;		% how often to truncate the trellis

global NBEST;           NBEST = 0;			% for alternative N-best pruning

global states;				% for ISI FSM
global trans;
global FIR;
global FIR_0;
global FIR_length;
global Memory;				% FIR_length - 1

global z;				% viterbi input data vector
global zstate;				% initial viterbi state
global zstate_0;	zstate_0 = 0;	% flag for initial state all 0's

global v;				% viterbi path arrays
global vl;
global vp;
global path_index;
global el_index;
global perm_index;
global perm_offset;

global w;				% viterbi cost arrays
global w0;
global w_min;

global w_save;	% for saving costs vs. time for use in postprocessing, visualization, etc.

% for tracking
%
global TEST;		TEST = 0;		% for testing, no noise, etc.
global log2pi;		log2pi = log(2*pi);
global missed_cost;

% XY data
%
global XY;				% x,y measurement data
global MM;				% measurement counter array
global MM_max;				% maximum number of measurements at any time
global XY_offset;			% index offset into XY array vs. time

global Kn;				% measurement noise variance

% Kalman filters
%
global dt;
global A;
global AT;
global C;
global Ke;
global S2a;
global Ku;
global Kv;
global G;				% G also used for covariance(h) in ISI problems
global GT;

global kxv;

global Winc;	% incremental and total costs per track for K>1
global Wtot;

% apriori cost stuff
%
global Cmiss;				% apriori costs for missed detections
global Cfalse;				% apriori costs for false detections

global false_alarm_rate;

global WINDOW;	WINDOW = 0;		% see vit_tr()
