1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2025-04-20 01:33:13 +00:00

Merge branch 'next' of https://github.com/gnss-sdr/gnss-sdr into osnma

This commit is contained in:
Carles Fernandez 2023-11-09 11:52:50 +01:00
commit 44c7bcce80
No known key found for this signature in database
GPG Key ID: 4C583C52B0C3877D
22 changed files with 605 additions and 270 deletions

@ -193,6 +193,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip

@ -34,6 +34,8 @@ All notable changes to GNSS-SDR will be documented in this file.
### Improvements in Portability:
- Updated local `cpu_features` library to v0.9.0.
- `volk_gnsssdr`: fix syntax for Python 3.12 without breaking backward
compatibility with Python 2.7.
### Improvements in Repeatability:

@ -412,6 +412,10 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
{
pvt_output_parameters.type_of_receiver = 107; // GPS L1 C/A + Galileo E6B
}
if ((gps_1C_count != 0) && (gps_2S_count == 0) && (gps_L5_count != 0) && (gal_1B_count != 0) && (gal_E5a_count != 0) && (gal_E5b_count == 0) && (gal_E6_count != 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count == 0) && (bds_B3_count == 0))
{
pvt_output_parameters.type_of_receiver = 108; // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
}
// BeiDou B1I Receiver
if ((gps_1C_count == 0) && (gps_2S_count == 0) && (gps_L5_count == 0) && (gal_1B_count == 0) && (gal_E5a_count == 0) && (gal_E5b_count == 0) && (gal_E6_count == 0) && (glo_1G_count == 0) && (glo_2G_count == 0) && (bds_B1_count != 0) && (bds_B3_count == 0))
{
@ -857,6 +861,7 @@ Rtklib_Pvt::Rtklib_Pvt(const ConfigurationInterface* configuration,
pvt_output_parameters.xml_output_path = configuration->property(role + ".xml_output_path", default_output_path);
pvt_output_parameters.nmea_output_file_path = configuration->property(role + ".nmea_output_file_path", default_output_path);
pvt_output_parameters.rtcm_output_file_path = configuration->property(role + ".rtcm_output_file_path", default_output_path);
pvt_output_parameters.has_output_file_path = configuration->property(role + ".has_output_file_path", default_output_path);
// Read PVT MONITOR Configuration
pvt_output_parameters.monitor_enabled = configuration->property(role + ".enable_monitor", false);

@ -448,10 +448,10 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
}
// Initialize HAS simple printer
d_enable_has_messages = (((d_type_of_rx >= 100) && (d_type_of_rx < 107)) && (conf_.output_enabled));
d_enable_has_messages = (((d_type_of_rx >= 100) && (d_type_of_rx < 109)) && (conf_.output_enabled));
if (d_enable_has_messages)
{
d_has_simple_printer = std::make_unique<Has_Simple_Printer>();
d_has_simple_printer = std::make_unique<Has_Simple_Printer>(conf_.has_output_file_path);
}
else
{
@ -548,19 +548,19 @@ rtklib_pvt_gs::rtklib_pvt_gs(uint32_t nchannels,
{
// setup two PVT solvers: internal solver for rx clock and user solver
// user PVT solver
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat, conf_);
d_user_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat);
d_user_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
// internal PVT solver, mainly used to estimate the receiver clock
rtk_t internal_rtk = rtk;
internal_rtk.opt.mode = PMODE_SINGLE; // use single positioning mode in internal PVT solver
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(internal_rtk, dump_ls_pvt_filename, d_type_of_rx, false, false, conf_);
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(internal_rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, false, false);
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
}
else
{
// only one solver, customized by the user options
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat, conf_);
d_internal_pvt_solver = std::make_shared<Rtklib_Solver>(rtk, conf_, dump_ls_pvt_filename, d_type_of_rx, d_dump, d_dump_mat);
d_internal_pvt_solver->set_pre_2009_file(conf_.pre_2009_file);
d_user_pvt_solver = d_internal_pvt_solver;
}

