mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-10-21 10:37:47 +00:00
Applying code formatting rules
This commit is contained in:
@@ -39,8 +39,8 @@ void beidou_b1i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shi
|
||||
const unsigned int _code_length = 2046;
|
||||
bool G1[_code_length];
|
||||
bool G2[_code_length];
|
||||
bool G1_register[11] = {0,1,0,1,0,1,0,1,0,1,0};
|
||||
bool G2_register[11] = {0,1,0,1,0,1,0,1,0,1,0};
|
||||
bool G1_register[11] = {false, true, false, true, false, true, false, true, false, true, false};
|
||||
bool G2_register[11] = {false, true, false, true, false, true, false, true, false, true, false};
|
||||
bool feedback1, feedback2;
|
||||
bool aux;
|
||||
unsigned int lcv, lcv2;
|
||||
@@ -70,7 +70,7 @@ void beidou_b1i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shi
|
||||
for (lcv = 0; lcv < _code_length; lcv++)
|
||||
{
|
||||
G1[lcv] = G1_register[0];
|
||||
G2[lcv] = G2_register[-(phase1[prn_idx] - 11) ] ^ G2_register[-(phase2[prn_idx] - 11) ];
|
||||
G2[lcv] = G2_register[-(phase1[prn_idx] - 11)] ^ G2_register[-(phase2[prn_idx] - 11)];
|
||||
|
||||
feedback1 = (G1_register[0] + G1_register[1] + G1_register[2] + G1_register[3] + G1_register[4] + G1_register[10]) & 0x1;
|
||||
feedback2 = (G2_register[0] + G2_register[2] + G2_register[3] + G2_register[6] + G2_register[7] + G2_register[8] + G2_register[9] + G2_register[10]) & 0x1;
|
||||
@@ -86,7 +86,7 @@ void beidou_b1i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shi
|
||||
}
|
||||
|
||||
/* Set the delay */
|
||||
delay = _code_length - delays[prn_idx]*0; //**********************************
|
||||
delay = _code_length - delays[prn_idx] * 0; //**********************************
|
||||
delay += _chip_shift;
|
||||
delay %= _code_length;
|
||||
|
||||
@@ -104,7 +104,7 @@ void beidou_b1i_code_gen_int(int* _dest, signed int _prn, unsigned int _chip_shi
|
||||
}
|
||||
|
||||
delay++;
|
||||
//std::cout << _dest[lcv] << " ";
|
||||
//std::cout << _dest[lcv] << " ";
|
||||
delay %= _code_length;
|
||||
}
|
||||
}
|
||||
@@ -156,8 +156,8 @@ void beidou_b1i_code_gen_complex_sampled(std::complex<float>* _dest, unsigned in
|
||||
_samplesPerCode = static_cast<signed int>(static_cast<double>(_fs) / static_cast<double>(_codeFreqBasis / _codeLength));
|
||||
|
||||
//--- Find time constants --------------------------------------------------
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
_ts = 1.0 / static_cast<float>(_fs); // Sampling period in sec
|
||||
_tc = 1.0 / static_cast<float>(_codeFreqBasis); // C/A chip period in sec
|
||||
beidou_b1i_code_gen_complex(_code, _prn, _chip_shift); //generate C/A code 1 sample per chip
|
||||
|
||||
for (signed int i = 0; i < _samplesPerCode; i++)
|
||||
|
@@ -223,8 +223,8 @@ const int NSYSQZS = 0;
|
||||
|
||||
#define ENABDS
|
||||
#ifdef ENABDS
|
||||
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
|
||||
const int MAXPRNBDS = 35; //!< max satellite sat number of BeiDou
|
||||
const int MINPRNBDS = 1; //!< min satellite sat number of BeiDou
|
||||
const int MAXPRNBDS = 35; //!< max satellite sat number of BeiDou
|
||||
const int NSATBDS = (MAXPRNBDS - MINPRNBDS + 1); //!< number of BeiDou satellites
|
||||
const int NSYSBDS = 1;
|
||||
#else
|
||||
|
@@ -75,15 +75,15 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro
|
||||
|
||||
// Mote that BeiDou week numbers do not need adjustment for foreseeable future. Consider change
|
||||
// to more elegant solution
|
||||
// if(gnss_synchro.System == 'C')
|
||||
// {
|
||||
// rtklib_obs.time = bdt2gpst(bdt2time(week, gnss_synchro.RX_time));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time);
|
||||
// }
|
||||
//
|
||||
// if(gnss_synchro.System == 'C')
|
||||
// {
|
||||
// rtklib_obs.time = bdt2gpst(bdt2time(week, gnss_synchro.RX_time));
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time);
|
||||
// }
|
||||
//
|
||||
rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time);
|
||||
rtklib_obs.rcv = 1;
|
||||
return rtklib_obs;
|
||||
@@ -245,8 +245,8 @@ eph_t eph_to_rtklib(const Gps_Ephemeris& gps_eph)
|
||||
eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
{
|
||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0 };
|
||||
rtklib_sat.sat = bei_eph.i_satellite_PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS ;
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, {}, {}, 0.0, 0.0};
|
||||
rtklib_sat.sat = bei_eph.i_satellite_PRN + NSATGPS + NSATGLO + NSATGAL + NSATQZS;
|
||||
rtklib_sat.A = bei_eph.d_sqrt_A * bei_eph.d_sqrt_A;
|
||||
rtklib_sat.M0 = bei_eph.d_M_0;
|
||||
rtklib_sat.deln = bei_eph.d_Delta_n;
|
||||
@@ -259,10 +259,10 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
rtklib_sat.Adot = 0; //only in CNAV;
|
||||
rtklib_sat.ndot = 0; //only in CNAV;
|
||||
|
||||
rtklib_sat.code = bei_eph.i_sig_type; /*B1I data*/
|
||||
rtklib_sat.flag = bei_eph.i_nav_type; /*MEO/IGSO satellite*/
|
||||
rtklib_sat.iode=(int32_t)bei_eph.d_AODE; /* AODE */
|
||||
rtklib_sat.iodc=(int32_t)bei_eph.d_AODC; /* AODC */
|
||||
rtklib_sat.code = bei_eph.i_sig_type; /*B1I data*/
|
||||
rtklib_sat.flag = bei_eph.i_nav_type; /*MEO/IGSO satellite*/
|
||||
rtklib_sat.iode = static_cast<int32_t>(bei_eph.d_AODE); /* AODE */
|
||||
rtklib_sat.iodc = static_cast<int32_t>(bei_eph.d_AODC); /* AODC */
|
||||
|
||||
rtklib_sat.week = bei_eph.i_BEIDOU_week; /* week of tow */
|
||||
rtklib_sat.cic = bei_eph.d_Cic;
|
||||
@@ -285,8 +285,8 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
/* adjustment for week handover */
|
||||
double tow, toc, toe;
|
||||
tow = time2gpst(rtklib_sat.ttr, &rtklib_sat.week);
|
||||
toc = time2gpst(rtklib_sat.toc, NULL);
|
||||
toe = time2gpst(rtklib_sat.toe, NULL);
|
||||
toc = time2gpst(rtklib_sat.toc, nullptr);
|
||||
toe = time2gpst(rtklib_sat.toe, nullptr);
|
||||
|
||||
if (rtklib_sat.toes < tow - 302400.0)
|
||||
{
|
||||
@@ -306,7 +306,6 @@ eph_t eph_to_rtklib(const Beidou_Dnav_Ephemeris& bei_eph)
|
||||
}
|
||||
|
||||
|
||||
|
||||
eph_t eph_to_rtklib(const Gps_CNAV_Ephemeris& gps_cnav_eph)
|
||||
{
|
||||
eph_t rtklib_sat = {0, 0, 0, 0, 0, 0, 0, 0, {0, 0}, {0, 0}, {0, 0}, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#ifndef GNSS_SDR_RTKLIB_CONVERSIONS_H_
|
||||
#define GNSS_SDR_RTKLIB_CONVERSIONS_H_
|
||||
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "galileo_almanac.h"
|
||||
#include "galileo_ephemeris.h"
|
||||
#include "glonass_gnav_ephemeris.h"
|
||||
@@ -39,7 +40,6 @@
|
||||
#include "gps_almanac.h"
|
||||
#include "gps_cnav_ephemeris.h"
|
||||
#include "gps_ephemeris.h"
|
||||
#include "beidou_dnav_ephemeris.h"
|
||||
#include "rtklib.h"
|
||||
|
||||
eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph);
|
||||
|
Reference in New Issue
Block a user