Mara Branzanti contribution for Google Summer of Code (GSoC 2013)

- Galileo Telemetry page decoder
- Galileo Ephemeris and almanac decoder  (still experimental!)
 

git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@399 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
Javier Arribas 2013-07-30 16:40:20 +00:00
parent 9bfd2bb32a
commit 01dd425e58
8 changed files with 987 additions and 519 deletions

5
README
View File

@ -215,6 +215,11 @@ By default, CMake will build the Release version, meaning that the compiler will
$ cd gnss-sdr/build
$ cmake -DCMAKE_BUILD_TYPE=Debug ../
for eclipse
cmake -G "Eclipse CDT4 - Unix Makefiles" -DCMAKE_BUILD_TYPE=Debug -DECLIPSE_CDT4_GENERATE_SOURCE_PROJECT=TRUE -DCMAKE_ECLIPSE_VERSION=3.7 -DCMAKE_ECLIPSE_MAKE_ARGUMENTS=-j8 ../
$ make
$ make install

View File

@ -229,8 +229,8 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
if (abs(preamble_diff - GALILEO_INAV_PREAMBLE_PERIOD_SYMBOLS) < 1)
{
//std::cout<<"d_sample_counter="<<d_sample_counter<<std::endl;
//std::cout<<"corr_value="<<corr_value<<std::endl;
std::cout<<"d_sample_counter="<<d_sample_counter<<std::endl;
std::cout<<"corr_value="<<corr_value<<std::endl;
// NEW Galileo page part is received
// 0. fetch the symbols into an array
int frame_length=GALILEO_INAV_PAGE_PART_SYMBOLS-d_symbols_per_preamble;
@ -239,9 +239,14 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
for (int i=0;i<frame_length;i++)
{
page_part_symbols[i]=in[0][i+d_symbols_per_preamble].Prompt_I; // because last symbol of the preamble is just received now!
}
if (corr_value>0)
{
page_part_symbols[i]=in[0][i+d_symbols_per_preamble].Prompt_I; // because last symbol of the preamble is just received now!
}else{
page_part_symbols[i]=-in[0][i+d_symbols_per_preamble].Prompt_I; // because last symbol of the preamble is just received now!
}
}
// 1. De-interleave
deinterleaver(GALILEO_INAV_INTERLEAVER_ROWS,GALILEO_INAV_INTERLEAVER_COLS,page_part_symbols, page_part_symbols_deint);
@ -250,11 +255,7 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
// 2.2 Take into account the possible inversion of the polarity due to PLL lock at 180º
for (int i=0;i<frame_length;i++)
{
if (corr_value<0)
{
page_part_symbols_deint[i]=-page_part_symbols_deint[i];
}
if (i%2==0)
if ((i+1)%2==0)
{
page_part_symbols_deint[i]=-page_part_symbols_deint[i];
}
@ -265,49 +266,44 @@ int galileo_e1b_telemetry_decoder_cc::general_work (int noutput_items, gr_vector
// 3. Call the Galileo page decoder
// std::cout<<"frame_symbols=[";
// for (int i=0;i<frame_length;i++)
// {
// if (page_part_symbols[i]>0)
// {
// std::cout<<",1";
// }else{
// std::cout<<",0";
// }
// }
// std::cout<<"]"<<std::endl;
// std::cout<<"frame_symbols_deint=[";
// for (int i=0;i<frame_length;i++)
// {
// if (page_part_symbols_deint[i]>0)
// {
// std::cout<<",1";
// }else{
// std::cout<<",0";
// }
// }
// std::cout<<"]"<<std::endl;
//
// std::cout<<"frame_bits=[";
// for (int i=0;i<frame_length/2;i++)
// {
// if (page_part_bits[i]>0)
// {
// std::cout<<",1";
// }else{
// std::cout<<",0";
// }
// }
// std::cout<<"]"<<std::endl;
std::string page_String;
//std::cout<<"frame_bits=[";
for(int i=0; i < (frame_length/2); i++)
{
if (page_part_bits[i]>0)
{
page_String.push_back('1');
//std::cout<<",1";
}else{
page_String.push_back('0');
//std::cout<<",0";
}
//sprintf(&page_String[i], "%d", page_part_bits[i]); // this produces a memory core dumped...
}
//std::cout<<"]"<<std::endl;
Galileo_Navigation_Message decode_page;
std::cout<<"page_string="<<page_String<<std::endl; //correctly transformed to char
if (page_part_bits[0]==1)
{
std::cout<<"Page Odd"<<std::endl;
decode_page.split_page(page_String.c_str(), flag_even_word_arrived);
flag_even_word_arrived=0;
std::cout<<"Page type ="<< page_part_bits[1]<<std::endl;
}
else
{
std::cout<<"Page Even"<<std::endl;
decode_page.split_page(page_String.c_str(), flag_even_word_arrived);
flag_even_word_arrived=1;
std::cout<<"Page type ="<< page_part_bits[1]<<std::endl;
}
if (page_part_bits[0]==1)
{
std::cout<<"Page Odd"<<std::endl;
}else
{
std::cout<<"Page Even"<<std::endl;
}
//ToDo: Call here the frame decoder
d_flag_preamble = true;

View File

@ -70,6 +70,7 @@ public:
~galileo_e1b_telemetry_decoder_cc();
void set_satellite(Gnss_Satellite satellite); //!< Set satellite PRN
void set_channel(int channel); //!< Set receiver's channel
int flag_even_word_arrived;
/*!
* \brief Set the satellite data queue
*/
@ -109,6 +110,7 @@ private:
long d_fs_in;
//gr::trellis::interleaver d_interleaver;
// navigation message vars

View File

@ -67,18 +67,209 @@ const int GALILEO_PAGE_TYPE_BITS = 6;
const int GALILEO_DATA_JK_BITS =128;
const std::vector<std::pair<int,int>> type({{1,6}});
const std::vector<std::pair<int,int>> PAGE_TYPE_bit({{1,6}});;
/*Page 1 - Word type 1: Ephemeris (1/4)*/
const std::vector<std::pair<int,int>> IOD_nav_1_bit({{7,10}});
const std::vector<std::pair<int,int>> T0E_1_bit({{17,14}});
const double t0e_1_LSB = 60;
const std::vector<std::pair<int,int>> M0_1_bit({{31,32}});
const double M0_1_LSB = TWO_N31;
const std::vector<std::pair<int,int>> e_1_bit({{63,32}});
const double e_1_LSB = TWO_N33;
const std::vector<std::pair<int,int>> A_1_bit({{95,32}});
const double A_1_LSB_gal = TWO_N19;
//last two bits are reserved
/*Page 2 - Word type 2: Ephemeris (2/4)*/
const std::vector<std::pair<int,int>> IOD_nav_2_bit({{7,10}});
const std::vector<std::pair<int,int>> OMEGA_0_2_bit({{17,32}});
const double OMEGA_0_2_LSB = TWO_N31;
const std::vector<std::pair<int,int>> i_0_2_bit({{49,32}});
const double i_0_2_LSB = TWO_N31;
const std::vector<std::pair<int,int>> omega_2_bit({{81,32}});
const double omega_2_LSB = TWO_N31;
const std::vector<std::pair<int,int>> iDot_2_bit({{113,14}});
const double iDot_2_LSB = TWO_N43;
//last two bits are reserved
/*Word type 3: Ephemeris (3/4) and SISA*/
const std::vector<std::pair<int,int>> IOD_nav_3_bit({{7,10}});
const std::vector<std::pair<int,int>> OMEGA_dot_3_bit({{17,24}});
const double OMEGA_dot_3_LSB = TWO_N43;
const std::vector<std::pair<int,int>> delta_n_3_bit({{41,16}});
const double delta_n_3_LSB = TWO_N43;
const std::vector<std::pair<int,int>> C_uc_3_bit({{57,16}});
const double C_uc_3_LSB = TWO_N29;
const std::vector<std::pair<int,int>> C_us_3_bit({{73,16}});
const double C_us_3_LSB = TWO_N29;
const std::vector<std::pair<int,int>> C_rc_3_bit({{89,16}});
const double C_rc_3_LSB = TWO_N5;
const std::vector<std::pair<int,int>> C_rs_3_bit({{105,16}});
const double C_rs_3_LSB = TWO_N5;
const std::vector<std::pair<int,int>> SISA_3_bit({{121,8}});
/*Word type 4: Ephemeris (4/4) and Clock correction parameters*/
const std::vector<std::pair<int,int>> IOD_nav_4_bit({{7,10}});
const std::vector<std::pair<int,int>> SV_ID_PRN_4_bit({{17,6}});
const std::vector<std::pair<int,int>> C_ic_4_bit({{23,16}});
const double C_ic_4_LSB = TWO_N29;
const std::vector<std::pair<int,int>> C_is_4_bit({{39,16}});
const double C_is_4_LSB = TWO_N29;
const std::vector<std::pair<int,int>> t0c_4_bit({{55,14}}); //
const double t0c_4_LSB = 60;
const std::vector<std::pair<int,int>> af0_4_bit({{69,31}}); //
const double af0_4_LSB = TWO_N34;
const std::vector<std::pair<int,int>> af1_4_bit({{100,21}}); //
const double af1_4_LSB = TWO_N46;
const std::vector<std::pair<int,int>> af2_4_bit({{121,6}});
const double af2_4_LSB = TWO_N59;
const std::vector<std::pair<int,int>> spare_4_bit({{121,6}});
//last two bits are reserved
/*Word type 5: Ionospheric correction, BGD, signal health and data validity status and GST*/
/*Ionospheric correction*/
/*Az*/
const std::vector<std::pair<int,int>> ai0_5_bit({{7,11}}); //
const double ai0_5_LSB = TWO_N2;
const std::vector<std::pair<int,int>> ai1_5_bit({{18,11}}); //
const double ai1_5_LSB = TWO_N8;
const std::vector<std::pair<int,int>> ai2_5_bit({{29,14}}); //
const double ai2_5_LSB = TWO_N15;
/*Ionospheric disturbance flag*/
const std::vector<std::pair<int,int>> Region1_5_bit({{43,1}}); //
const std::vector<std::pair<int,int>> Region2_5_bit({{44,1}}); //
const std::vector<std::pair<int,int>> Region3_5_bit({{45,1}}); //
const std::vector<std::pair<int,int>> Region4_5_bit({{46,1}}); //
const std::vector<std::pair<int,int>> Region5_5_bit({{47,1}}); //
const std::vector<std::pair<int,int>> BGD_E1E5a_5_bit({{48,10}}); //
const double BGD_E1E5a_5_LSB = TWO_N32;
const std::vector<std::pair<int,int>> BGD_E1E5b_5_bit({{58,10}}); //
const double BGD_E1E5b_5_LSB = TWO_N35;
const std::vector<std::pair<int,int>> E5b_HS_5_bit({{68,2}}); //
const std::vector<std::pair<int,int>> E1B_HS_5_bit({{70,2}}); //
const std::vector<std::pair<int,int>> E5b_DVS_5_bit({{72,1}}); //
const std::vector<std::pair<int,int>> E1B_DVS_5_bit({{73,1}}); //
/*GST*/
const std::vector<std::pair<int,int>> WN_5_bit({{74,12}});
const std::vector<std::pair<int,int>> TOW_5_bit({{86,20}});
const std::vector<std::pair<int,int>> spare_5_bit({{106,23}});
/* Page 6 */
const std::vector<std::pair<int,int>> A0_6_bit({{7,32}});
const double A0_6_LSB = TWO_N30;
const std::vector<std::pair<int,int>> A1_6_bit({{39,24}});
const double A1_6_LSB = TWO_N50;
const std::vector<std::pair<int,int>> Delta_tLS_6_bit({{63,8}});
const std::vector<std::pair<int,int>> t0t_6_bit({{71,8}});
const double t0t_6_LSB = 3600;
const std::vector<std::pair<int,int>> WNot_6_bit({{79,8}});
const std::vector<std::pair<int,int>> WN_LSF_6_bit({{86,8}});
const std::vector<std::pair<int,int>> DN_6_bit({{95,3}});
const std::vector<std::pair<int,int>> Delta_tLSF_6_bit({{97,8}});
const std::vector<std::pair<int,int>> TOW_6_bit({{106,20}});
/* Page 7 */
const std::vector<std::pair<int,int>>IOD_a_7_bit({{7,4}});
const std::vector<std::pair<int,int>>WN_a_7_bit({{11,2}});
const std::vector<std::pair<int,int>>t0a_7_bit({{13,10}});
const double t0a_7_LSB = 600;
const std::vector<std::pair<int,int>>SVID1_7_bit({{23,6}});
const std::vector<std::pair<int,int>>Delta_alpha_7_bit({{29,13}});
const double Delta_alpha_7_LSB = TWO_N9;
const std::vector<std::pair<int,int>>e_7_bit({{42,11}});
const double e_7_LSB = TWO_N16;
const std::vector<std::pair<int,int>>omega_7_bit({{53,16}});
const double omega_7_LSB = TWO_N15;
const std::vector<std::pair<int,int>>delta_i_7_bit({{69,11}});
const double delta_i_7_LSB = TWO_N14;
const std::vector<std::pair<int,int>>Omega0_7_bit({{80,16}});
const double Omega0_7_LSB = TWO_N15;
const std::vector<std::pair<int,int>>Omega_dot_7_bit({{96,11}});
const double Omega_dot_7_LSB = TWO_N33;
const std::vector<std::pair<int,int>>M0_7_bit({{107,16}});
const double M0_7_LSB = TWO_N15;
/* Page 8 */
const std::vector<std::pair<int,int>>IOD_a_8_bit({{7,4}});
const std::vector<std::pair<int,int>>af0_8_bit({{11,16}});
const double af0_8_LSB = TWO_N19;
const std::vector<std::pair<int,int>>af1_8_bit({{27,13}});
const double af1_8_LSB = TWO_N38;
const std::vector<std::pair<int,int>>E5b_HS_8_bit({{40,2}});
const std::vector<std::pair<int,int>>E1B_HS_8_bit({{42,2}});
const std::vector<std::pair<int,int>>SVID2_8_bit({{44,6}});
const std::vector<std::pair<int,int>>DELTA_A_8_bit({{50,13}});
const double DELTA_A_8_LSB = TWO_N9;
const std::vector<std::pair<int,int>>e_8_bit({{63,11}});
const double e_8_LSB = TWO_N16;
const std::vector<std::pair<int,int>>omega_8_bit({{74,16}});
const double omega_8_LSB = TWO_N15;
const std::vector<std::pair<int,int>>delta_i_8_bit({{90,11}});
const double delta_i_8_LSB = TWO_N14;
const std::vector<std::pair<int,int>>Omega0_8_bit({{101,16}});
const double Omega0_8_LSB = TWO_N15;
const std::vector<std::pair<int,int>>Omega_dot_8_bit({{117,11}});
const double Omega_dot_8_LSB = TWO_N33;
/* Page 9 */
const std::vector<std::pair<int,int>>IOD_a_9_bit({{7,4}});
const std::vector<std::pair<int,int>>WN_a_9_bit({{11,2}});
const std::vector<std::pair<int,int>>t0a_9_bit({{13,10}});
const double t0a_9_LSB = 600;
const std::vector<std::pair<int,int>>M0_9_bit({{23,16}});
const double M0_9_LSB = TWO_N15;
const std::vector<std::pair<int,int>>af0_9_bit({{39,16}});
const double af0_9_LSB = TWO_N19;
const std::vector<std::pair<int,int>>af1_9_bit({{54,13}});
const double af1_9_LSB = TWO_N38;
const std::vector<std::pair<int,int>>E5b_HS_9_bit({{68,2}});
const std::vector<std::pair<int,int>>E1B_HS_9_bit({{70,2}});
const std::vector<std::pair<int,int>>SVID3_9_bit({{72,6}});
const std::vector<std::pair<int,int>>DELTA_A_9_bit({{78,13}});
const double DELTA_A_9_LSB = TWO_N9;
const std::vector<std::pair<int,int>>e_9_bit({{91,11}});
const double e_9_LSB = TWO_N16;
const std::vector<std::pair<int,int>>omega_9_bit({{102,16}});
const double omega_9_LSB = TWO_N15;
const std::vector<std::pair<int,int>>delta_i_9_bit({{118,11}});
const double delta_i_9_LSB = TWO_N14;
/* Page 10 */
const std::vector<std::pair<int,int>>IOD_a_10_bit({{7,4}});
const std::vector<std::pair<int,int>>Omega0_10_bit({{11,16}});
const double Omega0_10_LSB = TWO_N15;
const std::vector<std::pair<int,int>>Omega_dot_10_bit({{27,11}});
const double Omega_dot_10_LSB = TWO_N33;
const std::vector<std::pair<int,int>>M0_10_bit({{38,16}});
const double M0_10_LSB = TWO_N15;
const std::vector<std::pair<int,int>>af0_10_bit({{54,16}});
const double af0_10_LSB = TWO_N19;
const std::vector<std::pair<int,int>>af1_10_bit({{70,13}});
const double af1_10_LSB = TWO_N38;
const std::vector<std::pair<int,int>>E5b_HS_10_bit({{83,2}});
const std::vector<std::pair<int,int>>E1B_HS_10_bit({{85,2}});
const std::vector<std::pair<int,int>> A_0G_10_bit({{87,16}});
const double A_0G_10_LSB = TWO_N35;
const std::vector<std::pair<int,int>>A_1G_10_bit({{103,12}});
const double A_1G_10_LSB = TWO_N51;
const std::vector<std::pair<int,int>>t_0G_10_bit({{115,9}});
const double t_0G_10_LSB = 3600;
const std::vector<std::pair<int,int>>WN_0G_10_bit({{123,6}});
/* Page 0 */
const std::vector<std::pair<int,int>>Time_0_bit({{7,2}});
const std::vector<std::pair<int,int>>WN_0_bit({{97,12}});
const std::vector<std::pair<int,int>> TOW_0_bit({{109,20}});
/*Page 1*/
const std::vector<std::pair<int,int>> PAGE_TYPE_bit({{1,6}});
const std::vector<std::pair<int,int>> IOD_nav_page1({{7,10}});
const std::vector<std::pair<int,int>> T0E_bit({{17,14}});
const double t0e_LSB = 60;
const std::vector<std::pair<int,int>> M0_bit({{31,32}});
const double M0_LSB = TWO_N31;
const std::vector<std::pair<int,int>> e_bit({{63,32}});
const double e_LSB = TWO_N33;
const std::vector<std::pair<int,int>> A_bit({{95,32}});
const double A_LSB = TWO_N19;
// Galileo E1 primary codes

View File

@ -51,8 +51,15 @@ const double TWO_P32 = (4294967296.0); //!< 2^32 this is too big for
const double TWO_P56 = (7.205759403792794e+016); //!< 2^56
const double TWO_P57 = (1.441151880758559e+017); //!< 2^57
const double TWO_N2 = (0.25); //!< 2^-2
const double TWO_N5 = (0.03125); //!< 2^-5
const double TWO_N8 = (0.00390625); //!< 2^-8
const double TWO_N9 = (0.001953125); //!< 2^-9
const double TWO_N11 = (4.882812500000000e-004); //!< 2^-11
const double TWO_N14 = (0.00006103515625); //!< 2^-14
const double TWO_N15 = (0.00003051757813); //!< 2^-15
const double TWO_N16 = (0.0000152587890625); //!< 2^-16
const double TWO_N19 = (1.907348632812500e-006); //!< 2^-19
const double TWO_N20 = (9.536743164062500e-007); //!< 2^-20
const double TWO_N21 = (4.768371582031250e-007); //!< 2^-21
@ -64,10 +71,17 @@ const double TWO_N30 = (9.313225746154785e-010); //!< 2^-30
const double TWO_N31 = (4.656612873077393e-010); //!< 2^-31
const double TWO_N32 = (2.328306436538696e-010); //!< 2^-32
const double TWO_N33 = (1.164153218269348e-010); //!< 2^-33
const double TWO_N34 = (5.82076609134674e-011); //!< 2^-34
const double TWO_N35 = (2.91038304567337e-011); //!< 2^-35
const double TWO_N38 = (3.637978807091713e-012); //!< 2^-38
const double TWO_N43 = (1.136868377216160e-013); //!< 2^-43
const double TWO_N46 = (1.4210854715202e-014); //!< 2^-46
const double TWO_N50 = (8.881784197001252e-016); //!< 2^-50
const double TWO_N51 = (4.44089209850063e+016); //!< 2^-51
const double TWO_N55 = (2.775557561562891e-017); //!< 2^-55
const double TWO_N59 = (1.73472347597681e-018); //!< 2^-59
const double PI_TWO_N19 = (5.992112452678286e-006); //!< Pi*2^-19
const double PI_TWO_N43 = (3.571577341960839e-013); //!< Pi*2^-43

File diff suppressed because it is too large Load Diff

View File

@ -51,45 +51,160 @@ class Galileo_Navigation_Message {
private:
//bool read_navigation_bool(std::bitset<GALILEO_SUBFRAME_BITS> bits, const std::vector<std::pair<int,int> > parameter);
bool read_navigation_bool(std::bitset<GALILEO_DATA_JK_BITS> bits, const std::vector<std::pair<int,int> > parameter);
//void print_galileo_word_bytes(unsigned int GPS_word);
unsigned long int read_navigation_unsigned(std::bitset<GALILEO_DATA_JK_BITS> bits, const std::vector< std::pair<int,int> > parameter);
unsigned long int read_page_type_unsigned(std::bitset<GALILEO_PAGE_TYPE_BITS> bits, const std::vector< std::pair<int,int> > parameter);
//signed long int read_navigation_signed(std::bitset<GALILEO_SUBFRAME_BITS> bits, const std::vector<std::pair<int,int> > parameter);
signed long int read_navigation_signed(std::bitset<GALILEO_DATA_JK_BITS> bits, const std::vector<std::pair<int,int> > parameter);
int x,y;
public:
int flag_even_word;
/*Word type 1: Ephemeris (1/4)*/
int IOD_nav_1; // IOD_nav page 1
double t0e; // Ephemeris reference time [s]
double M0; // Mean anomaly at reference time [semi-circles]
double e; // Eccentricity
double A; // Square root of the semi-major axis [metres^1/2]
int IOD_nav_1; // IOD_nav page 1
double t0e_1; // Ephemeris reference time [s]
double M0_1; // Mean anomaly at reference time [semi-circles]
double e_1; // Eccentricity
double A_1; // Square root of the semi-major axis [metres^1/2]
/*Word type 2: Ephemeris (2/4)*/
/*Word type 2: Ephemeris (2/4)*/
int IOD_nav_2; // IOD_nav page 2
double OMEGA_0_2; // Longitude of ascending node of orbital plane at weekly epoch [semi-circles]
double i_0_2; // Inclination angle at reference time [semi-circles]
double omega_2; // Argument of perigee [semi-circles]
double iDot_2; // Rate of inclination angle [semi-circles/sec]
/*Word type 3: Ephemeris (3/4) and SISA*/
/*Word type 3: Ephemeris (3/4) and SISA*/
int IOD_nav_3; //
double OMEGA_dot_3; // Rate of right ascension [semi-circles/sec]
double delta_n_3; // Mean motion difference from computed value [semi-circles/sec]
double C_uc_3; // Amplitude of the cosine harmonic correction term to the argument of latitude [radians]
double C_us_3; // Amplitude of the sine harmonic correction term to the argument of latitude [radians]
double C_rc_3; // Amplitude of the cosine harmonic correction term to the orbit radius [meters]
double C_rs_3; // Amplitude of the sine harmonic correction term to the orbit radius [meters]
double SISA_3; //
/*Word type 4: Ephemeris (4/4) and Clock correction parameters*/
/*Word type 5: Ionospheric correction, BGD, signal health and data validity status and GST*/
/*Word type 6: GST-UTC conversion parameters*/
/*Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number*/
/*Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2)*/
/*Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2)*/
/*Word type 10: Almanac for SVID3 (2/2) and GST-GPS conversion parameters*/
/*Word type 0: I/NAV Spare Word*/
/*Word type 4: Ephemeris (4/4) and Clock correction parameters*/
int IOD_nav_4; //
int SV_ID_PRN_4; //
double C_ic_4; // Amplitude of the cosine harmonic correction term to the angle of inclination [radians]
double C_is_4; // Amplitude of the sine harmonic correction term to the angle of inclination [radians]
/*Clock correction parameters*/
double t0c_4; //Clock correction data reference Time of Week [sec]
double af0_4; //SV clock bias correction coefficient [s]
double af1_4; //SV clock drift correction coefficient [s/s]
double af2_4; //SV clock drift rate correction coefficient [s/s^2]
double spare_4;
void split_page(char *page); /* Takes in input a page (Odd or Even) of 120 bit, split it according ICD 4.3.2.3 and join Data_k with Data_j*/
/*Word type 5: Ionospheric correction, BGD, signal health and data validity status and GST*/
/*Ionospheric correction*/
/*Az*/
double ai0_5; //Effective Ionisation Level 1st order parameter [sfu]
double ai1_5; //Effective Ionisation Level 2st order parameter [sfu/degree]
double ai2_5; //Effective Ionisation Level 3st order parameter [sfu/degree]
/*Ionospheric disturbance flag*/
bool Region1_flag_5; // Ionospheric Disturbance Flag for region 1
bool Region2_flag_5; // Ionospheric Disturbance Flag for region 2
bool Region3_flag_5; // Ionospheric Disturbance Flag for region 3
bool Region4_flag_5; // Ionospheric Disturbance Flag for region 4
bool Region5_flag_5; // Ionospheric Disturbance Flag for region 5
double BGD_E1E5a_5; //E1-E5a Broadcast Group Delay [s]
double BGD_E1E5b_5; //E1-E5b Broadcast Group Delay [s]
double E5b_HS_5; //
double E1B_HS_5; //
double E5b_DVS_5; //
double E1B_DVS_5; //
/*GST*/
double WN_5;
double TOW_5;
double spare_5;
/*Word type 6: GST-UTC conversion parameters*/
double A0_6;
double A1_6;
double Delta_tLS_6;
double t0t_6;
double WNot_6;
double WN_LSF_6;
double DN_6;
double Delta_tLSF_6;
double TOW_6;
/*Word type 7: Almanac for SVID1 (1/2), almanac reference time and almanac reference week number*/
int IOD_a_7;
double WN_a_7;
double t0a_7;
int SVID1_7;
double Delta_alpha_7;
double e_7;
double omega_7;
double delta_i_7;
double Omega0_7;
double Omega_dot_7;
double M0_7;
/*Word type 8: Almanac for SVID1 (2/2) and SVID2 (1/2)*/
int IOD_a_8;
double af0_8;
double af1_8;
double E5b_HS_8;
double E1B_HS_8;
int SVID2_8;
double DELTA_A_8;
double e_8;
double omega_8;
double delta_i_8;
double Omega0_8;
double Omega_dot_8;
/*Word type 9: Almanac for SVID2 (2/2) and SVID3 (1/2)*/
int IOD_a_9;
double WN_a_9;
double t0a_9;
double M0_9;
double af0_9;
double af1_9;
double E5b_HS_9;
double E1B_HS_9;
int SVID3_9;
double DELTA_A_9;
double e_9;
double omega_9;
double delta_i_9;
/*Word type 10: Almanac for SVID3 (2/2) and GST-GPS conversion parameters*/
int IOD_a_10;
double Omega0_10;
double Omega_dot_10;
double M0_10;
double af0_10;
double af1_10;
double E5b_HS_10;
double E1B_HS_10;
double A_0G_10;
double A_1G_10;
double t_0G_10;
double WN_0G_10;
/*Word type 0: I/NAV Spare Word*/
double Time_0;
double WN_0;
double TOW_0;
void split_page(const char *page, int flag_even_word); /* Takes in input a page (Odd or Even) of 120 bit, split it according ICD 4.3.2.3 and join Data_k with Data_j*/
int page_jk_decoder(char *data_jk); /* Takes in input Data_jk (128 bit) and split it in ephemeris parameters according ICD 4.3.5*/

View File

@ -45,7 +45,7 @@
#include "gps_iono.h"
#include "gps_almanac.h"
#include "gps_utc_model.h"
#include "GPS_L1_CA.h"
/*!