@ -46,6 +46,7 @@ public:
std::string kml_output_path = std::string(".");
std::string xml_output_path = std::string(".");
std::string rtcm_output_file_path = std::string(".");
std::string has_output_file_path = std::string(".");
std::string udp_addresses;
std::string udp_eph_addresses;
std::string log_source_timetag_file;
@ -90,7 +91,7 @@ public:
bool pre_2009_file = false;
bool dump = false;
bool dump_mat = true;
bool log_source_timetag;
bool log_source_timetag = false;
bool use_e6_for_pvt = true;
bool use_has_corrections = true;
bool use_unhealthy_sats = false;

File diff suppressed because it is too large Load Diff

@ -39,14 +39,15 @@
#define GNSS_SDR_RINEX_PRINTER_H
#include <boost/date_time/posix_time/posix_time.hpp>
#include <cstdint> // for int32_t
#include <cstdlib> // for strtol, strtod
#include <fstream> // for fstream
#include <iomanip> // for setprecision
#include <map> // for map
#include <sstream> // for stringstream
#include <string> // for string
#include <vector>
#include <cstdint> // for int32_t
#include <cstdlib> // for strtol, strtod
#include <fstream> // for fstream
#include <iomanip> // for setprecision
#include <map> // for map
#include <sstream> // for stringstream
#include <string> // for string
#include <unordered_map> // for unordered_map
#include <vector> // for vector
/** \addtogroup PVT
@ -143,6 +144,7 @@ public:
* 105 | Galileo E1B + Galileo E5b + Galileo E6B
* 106 | GPS L1 C/A + Galileo E1B + Galileo E6B
* 107 | GPS L1 C/A + Galileo E6B
* 108 | GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
* 500 | BeiDou B1I
* 501 | BeiDou B1I + GPS L1 C/A
* 502 | BeiDou B1I + Galileo E1B
@ -232,6 +234,14 @@ public:
private:
const std::unordered_map<std::string, std::string> satelliteSystem = {
{"GPS", "G"},
{"GLONASS", "R"},
{"SBAS payload", "S"},
{"Galileo", "E"},
{"Beidou", "C"},
{"Mixed", "M"}}; // RINEX v3.02 codes
/*
* Generates the GPS Observation data header
*/
@ -984,7 +994,6 @@ private:
inline std::string asFixWidthString(int x, int width, char fill_digit) const;
std::map<std::string, std::string> satelliteSystem; // GPS, GLONASS, SBAS payload, Galileo or Beidou
std::map<std::string, std::string> observationType; // PSEUDORANGE, CARRIER_PHASE, DOPPLER, SIGNAL_STRENGTH
std::map<std::string, std::string> observationCode; // GNSS observation descriptors

