#pragma once
#ifndef __PARAMS_H__
#define __PARAMS_H__
//header file content

#include <cmath> 
#include <iostream> 
//preamble for signal tracked
static int preambleL1Bits[8] = { 1, -1, -1, -1, 1, -1, 1, 1 };
#define sizePreamble								8
#define prnsPerBit									20 //number of bits per PRN (L1 CA is 20 per bit since one bit period is 20ms and a
//PRN period is 1ms) - also depends on coherent integration time for tracking
#define msToProcess									37000

//trackedChannels
#define numberTrackedChannels						8
#define	searchOffset								0
#define thresholdForCorrelator						160 // how many PRN/bits we accept to say we detected a preamble
#define periodPreamble								6000//how much a prn repeats itself (igven in signal ICD) in ms
#define numberIterations							7 //for LSE

//path to read incoming correlators
#define readIp										0 //if we read from text file it is a 0 and if we compute through tracking function it is a 1
#define correlatorTxtFilePath						"../outText/demodulationData.bin"
#define correlatorBinFilePath						""

//parameters for ephemeris
#define msForEphemeris								30020 //number of IPs required for ephemeris computation
#define numberSubframes                             5 //5 for GPS L1
#define numberBitsPerSubframe                       300 //for gPS L1CA

//atmospheric corrections
#define useIonoCorr									false
#define useTropoCorr								false

//constants for ephemeris and satellite position pseudoranges and LSE
#define gpsPi										3.1415926535898
#define F											-4.442807633e-10
#define OmegaeDot									7.2921151467e-5
#define GM											3.986004418e14
#define startOffsetGPS								68.8020
#define speedLight									299792458
#define dtr											gpsPi/180
#define navSolutionUpdate							500 //every 500 milliseconds

//signal properties
#define samplingFrequency							12.5e6
#define codeFreqBasis								1.023e6
#define prnLength									1023
#define samplesPerCode								samplingFrequency/ (codeFreqBasis/ prnLength)
#define	numberBytesForSample						4

#endif