@ -45,16 +45,16 @@
Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
const Pvt_Conf &conf,
const std::string &dump_filename,
uint32_t type_of_rx,
bool flag_dump_to_file,
bool flag_dump_to_mat,
Pvt_Conf conf) : d_dump_filename(dump_filename),
d_rtk(rtk),
d_conf(std::move(conf)),
d_type_of_rx(type_of_rx),
d_flag_dump_enabled(flag_dump_to_file),
d_flag_dump_mat_enabled(flag_dump_to_mat)
bool flag_dump_to_mat) : d_dump_filename(dump_filename),
d_rtk(rtk),
d_conf(conf),
d_type_of_rx(type_of_rx),
d_flag_dump_enabled(flag_dump_to_file),
d_flag_dump_mat_enabled(flag_dump_to_mat)
{
// see freq index at src/algorithms/libs/rtklib/rtklib_rtkcmn.cc
// function: satwavelen
@ -128,6 +128,10 @@ Rtklib_Solver::Rtklib_Solver(const rtk_t &rtk,
d_rtklib_band_index["E6"] = 1;
d_rtklib_freq_index[1] = 3;
break;
case 108: // GPS L1 C/A + Galileo E1B + GPS L5 + Galileo E5a + Galileo E6B
d_rtklib_band_index["E6"] = 2;
d_rtklib_freq_index[2] = 3;
break;
}
// auto empty_map = std::map < int, HAS_obs_corrections >> ();
// d_has_obs_corr_map["L1 C/A"] = empty_map;

@ -82,11 +82,12 @@ class Rtklib_Solver : public Pvt_Solution
{
public:
Rtklib_Solver(const rtk_t& rtk,
const Pvt_Conf& conf,
const std::string& dump_filename,
uint32_t type_of_rx,
bool flag_dump_to_file,
bool flag_dump_to_mat,
Pvt_Conf conf);
bool flag_dump_to_mat);
~Rtklib_Solver();
bool get_PVT(const std::map<int, Gnss_Synchro>& gnss_observables_map, double kf_update_interval_s);

@ -221,7 +221,7 @@ function(VOLK_UNIQUE_TARGET desc)
file(RELATIVE_PATH reldir ${PROJECT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR})
execute_process(COMMAND ${PYTHON_EXECUTABLE} -c "import re, hashlib
unique = hashlib.sha256(b'${reldir}${ARGN}').hexdigest()[:5]
print(re.sub('\\W', '_', '${desc} ${reldir} ' + unique))"
print(re.sub(r'\\W', '_', '${desc} ${reldir} ' + unique))"
OUTPUT_VARIABLE _target OUTPUT_STRIP_TRAILING_WHITESPACE)
add_custom_target(${_target} ALL DEPENDS ${ARGN})
endfunction()

@ -8,7 +8,7 @@
from __future__ import print_function
import optparse
import argparse
import volk_gnsssdr_arch_defs
import volk_gnsssdr_machine_defs
@ -20,6 +20,7 @@ def do_arch_flags_list(compiler):
output.append(','.join(fields))
print(';'.join(output))
def do_machines_list(arch_names):
output = list()
for machine in volk_gnsssdr_machine_defs.machines:
@ -28,6 +29,7 @@ def do_machines_list(arch_names):
output.append(machine.name)
print(';'.join(output))
def do_machine_flags_list(compiler, machine_name):
output = list()
machine = volk_gnsssdr_machine_defs.machine_dict[machine_name]
@ -35,16 +37,18 @@ def do_machine_flags_list(compiler, machine_name):
output.extend(arch.get_flags(compiler))
print(' '.join(output))
def main():
parser = optparse.OptionParser()
parser.add_option('--mode', type='string')
parser.add_option('--compiler', type='string')
parser.add_option('--archs', type='string')
parser.add_option('--machine', type='string')
(opts, args) = parser.parse_args()
parser = argparse.ArgumentParser()
parser.add_argument('--mode', type=str)
parser.add_argument('--compiler', type=str)
parser.add_argument('--archs', type=str)
parser.add_argument('--machine', type=str)
args = parser.parse_args()
if opts.mode == 'arch_flags': return do_arch_flags_list(opts.compiler.lower())
if opts.mode == 'machines': return do_machines_list(opts.archs.split(';'))
if opts.mode == 'machine_flags': return do_machine_flags_list(opts.compiler.lower(), opts.machine)
if args.mode == 'arch_flags': return do_arch_flags_list(args.compiler.lower())
if args.mode == 'machines': return do_machines_list(args.archs.split(';'))
if args.mode == 'machine_flags': return do_machine_flags_list(args.compiler.lower(), args.machine)
if __name__ == '__main__': main()
if __name__ == '__main__':
main()

@ -16,7 +16,7 @@ import glob
########################################################################
# Strip comments from a c/cpp file.
# Input is code string, output is code string without comments.
# https://stackoverflow.com/questions/241327/remove-c-and-c-comments-using-python
# https://stackoverflow.com/questions/241327/python-snippet-to-remove-c-and-c-comments
########################################################################
def comment_remover(text):
def replacer(match):
@ -120,7 +120,7 @@ class impl_class(object):
self.args = list()
fcn_args = the_rest.split(',')
for fcn_arg in fcn_args:
arg_matcher = re.compile(r'^\s*(.*\W)\s*(\w+)\s*$', re.DOTALL | re.MULTILINE)
arg_matcher = re.compile(r'^\s*(.*[^\w])\s*(\w+)\s*$', re.DOTALL | re.MULTILINE)
m = arg_matcher.match(fcn_arg)
arg_type, arg_name = m.groups()
self.args.append((arg_type, arg_name))
@ -164,6 +164,8 @@ class kernel_class(object):
kern_name=self.name, header=sub_hdr, body=body,
))
assert(self._impls)
if "generic" not in [impl.name for impl in self._impls]:
raise Exception("{} does not have a generic protokernel.".format(self.name))
self.has_dispatcher = False
for impl in self._impls:
if impl.name == 'dispatcher':

@ -11,7 +11,7 @@ from __future__ import print_function
import os
import re
import sys
import optparse
import argparse
import volk_gnsssdr_arch_defs
import volk_gnsssdr_machine_defs
import volk_gnsssdr_kernel_defs
@ -34,13 +34,14 @@ def __parse_tmpl(_tmpl, **kwargs):
return str(Template(_tmpl).render(**defs))
def main():
parser = optparse.OptionParser()
parser.add_option('--input', type='string')
parser.add_option('--output', type='string')
(opts, args) = parser.parse_args()
parser = argparse.ArgumentParser()
parser.add_argument('--input', type=str)
parser.add_argument('--output', type=str)
args, extras = parser.parse_known_args()
output = __parse_tmpl(open(opts.input).read(), args=args)
if opts.output: open(opts.output, 'w').write(output)
output = __parse_tmpl(open(args.input).read(), args=extras)
if args.output: open(args.output, 'w').write(output)
else: print(output)
if __name__ == '__main__': main()
if __name__ == '__main__':
main()

@ -113,7 +113,7 @@ macro(check_arch arch_name)
set(have_flag have${flag})
# make the have_flag have nice alphanum chars (just for looks/not necessary)
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "import re; print(re.sub('\\W', '_', '${have_flag}'))"
COMMAND ${PYTHON_EXECUTABLE} -c "import re; print(re.sub(r'\\W', '_', '${have_flag}'))"
OUTPUT_VARIABLE have_flag OUTPUT_STRIP_TRAILING_WHITESPACE
)
if(VOLK_FLAG_CHECK_FLAGS)

@ -290,9 +290,7 @@ class volk_gnsssdr_modtool(object):
inserted = False;
insert = False
for otherline in otherlines:
if (re.match('\s*', otherline) == None or re.match('\s*#.*', otherline) == None):
if re.match(r'\s*', otherline) is None or re.match(r'\s*#.*', otherline) is None:
insert = True;
if insert and not inserted:
inserted = True;

@ -431,6 +431,10 @@ bool hybrid_observables_gs::interp_trk_obs(Gnss_Synchro &interpolated_obs, uint3
// 1st: copy the nearest gnss_synchro data for that channel
interpolated_obs = d_gnss_synchro_history->get(ch, nearest_element);
if (interpolated_obs.fs == 0LL)
{
return false;
}
// 2nd: Linear interpolation: y(t) = y(t1) + (y(t2) - y(t1)) * (t - t1) / (t2 - t1)
const double T_rx_s = static_cast<double>(rx_clock) / static_cast<double>(interpolated_obs.fs);

@ -45,7 +45,8 @@ FourBitCpxFileSignalSource::FourBitCpxFileSignalSource(
}
else
{
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: ";
reverse_interleaving_ = false;
LOG(WARNING) << sample_type_ << " unrecognized sample type. Assuming: iq";
}
if (in_streams > 0)

@ -1044,7 +1044,10 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
decode_FNAV_word(d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
break;
case 3: // CNAV
decode_CNAV_word(current_symbol.Tracking_sample_counter / static_cast<uint64_t>(current_symbol.fs), d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
if (current_symbol.fs != 0LL)
{
decode_CNAV_word(current_symbol.Tracking_sample_counter / static_cast<uint64_t>(current_symbol.fs), d_page_part_symbols.data(), d_frame_length_symbols, current_symbol.CN0_dB_hz);
}
break;
default:
return -1;

@ -248,17 +248,20 @@ void Gnss_Sdr_Supl_Client::read_supl_data()
gps_almanac_map.insert(std::pair<int, Gps_Almanac>(a->prn, gps_almanac_entry));
gps_almanac_iterator = this->gps_almanac_map.find(a->prn);
}
gps_almanac_iterator->second.PRN = a->prn;
gps_almanac_iterator->second.af0 = static_cast<double>(a->AF0) * pow(2.0, -20);
gps_almanac_iterator->second.af1 = static_cast<double>(a->AF1) * pow(2.0, -38);
gps_almanac_iterator->second.delta_i = static_cast<double>(a->Ksii) * pow(2.0, -19);
gps_almanac_iterator->second.omega = static_cast<double>(a->w) * pow(2.0, -23);
gps_almanac_iterator->second.OMEGA_0 = static_cast<double>(a->OMEGA_0) * pow(2.0, -23);
gps_almanac_iterator->second.sqrtA = static_cast<double>(a->A_sqrt) * pow(2.0, -11);
gps_almanac_iterator->second.OMEGAdot = static_cast<double>(a->OMEGA_dot) * pow(2.0, -38);
gps_almanac_iterator->second.toa = static_cast<int32_t>(a->toa * pow(2.0, 12));
gps_almanac_iterator->second.ecc = static_cast<double>(a->e) * pow(2.0, -21);
gps_almanac_iterator->second.M_0 = static_cast<double>(a->M0) * pow(2.0, -23);
if (gps_almanac_iterator != gps_almanac_map.end())
{
gps_almanac_iterator->second.PRN = a->prn;
gps_almanac_iterator->second.af0 = static_cast<double>(a->AF0) * pow(2.0, -20);
gps_almanac_iterator->second.af1 = static_cast<double>(a->AF1) * pow(2.0, -38);
gps_almanac_iterator->second.delta_i = static_cast<double>(a->Ksii) * pow(2.0, -19);
gps_almanac_iterator->second.omega = static_cast<double>(a->w) * pow(2.0, -23);
gps_almanac_iterator->second.OMEGA_0 = static_cast<double>(a->OMEGA_0) * pow(2.0, -23);
gps_almanac_iterator->second.sqrtA = static_cast<double>(a->A_sqrt) * pow(2.0, -11);
gps_almanac_iterator->second.OMEGAdot = static_cast<double>(a->OMEGA_dot) * pow(2.0, -38);
gps_almanac_iterator->second.toa = static_cast<int32_t>(a->toa * pow(2.0, 12));
gps_almanac_iterator->second.ecc = static_cast<double>(a->e) * pow(2.0, -21);
gps_almanac_iterator->second.M_0 = static_cast<double>(a->M0) * pow(2.0, -23);
}
}
}
@ -278,48 +281,51 @@ void Gnss_Sdr_Supl_Client::read_supl_data()
gps_ephemeris_map.insert(std::pair<int, Gps_Ephemeris>(e->prn, gps_eph));
gps_eph_iterator = this->gps_ephemeris_map.find(e->prn);
}
if (gps_time.valid)
if (gps_eph_iterator != gps_ephemeris_map.end())
{
gps_eph_iterator->second.WN = assist.time.gps_week;
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
gps_eph_iterator->second.tow = static_cast<double>(assist.time.gps_tow) * 0.08;
if (gps_time.valid)
{
gps_eph_iterator->second.WN = assist.time.gps_week;
/* TS 44.031: GPSTOW, range 0-604799.92, resolution 0.08 sec, 23-bit presentation */
gps_eph_iterator->second.tow = static_cast<double>(assist.time.gps_tow) * 0.08;
}
else
{
gps_eph_iterator->second.WN = 0;
gps_eph_iterator->second.tow = 0;
}
gps_eph_iterator->second.PRN = e->prn;
// SV navigation model
gps_eph_iterator->second.code_on_L2 = e->bits;
gps_eph_iterator->second.SV_accuracy = e->ura; // User Range Accuracy (URA)
gps_eph_iterator->second.SV_health = e->health;
gps_eph_iterator->second.IODC = static_cast<double>(e->IODC);
// miss P flag (1 bit)
// miss SF1 Reserved (87 bits)
gps_eph_iterator->second.TGD = static_cast<double>(e->tgd) * T_GD_LSB;
gps_eph_iterator->second.toc = static_cast<double>(e->toc) * T_OC_LSB;
gps_eph_iterator->second.af0 = static_cast<double>(e->AF0) * A_F0_LSB;
gps_eph_iterator->second.af1 = static_cast<double>(e->AF1) * A_F1_LSB;
gps_eph_iterator->second.af2 = static_cast<double>(e->AF2) * A_F2_LSB;
gps_eph_iterator->second.Crc = static_cast<double>(e->Crc) * C_RC_LSB;
gps_eph_iterator->second.delta_n = static_cast<double>(e->delta_n) * DELTA_N_LSB;
gps_eph_iterator->second.M_0 = static_cast<double>(e->M0) * M_0_LSB;
gps_eph_iterator->second.Cuc = static_cast<double>(e->Cuc) * C_UC_LSB;
gps_eph_iterator->second.ecc = static_cast<double>(e->e) * ECCENTRICITY_LSB;
gps_eph_iterator->second.Cus = static_cast<double>(e->Cus) * C_US_LSB;
gps_eph_iterator->second.sqrtA = static_cast<double>(e->A_sqrt) * SQRT_A_LSB;
gps_eph_iterator->second.toe = static_cast<double>(e->toe) * T_OE_LSB;
// miss fit interval flag (1 bit)
gps_eph_iterator->second.AODO = e->AODA * AODO_LSB;
gps_eph_iterator->second.Cic = static_cast<double>(e->Cic) * C_IC_LSB;
gps_eph_iterator->second.OMEGA_0 = static_cast<double>(e->OMEGA_0) * OMEGA_0_LSB;
gps_eph_iterator->second.Cis = static_cast<double>(e->Cis) * C_IS_LSB;
gps_eph_iterator->second.i_0 = static_cast<double>(e->i0) * I_0_LSB;
gps_eph_iterator->second.Crs = static_cast<double>(e->Crs) * C_RS_LSB;
gps_eph_iterator->second.omega = static_cast<double>(e->w) * OMEGA_LSB;
gps_eph_iterator->second.OMEGAdot = static_cast<double>(e->OMEGA_dot) * OMEGA_DOT_LSB;
gps_eph_iterator->second.idot = static_cast<double>(e->i_dot) * I_DOT_LSB;
}
else
{
gps_eph_iterator->second.WN = 0;
gps_eph_iterator->second.tow = 0;
}
gps_eph_iterator->second.PRN = e->prn;
// SV navigation model
gps_eph_iterator->second.code_on_L2 = e->bits;
gps_eph_iterator->second.SV_accuracy = e->ura; // User Range Accuracy (URA)
gps_eph_iterator->second.SV_health = e->health;
gps_eph_iterator->second.IODC = static_cast<double>(e->IODC);
// miss P flag (1 bit)
// miss SF1 Reserved (87 bits)
gps_eph_iterator->second.TGD = static_cast<double>(e->tgd) * T_GD_LSB;
gps_eph_iterator->second.toc = static_cast<double>(e->toc) * T_OC_LSB;
gps_eph_iterator->second.af0 = static_cast<double>(e->AF0) * A_F0_LSB;
gps_eph_iterator->second.af1 = static_cast<double>(e->AF1) * A_F1_LSB;
gps_eph_iterator->second.af2 = static_cast<double>(e->AF2) * A_F2_LSB;
gps_eph_iterator->second.Crc = static_cast<double>(e->Crc) * C_RC_LSB;
gps_eph_iterator->second.delta_n = static_cast<double>(e->delta_n) * DELTA_N_LSB;
gps_eph_iterator->second.M_0 = static_cast<double>(e->M0) * M_0_LSB;
gps_eph_iterator->second.Cuc = static_cast<double>(e->Cuc) * C_UC_LSB;
gps_eph_iterator->second.ecc = static_cast<double>(e->e) * ECCENTRICITY_LSB;
gps_eph_iterator->second.Cus = static_cast<double>(e->Cus) * C_US_LSB;
gps_eph_iterator->second.sqrtA = static_cast<double>(e->A_sqrt) * SQRT_A_LSB;
gps_eph_iterator->second.toe = static_cast<double>(e->toe) * T_OE_LSB;
// miss fit interval flag (1 bit)
gps_eph_iterator->second.AODO = e->AODA * AODO_LSB;
gps_eph_iterator->second.Cic = static_cast<double>(e->Cic) * C_IC_LSB;
gps_eph_iterator->second.OMEGA_0 = static_cast<double>(e->OMEGA_0) * OMEGA_0_LSB;
gps_eph_iterator->second.Cis = static_cast<double>(e->Cis) * C_IS_LSB;
gps_eph_iterator->second.i_0 = static_cast<double>(e->i0) * I_0_LSB;
gps_eph_iterator->second.Crs = static_cast<double>(e->Crs) * C_RS_LSB;
gps_eph_iterator->second.omega = static_cast<double>(e->w) * OMEGA_LSB;
gps_eph_iterator->second.OMEGAdot = static_cast<double>(e->OMEGA_dot) * OMEGA_DOT_LSB;
gps_eph_iterator->second.idot = static_cast<double>(e->i_dot) * I_DOT_LSB;
}
}
@ -340,18 +346,21 @@ void Gnss_Sdr_Supl_Client::read_supl_data()
gps_acq_map.insert(std::pair<int, Gps_Acq_Assist>(e->prn, gps_acq_assist));
gps_acq_iterator = this->gps_acq_map.find(e->prn);
}
// fill the acquisition assistance structure
gps_acq_iterator->second.PRN = e->prn;
gps_acq_iterator->second.tow = static_cast<double>(assist.acq_time);
gps_acq_iterator->second.Doppler0 = static_cast<double>(e->doppler0);
gps_acq_iterator->second.Doppler1 = static_cast<double>(e->doppler1);
gps_acq_iterator->second.dopplerUncertainty = static_cast<double>(e->d_win);
gps_acq_iterator->second.Code_Phase = static_cast<double>(e->code_ph);
gps_acq_iterator->second.Code_Phase_int = static_cast<double>(e->code_ph_int);
gps_acq_iterator->second.Code_Phase_window = static_cast<double>(e->code_ph_win);
gps_acq_iterator->second.Azimuth = static_cast<double>(e->az);
gps_acq_iterator->second.Elevation = static_cast<double>(e->el);
gps_acq_iterator->second.GPS_Bit_Number = static_cast<double>(e->bit_num);
if (gps_acq_iterator != gps_acq_map.end())
{
// fill the acquisition assistance structure
gps_acq_iterator->second.PRN = e->prn;
gps_acq_iterator->second.tow = static_cast<double>(assist.acq_time);
gps_acq_iterator->second.Doppler0 = static_cast<double>(e->doppler0);
gps_acq_iterator->second.Doppler1 = static_cast<double>(e->doppler1);
gps_acq_iterator->second.dopplerUncertainty = static_cast<double>(e->d_win);
gps_acq_iterator->second.Code_Phase = static_cast<double>(e->code_ph);
gps_acq_iterator->second.Code_Phase_int = static_cast<double>(e->code_ph_int);
gps_acq_iterator->second.Code_Phase_window = static_cast<double>(e->code_ph_win);
gps_acq_iterator->second.Azimuth = static_cast<double>(e->az);
gps_acq_iterator->second.Elevation = static_cast<double>(e->el);
gps_acq_iterator->second.GPS_Bit_Number = static_cast<double>(e->bit_num);
}
}
}
}

@ -147,7 +147,7 @@ TEST_F(NmeaPrinterTest, PrintLine)
std::string filename("nmea_test.nmea");
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
std::shared_ptr<Rtklib_Solver> pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 1, false, false, conf);
std::shared_ptr<Rtklib_Solver> pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 1, false, false);
boost::posix_time::ptime pt(boost::gregorian::date(1994, boost::date_time::Nov, 19),
boost::posix_time::hours(22) + boost::posix_time::minutes(54) + boost::posix_time::seconds(46));

@ -145,7 +145,7 @@ TEST_F(RinexPrinterTest, GalileoObsHeader)
{
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 4, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 4, false, false);
auto eph = Galileo_Ephemeris();
eph.PRN = 1;
pvt_solution->galileo_ephemeris_map[1] = eph;
@ -233,7 +233,7 @@ TEST_F(RinexPrinterTest, GlonassObsHeader)
{
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 28, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 28, false, false);
auto eph = Glonass_Gnav_Ephemeris();
eph.PRN = 1;
pvt_solution->glonass_gnav_ephemeris_map[1] = eph;
@ -295,7 +295,7 @@ TEST_F(RinexPrinterTest, MixedObsHeader)
eph_gps.PRN = 1;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 106, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 106, false, false);
pvt_solution->galileo_ephemeris_map[1] = eph_gal;
pvt_solution->gps_ephemeris_map[1] = eph_gps;
@ -367,7 +367,7 @@ TEST_F(RinexPrinterTest, MixedObsHeaderGpsGlo)
eph_gps.PRN = 1;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 26, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 26, false, false);
pvt_solution->glonass_gnav_ephemeris_map[1] = eph_glo;
pvt_solution->gps_ephemeris_map[1] = eph_gps;
@ -436,7 +436,7 @@ TEST_F(RinexPrinterTest, GalileoObsLog)
eph.PRN = 1;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 4, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 4, false, false);
pvt_solution->galileo_ephemeris_map[1] = eph;
std::map<int, Gnss_Synchro> gnss_observables_map;
@ -518,7 +518,7 @@ TEST_F(RinexPrinterTest, GlonassObsLog)
eph.PRN = 22;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 23, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 23, false, false);
pvt_solution->glonass_gnav_ephemeris_map[1] = eph;
std::map<int, Gnss_Synchro> gnss_observables_map;
@ -602,7 +602,7 @@ TEST_F(RinexPrinterTest, GpsObsLogDualBand)
eph_cnav.PRN = 1;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 7, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 7, false, false);
pvt_solution->gps_ephemeris_map[1] = eph;
pvt_solution->gps_cnav_ephemeris_map[1] = eph_cnav;
std::map<int, Gnss_Synchro> gnss_observables_map;
@ -692,7 +692,7 @@ TEST_F(RinexPrinterTest, GalileoObsLogDualBand)
{
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 14, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 14, false, false);
auto eph = Galileo_Ephemeris();
eph.PRN = 1;
pvt_solution->galileo_ephemeris_map[1] = eph;
@ -794,7 +794,7 @@ TEST_F(RinexPrinterTest, MixedObsLog)
eph_gal.PRN = 1;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 9, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 9, false, false);
pvt_solution->gps_ephemeris_map[1] = eph_gps;
pvt_solution->galileo_ephemeris_map[1] = eph_gal;
std::map<int, Gnss_Synchro> gnss_observables_map;
@ -920,7 +920,7 @@ TEST_F(RinexPrinterTest, MixedObsLogGpsGlo)
eph_glo.PRN = 1;
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, "filename", 26, false, false, conf);
auto pvt_solution = std::make_shared<Rtklib_Solver>(rtk, conf, "filename", 26, false, false);
pvt_solution->gps_ephemeris_map[1] = eph_gps;
pvt_solution->glonass_gnav_ephemeris_map[1] = eph_glo;
std::map<int, Gnss_Synchro> gnss_observables_map;

@ -386,7 +386,7 @@ TEST(RTKLibSolverTest, test1)
Pvt_Conf conf;
conf.use_e6_for_pvt = false;
auto d_ls_pvt = std::make_unique<Rtklib_Solver>(rtk, nchannels, dump_filename, 1, flag_dump_to_file, save_to_mat, conf);
auto d_ls_pvt = std::make_unique<Rtklib_Solver>(rtk, conf, nchannels, dump_filename, 1, flag_dump_to_file, save_to_mat);
d_ls_pvt->set_averaging_depth(1);
// load ephemeris