mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-11-17 23:34:56 +00:00
Merge branch 'next' into ssr
This commit is contained in:
commit
d88a72f18e
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
@ -124,7 +124,7 @@ jobs:
|
|||||||
pip install mako
|
pip install mako
|
||||||
- name: configure
|
- name: configure
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: cd build; cmake -G "Visual Studio 16 2019" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
run: cd build; cmake -G "Visual Studio 17 2022" ..\src\algorithms\libs\volk_gnsssdr_module\volk_gnsssdr
|
||||||
- name: build
|
- name: build
|
||||||
run: cmake --build build --config Release
|
run: cmake --build build --config Release
|
||||||
- name: test
|
- name: test
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
# SPDX-FileCopyrightText: 2022 C. Fernandez-Prades carles.fernandez(at)cttc.es
|
# SPDX-FileCopyrightText: 2022 C. Fernandez-Prades carles.fernandez(at)cttc.es
|
||||||
---
|
---
|
||||||
abstract: "An open-source Global Navigation Satellite Systems software-defined receiver."
|
|
||||||
authors:
|
authors:
|
||||||
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
|
- affiliation: "Centre Tecnològic de Telecomunicacions de Catalunya (CTTC)"
|
||||||
alias: carlesfernandez
|
alias: carlesfernandez
|
||||||
@ -102,7 +101,7 @@ authors:
|
|||||||
family-names: "van der Linden"
|
family-names: "van der Linden"
|
||||||
given-names: Stefan
|
given-names: Stefan
|
||||||
cff-version: "1.2.0"
|
cff-version: "1.2.0"
|
||||||
date-released: "2021-08-23"
|
date-released: "2022-02-15"
|
||||||
identifiers:
|
identifiers:
|
||||||
- description: "The concept DOI of the work. This is a DOI always pointing to the latest stable release."
|
- description: "The concept DOI of the work. This is a DOI always pointing to the latest stable release."
|
||||||
type: doi
|
type: doi
|
||||||
@ -326,4 +325,4 @@ repository-code: "https://github.com/gnss-sdr/gnss-sdr"
|
|||||||
title: GNSS-SDR
|
title: GNSS-SDR
|
||||||
type: software
|
type: software
|
||||||
url: "https://gnss-sdr.org"
|
url: "https://gnss-sdr.org"
|
||||||
version: "0.0.15"
|
version: "0.0.16"
|
||||||
|
@ -166,9 +166,9 @@ endif()
|
|||||||
set(VERSION_INFO_MAJOR_VERSION 0)
|
set(VERSION_INFO_MAJOR_VERSION 0)
|
||||||
set(VERSION_INFO_API_COMPAT 0)
|
set(VERSION_INFO_API_COMPAT 0)
|
||||||
if(${THIS_IS_A_RELEASE})
|
if(${THIS_IS_A_RELEASE})
|
||||||
set(VERSION_INFO_MINOR_VERSION 15)
|
set(VERSION_INFO_MINOR_VERSION 16)
|
||||||
else()
|
else()
|
||||||
set(VERSION_INFO_MINOR_VERSION 15.git-${GIT_BRANCH}-${GIT_COMMIT_HASH})
|
set(VERSION_INFO_MINOR_VERSION 16.git-${GIT_BRANCH}-${GIT_COMMIT_HASH})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_INFO_MINOR_VERSION})
|
set(VERSION ${VERSION_INFO_MAJOR_VERSION}.${VERSION_INFO_API_COMPAT}.${VERSION_INFO_MINOR_VERSION})
|
||||||
@ -330,7 +330,7 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
set(GNSSSDR_GNSS_SIM_LOCAL_VERSION "master")
|
||||||
set(GNSSSDR_GPSTK_LOCAL_VERSION "8.0.0")
|
set(GNSSSDR_GPSTK_LOCAL_VERSION "8.0.0")
|
||||||
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.21")
|
set(GNSSSDR_MATIO_LOCAL_VERSION "1.5.22")
|
||||||
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.12")
|
set(GNSSSDR_PUGIXML_LOCAL_VERSION "1.12")
|
||||||
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.19.4")
|
set(GNSSSDR_PROTOCOLBUFFERS_LOCAL_VERSION "3.19.4")
|
||||||
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.6.1")
|
set(GNSSSDR_BENCHMARK_LOCAL_VERSION "1.6.1")
|
||||||
|
@ -470,9 +470,9 @@ your GNU/Linux distribution, GNSS-SDR can also work well with OpenSSL.
|
|||||||
#### Install [Matio](https://github.com/tbeu/matio "Matio's Homepage"), MATLAB MAT file I/O library:
|
#### Install [Matio](https://github.com/tbeu/matio "Matio's Homepage"), MATLAB MAT file I/O library:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ wget https://github.com/tbeu/matio/releases/download/v1.5.21/matio-1.5.21.tar.gz
|
$ wget https://github.com/tbeu/matio/releases/download/v1.5.22/matio-1.5.22.tar.gz
|
||||||
$ tar xvfz matio-1.5.21.tar.gz
|
$ tar xvfz matio-1.5.22.tar.gz
|
||||||
$ cd matio-1.5.21
|
$ cd matio-1.5.22
|
||||||
$ ./configure
|
$ ./configure
|
||||||
$ make
|
$ make
|
||||||
$ sudo make install
|
$ sudo make install
|
||||||
|
@ -16,6 +16,24 @@ All notable changes to GNSS-SDR will be documented in this file.
|
|||||||
|
|
||||||
### Improvements in Availability:
|
### Improvements in Availability:
|
||||||
|
|
||||||
|
- Compute PVT solutions when using GPS L5 signals even if the satellite is
|
||||||
|
reported as not healthy in the CNAV message.
|
||||||
|
|
||||||
|
### Improvements in Reliability:
|
||||||
|
|
||||||
|
- Fix some defects detected by Coverity Scan 2021.12.1.
|
||||||
|
|
||||||
|
See the definitions of concepts and metrics at
|
||||||
|
https://gnss-sdr.org/design-forces/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## [GNSS-SDR v0.0.16](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.16) - 2022-02-15
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.6090349.svg)](https://doi.org/10.5281/zenodo.6090349)
|
||||||
|
|
||||||
|
### Improvements in Availability:
|
||||||
|
|
||||||
- Added the Galileo E5b receiving chain. The software is now able to compute PVT
|
- Added the Galileo E5b receiving chain. The software is now able to compute PVT
|
||||||
solutions as a standalone Galileo E5b receiver.
|
solutions as a standalone Galileo E5b receiver.
|
||||||
- Improved Time-To-First-Fix when using GPS L1 C/A signals, fixing a bug that
|
- Improved Time-To-First-Fix when using GPS L1 C/A signals, fixing a bug that
|
||||||
@ -120,6 +138,8 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.15](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.15) - 2021-08-23
|
## [GNSS-SDR v0.0.15](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.15) - 2021-08-23
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.5242839.svg)](https://doi.org/10.5281/zenodo.5242839)
|
||||||
|
|
||||||
### Improvements in Availability:
|
### Improvements in Availability:
|
||||||
|
|
||||||
- Added the reading of reduced clock and ephemeris data (CED) in the Galileo E1B
|
- Added the reading of reduced clock and ephemeris data (CED) in the Galileo E1B
|
||||||
@ -244,6 +264,8 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.14](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.14) - 2021-01-08
|
## [GNSS-SDR v0.0.14](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.14) - 2021-01-08
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.4428100.svg)](https://doi.org/10.5281/zenodo.4428100)
|
||||||
|
|
||||||
### Improvements in Availability:
|
### Improvements in Availability:
|
||||||
|
|
||||||
- Fixed bug in acquisition detection when the configuration parameter
|
- Fixed bug in acquisition detection when the configuration parameter
|
||||||
@ -353,6 +375,8 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.13](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.13) - 2020-07-29
|
## [GNSS-SDR v0.0.13](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.13) - 2020-07-29
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3965566.svg)](https://doi.org/10.5281/zenodo.3965566)
|
||||||
|
|
||||||
### Improvements in Efficiency:
|
### Improvements in Efficiency:
|
||||||
|
|
||||||
- Faster internal handling of `Gnss_Synchro` objects by reducing the amount of
|
- Faster internal handling of `Gnss_Synchro` objects by reducing the amount of
|
||||||
@ -467,6 +491,8 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.12](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.12) - 2020-03-13
|
## [GNSS-SDR v0.0.12](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.12) - 2020-03-13
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3709089.svg)](https://doi.org/10.5281/zenodo.3709089)
|
||||||
|
|
||||||
### Improvements in Accuracy:
|
### Improvements in Accuracy:
|
||||||
|
|
||||||
- Improved accuracy of the C/N0 estimator.
|
- Improved accuracy of the C/N0 estimator.
|
||||||
@ -661,6 +687,8 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.11](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.11) - 2019-08-04
|
## [GNSS-SDR v0.0.11](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.11) - 2019-08-04
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.3359989.svg)](https://doi.org/10.5281/zenodo.3359989)
|
||||||
|
|
||||||
This release has several improvements in different dimensions, addition of new
|
This release has several improvements in different dimensions, addition of new
|
||||||
features and bug fixes:
|
features and bug fixes:
|
||||||
|
|
||||||
@ -814,6 +842,8 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10) - 2018-12-14
|
## [GNSS-SDR v0.0.10](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.10) - 2018-12-14
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.2279988.svg)](https://doi.org/10.5281/zenodo.2279988)
|
||||||
|
|
||||||
This release has several improvements in different dimensions, addition of new
|
This release has several improvements in different dimensions, addition of new
|
||||||
features and bug fixes:
|
features and bug fixes:
|
||||||
|
|
||||||
@ -1046,7 +1076,7 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.9](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.9) - 2017-02-13
|
## [GNSS-SDR v0.0.9](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.9) - 2017-02-13
|
||||||
|
|
||||||
DOI: https://doi.org/10.5281/zenodo.291371
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.291371.svg)](https://doi.org/10.5281/zenodo.291371)
|
||||||
|
|
||||||
This release has several improvements, addition of new features and bug fixes in
|
This release has several improvements, addition of new features and bug fixes in
|
||||||
many dimensions:
|
many dimensions:
|
||||||
@ -1167,7 +1197,7 @@ https://gnss-sdr.org/design-forces/
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.8](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.8) - 2016-07-04
|
## [GNSS-SDR v0.0.8](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.8) - 2016-07-04
|
||||||
|
|
||||||
DOI: https://doi.org/10.5281/zenodo.57022
|
[![DOI](https://zenodo.org/badge/doi/10.5281/zenodo.57022.svg)](http://dx.doi.org/10.5281/zenodo.57022)
|
||||||
|
|
||||||
This is a maintenance and bug fix release with no relevant new features with
|
This is a maintenance and bug fix release with no relevant new features with
|
||||||
respect to v0.0.7. The main changes are:
|
respect to v0.0.7. The main changes are:
|
||||||
@ -1193,7 +1223,7 @@ respect to v0.0.7. The main changes are:
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.7](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.7) - 2016-05-15
|
## [GNSS-SDR v0.0.7](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.7) - 2016-05-15
|
||||||
|
|
||||||
DOI: https://doi.org/10.5281/zenodo.51521
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.51521.svg)](https://doi.org/10.5281/zenodo.51521)
|
||||||
|
|
||||||
This release has several improvements, addition of new features and bug fixes:
|
This release has several improvements, addition of new features and bug fixes:
|
||||||
|
|
||||||
@ -1285,6 +1315,8 @@ This release has several improvements, addition of new features and bug fixes:
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.6](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.6) - 2015-09-02
|
## [GNSS-SDR v0.0.6](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.6) - 2015-09-02
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.30104.svg)](https://doi.org/10.5281/zenodo.30104)
|
||||||
|
|
||||||
This release has several improvements and bug fixes:
|
This release has several improvements and bug fixes:
|
||||||
|
|
||||||
- Added initial support to multi-band, multi-source configurations (multiple
|
- Added initial support to multi-band, multi-source configurations (multiple
|
||||||
@ -1335,6 +1367,8 @@ This release has several improvements and bug fixes:
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.5](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.5) - 2015-01-13
|
## [GNSS-SDR v0.0.5](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.5) - 2015-01-13
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.13920.svg)](https://doi.org/10.5281/zenodo.13920)
|
||||||
|
|
||||||
This release has several improvements and bug fixes:
|
This release has several improvements and bug fixes:
|
||||||
|
|
||||||
- Now GNSS-SDR can be installed on the system with the usual
|
- Now GNSS-SDR can be installed on the system with the usual
|
||||||
@ -1362,6 +1396,8 @@ This release has several improvements and bug fixes:
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.4](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.4) - 2014-09-08
|
## [GNSS-SDR v0.0.4](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.4) - 2014-09-08
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.11628.svg)](https://doi.org/10.5281/zenodo.11628)
|
||||||
|
|
||||||
This release has several improvements and bug fixes:
|
This release has several improvements and bug fixes:
|
||||||
|
|
||||||
- Added hybrid processing GPS L1 C/A and Galileo E1B, providing position fixes
|
- Added hybrid processing GPS L1 C/A and Galileo E1B, providing position fixes
|
||||||
@ -1399,6 +1435,8 @@ This release has several improvements and bug fixes:
|
|||||||
|
|
||||||
## [GNSS-SDR v0.0.3](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.3) - 2014-06-30
|
## [GNSS-SDR v0.0.3](https://github.com/gnss-sdr/gnss-sdr/releases/tag/v0.0.3) - 2014-06-30
|
||||||
|
|
||||||
|
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.10708.svg)](https://doi.org/10.5281/zenodo.10708)
|
||||||
|
|
||||||
This release has several improvements and bug fixes, completing the transition
|
This release has several improvements and bug fixes, completing the transition
|
||||||
from Subversion to Git. The main changes are:
|
from Subversion to Git. The main changes are:
|
||||||
|
|
||||||
|
@ -89,7 +89,7 @@ dependencies and build process. Mainly, it consists on installing <a href="https
|
|||||||
\li <a href="https://www.libvolk.org" target="_blank">Volk</a>, a Vector-Optimized Library of Kernels which provides an abstraction of optimized math routines targeting several SIMD processors,
|
\li <a href="https://www.libvolk.org" target="_blank">Volk</a>, a Vector-Optimized Library of Kernels which provides an abstraction of optimized math routines targeting several SIMD processors,
|
||||||
|
|
||||||
and, optionally,
|
and, optionally,
|
||||||
\li GNU Radio modules for hardware interface (<a href="https://github.com/gnuradio/gnuradio/tree/master/gr-uhd" target="_blank">gr-uhd</a>, <a href="http://git.osmocom.org/gr-osmosdr" target="_blank">gr-osmosdr</a>, <a href="https://github.com/analogdevicesinc/gr-iio" target="_blank">gr-iio</a>),
|
\li GNU Radio modules for hardware interface (<a href="https://github.com/gnuradio/gnuradio/tree/main/gr-uhd" target="_blank">gr-uhd</a>, <a href="http://git.osmocom.org/gr-osmosdr" target="_blank">gr-osmosdr</a>, <a href="https://github.com/analogdevicesinc/gr-iio" target="_blank">gr-iio</a>),
|
||||||
\li <a href="https://github.com/google/benchmark" target="_blank">Benchmark</a>, a library to benchmark code snippets,
|
\li <a href="https://github.com/google/benchmark" target="_blank">Benchmark</a>, a library to benchmark code snippets,
|
||||||
\li <a href="https://github.com/gperftools/gperftools" target="_blank">Gperftools</a>, which provides fast, multi-threaded malloc() and performance analysis tools.
|
\li <a href="https://github.com/gperftools/gperftools" target="_blank">Gperftools</a>, which provides fast, multi-threaded malloc() and performance analysis tools.
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
.\" SPDX-FileCopyrightText: Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
|
.\" SPDX-FileCopyrightText: Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
|
||||||
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
|
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
|
||||||
.TH gnss\-sdr 1 "23 Aug 2021" "0.0.15" "gnss\-sdr man page"
|
.TH gnss\-sdr 1 "15 Feb 2022" "0.0.16" "gnss\-sdr man page"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
\fBgnss\-sdr\fR \- GNSS Software Defined Receiver.
|
\fBgnss\-sdr\fR \- GNSS Software Defined Receiver.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -1254,8 +1254,9 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg)
|
|||||||
}
|
}
|
||||||
if (gps_cnav_ephemeris->signal_health != 0)
|
if (gps_cnav_ephemeris->signal_health != 0)
|
||||||
{
|
{
|
||||||
std::cout << TEXT_RED << "Satellite " << Gnss_Satellite(std::string("GPS"), gps_cnav_ephemeris->PRN)
|
std::cout << "Satellite " << Gnss_Satellite(std::string("GPS"), gps_cnav_ephemeris->PRN)
|
||||||
<< " is not healthy, not used for navigation" << TEXT_RESET << '\n';
|
<< " does not report a healthy status in the CNAV message,"
|
||||||
|
<< " use PVT solutions at your own risk.\n";
|
||||||
}
|
}
|
||||||
DLOG(INFO) << "New GPS CNAV ephemeris record has arrived ";
|
DLOG(INFO) << "New GPS CNAV ephemeris record has arrived ";
|
||||||
}
|
}
|
||||||
@ -1698,7 +1699,7 @@ void rtklib_pvt_gs::log_source_timetag_info(double RX_time_ns, double TAG_time_n
|
|||||||
}
|
}
|
||||||
catch (const std::exception& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
std::cerr << "Problem writting at the log PVT timetag metadata file: " << e.what() << '\n';
|
std::cerr << "Problem writing at the log PVT timetag metadata file: " << e.what() << '\n';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2023,7 +2024,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
if (tmp_eph_iter_cnav != d_internal_pvt_solver->gps_cnav_ephemeris_map.cend())
|
if (tmp_eph_iter_cnav != d_internal_pvt_solver->gps_cnav_ephemeris_map.cend())
|
||||||
{
|
{
|
||||||
const uint32_t prn_aux = tmp_eph_iter_cnav->second.PRN;
|
const uint32_t prn_aux = tmp_eph_iter_cnav->second.PRN;
|
||||||
if ((prn_aux == in[i][epoch].PRN) && (((std::string(in[i][epoch].Signal) == std::string("2S")) || (std::string(in[i][epoch].Signal) == std::string("L5"))) && (tmp_eph_iter_cnav->second.signal_health == 0)))
|
if ((prn_aux == in[i][epoch].PRN) && (((std::string(in[i][epoch].Signal) == std::string("2S")) || (std::string(in[i][epoch].Signal) == std::string("L5")))))
|
||||||
{
|
{
|
||||||
store_valid_observable = true;
|
store_valid_observable = true;
|
||||||
}
|
}
|
||||||
@ -2114,10 +2115,10 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
{
|
{
|
||||||
const double Rx_clock_offset_s = d_internal_pvt_solver->get_time_offset_s();
|
const double Rx_clock_offset_s = d_internal_pvt_solver->get_time_offset_s();
|
||||||
|
|
||||||
//**************** time tags ****************
|
// **************** time tags ****************
|
||||||
if (d_enable_rx_clock_correction == false) // todo: currently only works if clock correction is disabled (computed clock offset is applied here)
|
if (d_enable_rx_clock_correction == false) // todo: currently only works if clock correction is disabled (computed clock offset is applied here)
|
||||||
{
|
{
|
||||||
//************ Source TimeTag comparison with GNSS computed TOW *************
|
// ************ Source TimeTag comparison with GNSS computed TOW *************
|
||||||
|
|
||||||
if (!d_TimeChannelTagTimestamps.empty())
|
if (!d_TimeChannelTagTimestamps.empty())
|
||||||
{
|
{
|
||||||
@ -2151,7 +2152,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//**********************************************
|
// **********************************************
|
||||||
|
|
||||||
if (fabs(Rx_clock_offset_s) * 1000.0 > d_max_obs_block_rx_clock_offset_ms)
|
if (fabs(Rx_clock_offset_s) * 1000.0 > d_max_obs_block_rx_clock_offset_ms)
|
||||||
{
|
{
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
* \brief Print RINEX annotation. If it is the first annotation, it also
|
* \brief Print RINEX annotation. If it is the first annotation, it also
|
||||||
* prints the RINEX headers for navigation and observation files. If it is
|
* prints the RINEX headers for navigation and observation files. If it is
|
||||||
* not the first annotation, it only annotates the observation, and updates
|
* not the first annotation, it only annotates the observation, and updates
|
||||||
* the navigation header if UTC data was not available when writting it for
|
* the navigation header if UTC data was not available when writing it for
|
||||||
* the first time. The meaning of type_of_rx is as follows:
|
* the first time. The meaning of type_of_rx is as follows:
|
||||||
*
|
*
|
||||||
* type_of_rx | Signals
|
* type_of_rx | Signals
|
||||||
|
@ -216,7 +216,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_state = 1;
|
d_state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -368,7 +368,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += d_fft_size * ninput_items[0]; // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 1;
|
acquisition_message = 1;
|
||||||
@ -403,7 +403,7 @@ int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 2;
|
acquisition_message = 2;
|
||||||
|
@ -226,7 +226,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_state = 1;
|
d_state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -389,7 +389,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 1;
|
acquisition_message = 1;
|
||||||
@ -424,7 +424,7 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 2;
|
acquisition_message = 2;
|
||||||
|
@ -680,7 +680,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_state = 1;
|
d_state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
|||||||
{
|
{
|
||||||
// We already have d_max_dwells consecutive blocks in the internal buffer,
|
// We already have d_max_dwells consecutive blocks in the internal buffer,
|
||||||
// just skip input blocks.
|
// just skip input blocks.
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]);
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0];
|
||||||
}
|
}
|
||||||
|
|
||||||
// We create a new thread to process next block if the following
|
// We create a new thread to process next block if the following
|
||||||
@ -754,7 +754,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
|
|
||||||
acquisition_message = 1;
|
acquisition_message = 1;
|
||||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||||
@ -788,7 +788,7 @@ int pcps_opencl_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
|
|
||||||
acquisition_message = 2;
|
acquisition_message = 2;
|
||||||
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
this->message_port_pub(pmt::mp("events"), pmt::from_long(acquisition_message));
|
||||||
|
@ -256,7 +256,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_state = 1;
|
d_state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_sampled_ms * d_samples_per_ms * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_sampled_ms) * d_samples_per_ms * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
// DLOG(INFO) << "END CASE 0";
|
// DLOG(INFO) << "END CASE 0";
|
||||||
break;
|
break;
|
||||||
@ -290,7 +290,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_test_statistics = 0.0;
|
d_test_statistics = 0.0;
|
||||||
d_noise_floor_power = 0.0;
|
d_noise_floor_power = 0.0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_sampled_ms * d_samples_per_ms); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_sampled_ms) * d_samples_per_ms; // sample counter
|
||||||
|
|
||||||
d_well_count++;
|
d_well_count++;
|
||||||
|
|
||||||
@ -495,7 +495,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_sampled_ms * d_samples_per_ms * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_sampled_ms) * d_samples_per_ms * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 1;
|
acquisition_message = 1;
|
||||||
@ -538,7 +538,7 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_sampled_ms * d_samples_per_ms * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_sampled_ms) * d_samples_per_ms * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 2;
|
acquisition_message = 2;
|
||||||
|
@ -251,7 +251,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_state = 1;
|
d_state = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
break;
|
break;
|
||||||
@ -390,7 +390,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 1;
|
acquisition_message = 1;
|
||||||
@ -425,7 +425,7 @@ int pcps_tong_acquisition_cc::general_work(int noutput_items,
|
|||||||
d_active = false;
|
d_active = false;
|
||||||
d_state = 0;
|
d_state = 0;
|
||||||
|
|
||||||
d_sample_counter += static_cast<uint64_t>(d_fft_size * ninput_items[0]); // sample counter
|
d_sample_counter += static_cast<uint64_t>(d_fft_size) * ninput_items[0]; // sample counter
|
||||||
consume_each(ninput_items[0]);
|
consume_each(ninput_items[0]);
|
||||||
|
|
||||||
acquisition_message = 2;
|
acquisition_message = 2;
|
||||||
|
@ -209,7 +209,7 @@ message(STATUS "Build type set to ${CMAKE_BUILD_TYPE}.")
|
|||||||
|
|
||||||
set(VERSION_INFO_MAJOR_VERSION 0)
|
set(VERSION_INFO_MAJOR_VERSION 0)
|
||||||
set(VERSION_INFO_MINOR_VERSION 0)
|
set(VERSION_INFO_MINOR_VERSION 0)
|
||||||
set(VERSION_INFO_MAINT_VERSION 15)
|
set(VERSION_INFO_MAINT_VERSION 16)
|
||||||
include(VolkGnsssdrVersion) # setup version info
|
include(VolkGnsssdrVersion) # setup version info
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
.\" SPDX-FileCopyrightText: Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
|
.\" SPDX-FileCopyrightText: Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
|
||||||
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
|
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
|
||||||
.TH volk_gnsssdr\-config\-info 1 "23 Aug 2021" "0.0.15" "volk_gnsssdr\-config\-info man page"
|
.TH volk_gnsssdr\-config\-info 1 "15 Feb 2022" "0.0.16" "volk_gnsssdr\-config\-info man page"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
\fBvolk_gnsssdr\-config\-info\fR \- Prints configuration information of libvolk_gnsssdr functions.
|
\fBvolk_gnsssdr\-config\-info\fR \- Prints configuration information of libvolk_gnsssdr functions.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
.\" SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
.\" SPDX-FileCopyrightText: Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
|
.\" SPDX-FileCopyrightText: Carles Fernandez-Prades <carles.fernandez(at)cttc.es>
|
||||||
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
|
.\" Contact carles.fernandez@cttc.es to correct errors or typos.
|
||||||
.TH volk_gnsssdr_profile 1 "23 Aug 2021" "0.0.15" "volk_gnsssdr_profile man page"
|
.TH volk_gnsssdr_profile 1 "15 Feb 2022" "0.0.16" "volk_gnsssdr_profile man page"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
\fBvolk_gnsssdr_profile\fR \- Profiler application for libvolk_gnsssdr functions.
|
\fBvolk_gnsssdr_profile\fR \- Profiler application for libvolk_gnsssdr functions.
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
|
@ -1439,7 +1439,7 @@ static void ParseCpuId(const uint32_t max_cpuid_leaf, X86Info* info,
|
|||||||
if (!CpuFeatures_StringView_IsEquals(key, str("flags"))) continue;
|
if (!CpuFeatures_StringView_IsEquals(key, str("flags"))) continue;
|
||||||
features->sse = CpuFeatures_StringView_HasWord(value, "sse", ' ');
|
features->sse = CpuFeatures_StringView_HasWord(value, "sse", ' ');
|
||||||
features->sse2 = CpuFeatures_StringView_HasWord(value, "sse2", ' ');
|
features->sse2 = CpuFeatures_StringView_HasWord(value, "sse2", ' ');
|
||||||
features->sse3 = CpuFeatures_StringView_HasWord(value, "sse3", ' ');
|
features->sse3 = CpuFeatures_StringView_HasWord(value, "pni", ' ');
|
||||||
features->ssse3 = CpuFeatures_StringView_HasWord(value, "ssse3", ' ');
|
features->ssse3 = CpuFeatures_StringView_HasWord(value, "ssse3", ' ');
|
||||||
features->sse4_1 = CpuFeatures_StringView_HasWord(value, "sse4_1", ' ');
|
features->sse4_1 = CpuFeatures_StringView_HasWord(value, "sse4_1", ' ');
|
||||||
features->sse4_2 = CpuFeatures_StringView_HasWord(value, "sse4_2", ' ');
|
features->sse4_2 = CpuFeatures_StringView_HasWord(value, "sse4_2", ' ');
|
||||||
|
@ -33,11 +33,11 @@ boost::system::error_code Rtl_Tcp_Dongle_Info::read(boost::asio::ip::tcp::socket
|
|||||||
{
|
{
|
||||||
boost::system::error_code ec;
|
boost::system::error_code ec;
|
||||||
|
|
||||||
unsigned char data[sizeof(char) * 4 + sizeof(uint32_t) * 2];
|
std::vector<unsigned char> data(sizeof(char) * 4 + sizeof(uint32_t) * 2);
|
||||||
size_t received_bits = socket.receive(boost::asio::buffer(data), 0, ec);
|
size_t received_bits = socket.receive(boost::asio::buffer(data), 0, ec);
|
||||||
if (!ec && (received_bits > 0))
|
if (!ec && (received_bits > 0))
|
||||||
{
|
{
|
||||||
std::memcpy(magic_, data, 4);
|
std::memcpy(magic_, data.data(), 4);
|
||||||
|
|
||||||
uint32_t type;
|
uint32_t type;
|
||||||
std::memcpy(&type, &data[4], 4);
|
std::memcpy(&type, &data[4], 4);
|
||||||
|
@ -1003,6 +1003,7 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
|||||||
{
|
{
|
||||||
d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_FNAV_CODES_PER_SYMBOL * GALILEO_E5A_CODE_PERIOD_MS);
|
d_TOW_at_current_symbol_ms += static_cast<uint32_t>(GALILEO_FNAV_CODES_PER_SYMBOL * GALILEO_E5A_CODE_PERIOD_MS);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (d_enable_navdata_monitor && !d_nav_msg_packet.nav_message.empty())
|
if (d_enable_navdata_monitor && !d_nav_msg_packet.nav_message.empty())
|
||||||
{
|
{
|
||||||
d_nav_msg_packet.system = std::string(1, current_symbol.System);
|
d_nav_msg_packet.system = std::string(1, current_symbol.System);
|
||||||
@ -1015,7 +1016,6 @@ int galileo_telemetry_decoder_gs::general_work(int noutput_items __attribute__((
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
case 3: // CNAV
|
case 3: // CNAV
|
||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
|
@ -178,8 +178,7 @@ void Galileo_E1_Tcp_Connector_Tracking_cc::start_tracking()
|
|||||||
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
|
d_carrier_doppler_hz = d_acq_carrier_doppler_hz;
|
||||||
d_current_prn_length_samples = d_vector_length;
|
d_current_prn_length_samples = d_vector_length;
|
||||||
|
|
||||||
std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of Galileo E1 signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of Galileo E1 signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -263,8 +263,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
|||||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
d_acc_carrier_phase_initialized = false;
|
d_acc_carrier_phase_initialized = false;
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
|
@ -263,8 +263,7 @@ void glonass_l1_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
|||||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
d_acc_carrier_phase_initialized = false;
|
d_acc_carrier_phase_initialized = false;
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
|
@ -205,8 +205,7 @@ void Glonass_L1_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
|||||||
|
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
d_acc_carrier_phase_initialized = false;
|
d_acc_carrier_phase_initialized = false;
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
|
@ -259,8 +259,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_cc::start_tracking()
|
|||||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -260,8 +260,7 @@ void glonass_l2_ca_dll_pll_c_aid_tracking_sc::start_tracking()
|
|||||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -206,8 +206,7 @@ void Glonass_L2_Ca_Dll_Pll_Tracking_cc::start_tracking()
|
|||||||
|
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of GLONASS L2 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -218,8 +218,7 @@ void Gps_L1_Ca_Dll_Pll_Tracking_GPU_cc::start_tracking()
|
|||||||
d_pll_to_dll_assist_secs_Ti = 0.0;
|
d_pll_to_dll_assist_secs_Ti = 0.0;
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
const std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -302,8 +302,7 @@ void Gps_L1_Ca_Kf_Tracking_cc::start_tracking()
|
|||||||
|
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -203,8 +203,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
|||||||
|
|
||||||
d_code_phase_samples = d_acq_code_phase_samples;
|
d_code_phase_samples = d_acq_code_phase_samples;
|
||||||
|
|
||||||
std::string sys_ = &d_acquisition_gnss_synchro->System;
|
sys = std::string(1, d_acquisition_gnss_synchro->System);
|
||||||
sys = sys_.substr(0, 1);
|
|
||||||
|
|
||||||
// DEBUG OUTPUT
|
// DEBUG OUTPUT
|
||||||
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
std::cout << "Tracking of GPS L1 C/A signal started on channel " << d_channel << " for satellite " << Gnss_Satellite(systemName[sys], d_acquisition_gnss_synchro->PRN) << '\n';
|
||||||
|
@ -78,7 +78,7 @@ else()
|
|||||||
add_library(tracking_libs ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
|
add_library(tracking_libs ${TRACKING_LIB_SOURCES} ${TRACKING_LIB_HEADERS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_link_libraries(tracking_libs
|
target_link_libraries(tracking_libs
|
||||||
PUBLIC
|
PUBLIC
|
||||||
Armadillo::armadillo
|
Armadillo::armadillo
|
||||||
Boost::headers
|
Boost::headers
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
#include "gnss_sdr_supl_client.h"
|
#include "gnss_sdr_supl_client.h"
|
||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
|
#include "MATH_CONSTANTS.h"
|
||||||
#include <boost/archive/xml_iarchive.hpp>
|
#include <boost/archive/xml_iarchive.hpp>
|
||||||
#include <boost/archive/xml_oarchive.hpp>
|
#include <boost/archive/xml_oarchive.hpp>
|
||||||
#include <boost/serialization/map.hpp>
|
#include <boost/serialization/map.hpp>
|
||||||
@ -858,6 +859,7 @@ bool Gnss_Sdr_Supl_Client::read_gal_almanac_from_gsa(const std::string& file_nam
|
|||||||
Galileo_Almanac gal_alm;
|
Galileo_Almanac gal_alm;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
const double sqrtAnominal = 5440.588203494; // square root of Galileo nominal orbit semi-major axis
|
||||||
uint32_t prn = static_cast<uint32_t>(std::stoi(almanac.child_value("SVID")));
|
uint32_t prn = static_cast<uint32_t>(std::stoi(almanac.child_value("SVID")));
|
||||||
gal_alm.PRN = prn;
|
gal_alm.PRN = prn;
|
||||||
gal_alm.toa = std::stoi(almanac.child("almanac").child_value("t0a"));
|
gal_alm.toa = std::stoi(almanac.child("almanac").child_value("t0a"));
|
||||||
@ -866,7 +868,7 @@ bool Gnss_Sdr_Supl_Client::read_gal_almanac_from_gsa(const std::string& file_nam
|
|||||||
gal_alm.delta_i = std::stod(almanac.child("almanac").child_value("deltai"));
|
gal_alm.delta_i = std::stod(almanac.child("almanac").child_value("deltai"));
|
||||||
gal_alm.M_0 = std::stod(almanac.child("almanac").child_value("m0"));
|
gal_alm.M_0 = std::stod(almanac.child("almanac").child_value("m0"));
|
||||||
gal_alm.ecc = std::stod(almanac.child("almanac").child_value("ecc"));
|
gal_alm.ecc = std::stod(almanac.child("almanac").child_value("ecc"));
|
||||||
gal_alm.sqrtA = std::stod(almanac.child("almanac").child_value("aSqRoot"));
|
gal_alm.sqrtA = std::stod(almanac.child("almanac").child_value("aSqRoot")) + sqrtAnominal;
|
||||||
gal_alm.OMEGA_0 = std::stod(almanac.child("almanac").child_value("omega0"));
|
gal_alm.OMEGA_0 = std::stod(almanac.child("almanac").child_value("omega0"));
|
||||||
gal_alm.omega = std::stod(almanac.child("almanac").child_value("w"));
|
gal_alm.omega = std::stod(almanac.child("almanac").child_value("w"));
|
||||||
gal_alm.OMEGAdot = std::stod(almanac.child("almanac").child_value("omegaDot"));
|
gal_alm.OMEGAdot = std::stod(almanac.child("almanac").child_value("omegaDot"));
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
set(SYSTEM_PARAMETERS_SOURCES
|
set(SYSTEM_PARAMETERS_SOURCES
|
||||||
|
gnss_almanac.cc
|
||||||
gnss_ephemeris.cc
|
gnss_ephemeris.cc
|
||||||
gnss_satellite.cc
|
gnss_satellite.cc
|
||||||
gnss_signal.cc
|
gnss_signal.cc
|
||||||
|
@ -36,7 +36,10 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
Beidou_Dnav_Almanac() = default;
|
Beidou_Dnav_Almanac()
|
||||||
|
{
|
||||||
|
this->System = 'B';
|
||||||
|
};
|
||||||
|
|
||||||
int SV_health{}; //!< SV Health
|
int SV_health{}; //!< SV Health
|
||||||
|
|
||||||
|
@ -36,7 +36,10 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
Galileo_Almanac() = default;
|
Galileo_Almanac()
|
||||||
|
{
|
||||||
|
this->System = 'E';
|
||||||
|
};
|
||||||
|
|
||||||
int32_t IODa{};
|
int32_t IODa{};
|
||||||
int32_t E5b_HS{};
|
int32_t E5b_HS{};
|
||||||
|
275
src/core/system_parameters/gnss_almanac.cc
Normal file
275
src/core/system_parameters/gnss_almanac.cc
Normal file
@ -0,0 +1,275 @@
|
|||||||
|
/*!
|
||||||
|
* \file gnss_almanac.cc
|
||||||
|
* \brief Base class for GNSS almanac storage
|
||||||
|
* \author Carles Fernandez, 2022. cfernandez(at)cttc.es
|
||||||
|
*
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*
|
||||||
|
* GNSS-SDR is a Global Navigation Satellite System software-defined receiver.
|
||||||
|
* This file is part of GNSS-SDR.
|
||||||
|
*
|
||||||
|
* Copyright (C) 2010-2022 (see AUTHORS file for a list of contributors)
|
||||||
|
* SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
*
|
||||||
|
* -----------------------------------------------------------------------------
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "gnss_almanac.h"
|
||||||
|
#include "MATH_CONSTANTS.h"
|
||||||
|
#include "gnss_frequencies.h"
|
||||||
|
#include <algorithm>
|
||||||
|
#include <cmath>
|
||||||
|
#include <functional>
|
||||||
|
#include <numeric>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
double Gnss_Almanac::check_t(double time) const
|
||||||
|
{
|
||||||
|
const double half_week = 302400.0; // seconds
|
||||||
|
double corrTime = time;
|
||||||
|
if (time > half_week)
|
||||||
|
{
|
||||||
|
corrTime = time - 2.0 * half_week;
|
||||||
|
}
|
||||||
|
else if (time < -half_week)
|
||||||
|
{
|
||||||
|
corrTime = time + 2.0 * half_week;
|
||||||
|
}
|
||||||
|
return corrTime;
|
||||||
|
}
|
||||||
|
|
||||||
|
double Gnss_Almanac::predicted_doppler(double rx_time_s,
|
||||||
|
double lat,
|
||||||
|
double lon,
|
||||||
|
double h,
|
||||||
|
double ve,
|
||||||
|
double vn,
|
||||||
|
double vu,
|
||||||
|
int band) const
|
||||||
|
{
|
||||||
|
const double RE_WGS84 = 6378137.0; //!< earth semimajor axis (WGS84) (m)
|
||||||
|
const double FE_WGS84 = (1.0 / 298.257223563); //!< earth flattening (WGS84)
|
||||||
|
const double lat_rad = lat * D2R;
|
||||||
|
const double lon_rad = lon * D2R;
|
||||||
|
|
||||||
|
const double sinp = sin(lat_rad);
|
||||||
|
const double cosp = cos(lat_rad);
|
||||||
|
const double sinl = sin(lon_rad);
|
||||||
|
const double cosl = cos(lon_rad);
|
||||||
|
|
||||||
|
const double e2 = FE_WGS84 * (2.0 - FE_WGS84);
|
||||||
|
const double v = RE_WGS84 / std::sqrt(1.0 - e2 * sinp * sinp);
|
||||||
|
|
||||||
|
// Position in EFEF
|
||||||
|
const std::vector<double> pos_rx = {(v + h) * cosp * cosl, (v + h) * cosp * sinl, (v * (1.0 - e2) + h) * sinp};
|
||||||
|
|
||||||
|
// Velocity in EFEF
|
||||||
|
const double t = cosp * vu - sinp * vn;
|
||||||
|
const std::vector<double> vel_rx = {cosl * t - sinl * ve, sinl * t + cosl * ve, sinp * vu + cosp * vn};
|
||||||
|
|
||||||
|
std::array<double, 7> sat_pos_vel = {0};
|
||||||
|
satellitePosVelComputation(rx_time_s, sat_pos_vel);
|
||||||
|
const std::vector<double> pos_sat = {sat_pos_vel[0], sat_pos_vel[1], sat_pos_vel[2]};
|
||||||
|
const std::vector<double> vel_sat = {sat_pos_vel[3], sat_pos_vel[4], sat_pos_vel[5]};
|
||||||
|
|
||||||
|
std::vector<double> x_sr = pos_sat;
|
||||||
|
std::transform(x_sr.begin(), x_sr.end(), pos_rx.begin(), x_sr.begin(), std::minus<double>()); // pos_sat - pos_rx
|
||||||
|
|
||||||
|
const double norm_x_sr = std::sqrt(std::inner_product(x_sr.begin(), x_sr.end(), x_sr.begin(), 0.0)); // Euclidean norm
|
||||||
|
|
||||||
|
std::vector<double> v_sr = vel_sat;
|
||||||
|
std::transform(v_sr.begin(), v_sr.end(), vel_rx.begin(), v_sr.begin(), std::minus<double>()); // vel_sat - vel_rx
|
||||||
|
|
||||||
|
const double radial_vel = std::inner_product(v_sr.begin(), v_sr.end(), x_sr.begin(), 0.0) / norm_x_sr;
|
||||||
|
const double predicted_doppler_normalized = -(radial_vel / SPEED_OF_LIGHT_M_S);
|
||||||
|
double predicted_doppler = 0.0;
|
||||||
|
if (this->System == 'E') // Galileo
|
||||||
|
{
|
||||||
|
if (band == 1)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ1;
|
||||||
|
}
|
||||||
|
else if (band == 5)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ5;
|
||||||
|
}
|
||||||
|
else if (band == 6)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ6;
|
||||||
|
}
|
||||||
|
else if (band == 7)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ7;
|
||||||
|
}
|
||||||
|
else if (band == 8)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ8;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this->System == 'G') // GPS
|
||||||
|
{
|
||||||
|
if (band == 1)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ1;
|
||||||
|
}
|
||||||
|
else if (band == 2)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ2;
|
||||||
|
}
|
||||||
|
else if (band == 5)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this->System == 'B') // Beidou
|
||||||
|
{
|
||||||
|
if (band == 1)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ1_BDS;
|
||||||
|
}
|
||||||
|
else if (band == 2)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ2_BDS;
|
||||||
|
}
|
||||||
|
else if (band == 3)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ3_BDS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
return predicted_doppler;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Gnss_Almanac::satellitePosVelComputation(double transmitTime, std::array<double, 7>& pos_vel_dtr) const
|
||||||
|
{
|
||||||
|
// Restore semi-major axis
|
||||||
|
const double a = this->sqrtA * this->sqrtA;
|
||||||
|
|
||||||
|
// Computed mean motion
|
||||||
|
double n;
|
||||||
|
if (this->System == 'E')
|
||||||
|
{
|
||||||
|
n = sqrt(GALILEO_GM / (a * a * a));
|
||||||
|
}
|
||||||
|
else if (this->System == 'B')
|
||||||
|
{
|
||||||
|
n = sqrt(BEIDOU_GM / (a * a * a));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
n = sqrt(GPS_GM / (a * a * a));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Time from ephemeris reference epoch
|
||||||
|
const double tk = check_t(transmitTime - static_cast<double>(this->toa));
|
||||||
|
|
||||||
|
// Mean anomaly
|
||||||
|
const double M = this->M_0 * GNSS_PI + n * tk;
|
||||||
|
|
||||||
|
// Initial guess of eccentric anomaly
|
||||||
|
double E = M;
|
||||||
|
double E_old;
|
||||||
|
double dE;
|
||||||
|
|
||||||
|
// --- Iteratively compute eccentric anomaly -------------------------------
|
||||||
|
for (int32_t ii = 1; ii < 20; ii++)
|
||||||
|
{
|
||||||
|
E_old = E;
|
||||||
|
E = M + this->ecc * sin(E);
|
||||||
|
dE = fmod(E - E_old, 2.0 * GNSS_PI);
|
||||||
|
if (fabs(dE) < 1e-12)
|
||||||
|
{
|
||||||
|
// Necessary precision is reached, exit from the loop
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const double sek = sin(E);
|
||||||
|
const double cek = cos(E);
|
||||||
|
const double OneMinusecosE = 1.0 - this->ecc * cek;
|
||||||
|
const double sq1e2 = sqrt(1.0 - this->ecc * this->ecc);
|
||||||
|
const double ekdot = n / OneMinusecosE;
|
||||||
|
|
||||||
|
// Compute the true anomaly
|
||||||
|
const double tmp_Y = sq1e2 * sek;
|
||||||
|
const double tmp_X = cek - this->ecc;
|
||||||
|
const double nu = atan2(tmp_Y, tmp_X);
|
||||||
|
|
||||||
|
// Compute angle phi (argument of Latitude)
|
||||||
|
const double phi = nu + this->omega * GNSS_PI;
|
||||||
|
|
||||||
|
const double pkdot = sq1e2 * ekdot / OneMinusecosE;
|
||||||
|
|
||||||
|
// Correct argument of latitude
|
||||||
|
const double suk = sin(phi);
|
||||||
|
const double cuk = cos(phi);
|
||||||
|
|
||||||
|
// Correct radius
|
||||||
|
const double r = a * OneMinusecosE;
|
||||||
|
const double rkdot = a * this->ecc * sek * ekdot;
|
||||||
|
|
||||||
|
// Correct inclination
|
||||||
|
double i;
|
||||||
|
if (this->System == 'E')
|
||||||
|
{
|
||||||
|
i = ((56.0 / 180.0) + this->delta_i) * GNSS_PI;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
i = (0.3 + this->delta_i) * GNSS_PI;
|
||||||
|
}
|
||||||
|
|
||||||
|
const double sik = sin(i);
|
||||||
|
const double cik = cos(i);
|
||||||
|
|
||||||
|
// Compute the angle between the ascending node and the Greenwich meridian
|
||||||
|
double Omega;
|
||||||
|
double Omega_dot;
|
||||||
|
if (this->System == 'B')
|
||||||
|
{
|
||||||
|
Omega_dot = this->OMEGAdot * GNSS_PI - BEIDOU_OMEGA_EARTH_DOT;
|
||||||
|
Omega = this->OMEGA_0 * GNSS_PI + Omega_dot * tk - BEIDOU_OMEGA_EARTH_DOT * static_cast<double>(this->toa);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Omega_dot = this->OMEGAdot * GNSS_PI - GNSS_OMEGA_EARTH_DOT;
|
||||||
|
Omega = this->OMEGA_0 * GNSS_PI + Omega_dot * tk - GNSS_OMEGA_EARTH_DOT * static_cast<double>(this->toa);
|
||||||
|
}
|
||||||
|
|
||||||
|
const double sok = sin(Omega);
|
||||||
|
const double cok = cos(Omega);
|
||||||
|
|
||||||
|
// --- Compute satellite coordinates in Earth-fixed coordinates
|
||||||
|
const double xprime = r * cuk;
|
||||||
|
const double yprime = r * suk;
|
||||||
|
|
||||||
|
pos_vel_dtr[0] = xprime * cok - yprime * cik * sok;
|
||||||
|
pos_vel_dtr[1] = xprime * sok + yprime * cik * cok;
|
||||||
|
pos_vel_dtr[2] = yprime * sik;
|
||||||
|
|
||||||
|
// Satellite's velocity
|
||||||
|
const double xpkdot = rkdot * cuk - yprime * pkdot;
|
||||||
|
const double ypkdot = rkdot * suk + xprime * pkdot;
|
||||||
|
const double tmp = ypkdot * cik;
|
||||||
|
|
||||||
|
pos_vel_dtr[3] = -Omega_dot * pos_vel_dtr[1] + xpkdot * cok - tmp * sok;
|
||||||
|
pos_vel_dtr[4] = Omega_dot * pos_vel_dtr[0] + xpkdot * sok + tmp * cok;
|
||||||
|
pos_vel_dtr[5] = ypkdot * sik;
|
||||||
|
pos_vel_dtr[6] = 0;
|
||||||
|
}
|
@ -18,6 +18,7 @@
|
|||||||
#ifndef GNSS_SDR_GNSS_ALMANAC_H
|
#ifndef GNSS_SDR_GNSS_ALMANAC_H
|
||||||
#define GNSS_SDR_GNSS_ALMANAC_H
|
#define GNSS_SDR_GNSS_ALMANAC_H
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
/** \addtogroup Core
|
/** \addtogroup Core
|
||||||
@ -37,6 +38,46 @@ public:
|
|||||||
*/
|
*/
|
||||||
Gnss_Almanac() = default;
|
Gnss_Almanac() = default;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Computes prediction of the Doppler shift for a given time and receiver's position and velocity.
|
||||||
|
* \f[
|
||||||
|
* f_{d} = - \mathbf{v} \frac{\mathbf{x}^{T}}{\left| \mathbf{x} \right| } \frac{f_{L}}{c}
|
||||||
|
* \f]
|
||||||
|
* where:
|
||||||
|
* \f[
|
||||||
|
* \mathbf{v} = \mathbf{v}_{sat} - \mathbf{v}_{rx}
|
||||||
|
* \f]
|
||||||
|
* \f[
|
||||||
|
* \mathbf{x} = \mathbf{x}_{sat} - \mathbf{x}_{rx}
|
||||||
|
* \f]
|
||||||
|
* \f[
|
||||||
|
* \left| \mathbf{x} \right| = \sqrt{\mathbf{x}\mathbf{x}^{T}}
|
||||||
|
* \f]
|
||||||
|
*
|
||||||
|
* @param[in] rx_time_s Time of Week in seconds
|
||||||
|
* @param[in] lat Receiver's latitude in degrees
|
||||||
|
* @param[in] lon Receiver's longitude in degrees
|
||||||
|
* @param[in] h Receiver's height in meters
|
||||||
|
* @param[in] ve Receiver's velocity in the East direction [m/s]
|
||||||
|
* @param[in] vn Receiver's velocity in the North direction [m/s]
|
||||||
|
* @param[in] vu Receiver's velocity in the Up direction [m/s]
|
||||||
|
* @param[in] band Signal band for which the Doppler will be computed
|
||||||
|
* (1: L1 C/A, E1B, BI1; 2: L2C, BI2; 3: BI3; 5: L5/E5a; 6: E6B; 7: E5b; 8: E5a+E5b)
|
||||||
|
*/
|
||||||
|
double predicted_doppler(double rx_time_s,
|
||||||
|
double lat,
|
||||||
|
double lon,
|
||||||
|
double h,
|
||||||
|
double ve,
|
||||||
|
double vn,
|
||||||
|
double vu,
|
||||||
|
int band) const;
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Computes satellite Position and Velocity, in ECEF, for a given time (expressed in seconds of week)
|
||||||
|
*/
|
||||||
|
void satellitePosVelComputation(double transmitTime, std::array<double, 7>& pos_vel_dtr) const;
|
||||||
|
|
||||||
uint32_t PRN{}; //!< SV PRN NUMBER
|
uint32_t PRN{}; //!< SV PRN NUMBER
|
||||||
double delta_i{}; //!< Inclination Angle at Reference Time (relative to i_0 = 0.30 semi-circles)
|
double delta_i{}; //!< Inclination Angle at Reference Time (relative to i_0 = 0.30 semi-circles)
|
||||||
int32_t toa{}; //!< Almanac data reference time of week [s]
|
int32_t toa{}; //!< Almanac data reference time of week [s]
|
||||||
@ -49,6 +90,11 @@ public:
|
|||||||
double OMEGAdot{}; //!< Rate of Right Ascension [semi-circles/s]
|
double OMEGAdot{}; //!< Rate of Right Ascension [semi-circles/s]
|
||||||
double af0{}; //!< Coefficient 0 of code phase offset model [s]
|
double af0{}; //!< Coefficient 0 of code phase offset model [s]
|
||||||
double af1{}; //!< Coefficient 1 of code phase offset model [s/s]
|
double af1{}; //!< Coefficient 1 of code phase offset model [s/s]
|
||||||
|
|
||||||
|
protected:
|
||||||
|
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'B': BeiDou
|
||||||
|
private:
|
||||||
|
double check_t(double time) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -17,10 +17,156 @@
|
|||||||
|
|
||||||
#include "gnss_ephemeris.h"
|
#include "gnss_ephemeris.h"
|
||||||
#include "MATH_CONSTANTS.h"
|
#include "MATH_CONSTANTS.h"
|
||||||
|
#include "gnss_frequencies.h"
|
||||||
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <functional>
|
||||||
|
#include <numeric>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
|
|
||||||
|
double Gnss_Ephemeris::sv_clock_drift(double transmitTime)
|
||||||
|
{
|
||||||
|
const double dt = check_t(transmitTime - this->toc);
|
||||||
|
this->dtr = sv_clock_relativistic_term(transmitTime);
|
||||||
|
this->satClkDrift = this->af0 + this->af1 * dt + this->af2 * (dt * dt) + this->dtr;
|
||||||
|
return this->satClkDrift;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
double Gnss_Ephemeris::predicted_doppler(double rx_time_s,
|
||||||
|
double lat,
|
||||||
|
double lon,
|
||||||
|
double h,
|
||||||
|
double ve,
|
||||||
|
double vn,
|
||||||
|
double vu,
|
||||||
|
int band) const
|
||||||
|
{
|
||||||
|
const double RE_WGS84 = 6378137.0; //!< earth semimajor axis (WGS84) (m)
|
||||||
|
const double FE_WGS84 = (1.0 / 298.257223563); //!< earth flattening (WGS84)
|
||||||
|
const double lat_rad = lat * D2R;
|
||||||
|
const double lon_rad = lon * D2R;
|
||||||
|
|
||||||
|
const double sinp = sin(lat_rad);
|
||||||
|
const double cosp = cos(lat_rad);
|
||||||
|
const double sinl = sin(lon_rad);
|
||||||
|
const double cosl = cos(lon_rad);
|
||||||
|
|
||||||
|
const double e2 = FE_WGS84 * (2.0 - FE_WGS84);
|
||||||
|
const double v = RE_WGS84 / std::sqrt(1.0 - e2 * sinp * sinp);
|
||||||
|
|
||||||
|
// Position in EFEF
|
||||||
|
const std::vector<double> pos_rx = {(v + h) * cosp * cosl, (v + h) * cosp * sinl, (v * (1.0 - e2) + h) * sinp};
|
||||||
|
|
||||||
|
// Velocity in EFEF
|
||||||
|
const double t = cosp * vu - sinp * vn;
|
||||||
|
const std::vector<double> vel_rx = {cosl * t - sinl * ve, sinl * t + cosl * ve, sinp * vu + cosp * vn};
|
||||||
|
|
||||||
|
std::array<double, 7> sat_pos_vel = {0};
|
||||||
|
satellitePosVelComputation(rx_time_s, sat_pos_vel);
|
||||||
|
const std::vector<double> pos_sat = {sat_pos_vel[0], sat_pos_vel[1], sat_pos_vel[2]};
|
||||||
|
const std::vector<double> vel_sat = {sat_pos_vel[3], sat_pos_vel[4], sat_pos_vel[5]};
|
||||||
|
|
||||||
|
std::vector<double> x_sr = pos_sat;
|
||||||
|
std::transform(x_sr.begin(), x_sr.end(), pos_rx.begin(), x_sr.begin(), std::minus<double>()); // pos_sat - pos_rx
|
||||||
|
|
||||||
|
const double norm_x_sr = std::sqrt(std::inner_product(x_sr.begin(), x_sr.end(), x_sr.begin(), 0.0)); // Euclidean norm
|
||||||
|
|
||||||
|
std::vector<double> v_sr = vel_sat;
|
||||||
|
std::transform(v_sr.begin(), v_sr.end(), vel_rx.begin(), v_sr.begin(), std::minus<double>()); // vel_sat - vel_rx
|
||||||
|
|
||||||
|
const double radial_vel = std::inner_product(v_sr.begin(), v_sr.end(), x_sr.begin(), 0.0) / norm_x_sr;
|
||||||
|
const double predicted_doppler_normalized = -(radial_vel / SPEED_OF_LIGHT_M_S);
|
||||||
|
double predicted_doppler = 0.0;
|
||||||
|
if (this->System == 'E') // Galileo
|
||||||
|
{
|
||||||
|
if (band == 1)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ1;
|
||||||
|
}
|
||||||
|
else if (band == 5)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ5;
|
||||||
|
}
|
||||||
|
else if (band == 6)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ6;
|
||||||
|
}
|
||||||
|
else if (band == 7)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ7;
|
||||||
|
}
|
||||||
|
else if (band == 8)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ8;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this->System == 'G') // GPS
|
||||||
|
{
|
||||||
|
if (band == 1)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ1;
|
||||||
|
}
|
||||||
|
else if (band == 2)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ2;
|
||||||
|
}
|
||||||
|
else if (band == 5)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ5;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (this->System == 'B') // Beidou
|
||||||
|
{
|
||||||
|
if (band == 1)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ1_BDS;
|
||||||
|
}
|
||||||
|
else if (band == 2)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ2_BDS;
|
||||||
|
}
|
||||||
|
else if (band == 3)
|
||||||
|
{
|
||||||
|
predicted_doppler = predicted_doppler_normalized * FREQ3_BDS;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
predicted_doppler = 0.0;
|
||||||
|
}
|
||||||
|
return predicted_doppler;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
void Gnss_Ephemeris::satellitePosition(double transmitTime)
|
void Gnss_Ephemeris::satellitePosition(double transmitTime)
|
||||||
|
{
|
||||||
|
std::array<double, 7> pos_vel_dtr = {0};
|
||||||
|
satellitePosVelComputation(transmitTime, pos_vel_dtr);
|
||||||
|
this->satpos_X = pos_vel_dtr[0];
|
||||||
|
this->satpos_Y = pos_vel_dtr[1];
|
||||||
|
this->satpos_Z = pos_vel_dtr[2];
|
||||||
|
this->satvel_X = pos_vel_dtr[3];
|
||||||
|
this->satvel_Y = pos_vel_dtr[4];
|
||||||
|
this->satvel_Z = pos_vel_dtr[5];
|
||||||
|
this->dtr = pos_vel_dtr[6];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void Gnss_Ephemeris::satellitePosVelComputation(double transmitTime, std::array<double, 7>& pos_vel_dtr) const
|
||||||
{
|
{
|
||||||
// Restore semi-major axis
|
// Restore semi-major axis
|
||||||
const double a = this->sqrtA * this->sqrtA;
|
const double a = this->sqrtA * this->sqrtA;
|
||||||
@ -47,10 +193,7 @@ void Gnss_Ephemeris::satellitePosition(double transmitTime)
|
|||||||
const double n = n0 + this->delta_n;
|
const double n = n0 + this->delta_n;
|
||||||
|
|
||||||
// Mean anomaly
|
// Mean anomaly
|
||||||
double M = this->M_0 + n * tk;
|
const double M = this->M_0 + n * tk;
|
||||||
|
|
||||||
// Reduce mean anomaly to between 0 and 2pi
|
|
||||||
M = fmod((M + 2.0 * GNSS_PI), (2.0 * GNSS_PI));
|
|
||||||
|
|
||||||
// Initial guess of eccentric anomaly
|
// Initial guess of eccentric anomaly
|
||||||
double E = M;
|
double E = M;
|
||||||
@ -82,10 +225,9 @@ void Gnss_Ephemeris::satellitePosition(double transmitTime)
|
|||||||
const double nu = atan2(tmp_Y, tmp_X);
|
const double nu = atan2(tmp_Y, tmp_X);
|
||||||
|
|
||||||
// Compute angle phi (argument of Latitude)
|
// Compute angle phi (argument of Latitude)
|
||||||
double phi = nu + this->omega;
|
const double phi = nu + this->omega;
|
||||||
|
|
||||||
// Reduce phi to between 0 and 2*pi rad
|
// Reduce phi to between 0 and 2*pi rad
|
||||||
phi = fmod((phi), (2.0 * GNSS_PI));
|
|
||||||
const double s2pk = sin(2.0 * phi);
|
const double s2pk = sin(2.0 * phi);
|
||||||
const double c2pk = cos(2.0 * phi);
|
const double c2pk = cos(2.0 * phi);
|
||||||
const double pkdot = sq1e2 * ekdot / OneMinusecosE;
|
const double pkdot = sq1e2 * ekdot / OneMinusecosE;
|
||||||
@ -120,53 +262,59 @@ void Gnss_Ephemeris::satellitePosition(double transmitTime)
|
|||||||
Omega = this->OMEGA_0 + Omega_dot * tk - GNSS_OMEGA_EARTH_DOT * static_cast<double>(this->toe);
|
Omega = this->OMEGA_0 + Omega_dot * tk - GNSS_OMEGA_EARTH_DOT * static_cast<double>(this->toe);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Reduce to between 0 and 2*pi rad
|
|
||||||
Omega = fmod((Omega + 2.0 * GNSS_PI), (2.0 * GNSS_PI));
|
|
||||||
const double sok = sin(Omega);
|
const double sok = sin(Omega);
|
||||||
const double cok = cos(Omega);
|
const double cok = cos(Omega);
|
||||||
|
|
||||||
// --- Compute satellite coordinates in Earth-fixed coordinates
|
// --- Compute satellite coordinates in Earth-fixed coordinates
|
||||||
const double xprime = r * cuk;
|
const double xprime = r * cuk;
|
||||||
const double yprime = r * suk;
|
const double yprime = r * suk;
|
||||||
this->satpos_X = xprime * cok - yprime * cik * sok;
|
|
||||||
this->satpos_Y = xprime * sok + yprime * cik * cok; // ********NOTE: in GALILEO ICD this expression is not correct because it has minus (- sin(u) * r * cos(i) * cos(Omega)) instead of plus
|
pos_vel_dtr[0] = xprime * cok - yprime * cik * sok;
|
||||||
this->satpos_Z = yprime * sik;
|
pos_vel_dtr[1] = xprime * sok + yprime * cik * cok; // ********NOTE: in GALILEO ICD this expression is not correct because it has minus (- sin(u) * r * cos(i) * cos(Omega)) instead of plus
|
||||||
|
pos_vel_dtr[2] = yprime * sik;
|
||||||
|
|
||||||
// Satellite's velocity. Can be useful for Vector Tracking loops
|
// Satellite's velocity. Can be useful for Vector Tracking loops
|
||||||
const double xpkdot = rkdot * cuk - yprime * ukdot;
|
const double xpkdot = rkdot * cuk - yprime * ukdot;
|
||||||
const double ypkdot = rkdot * suk + xprime * ukdot;
|
const double ypkdot = rkdot * suk + xprime * ukdot;
|
||||||
const double tmp = ypkdot * cik - this->satpos_Z * ikdot;
|
const double tmp = ypkdot * cik - pos_vel_dtr[2] * ikdot;
|
||||||
|
|
||||||
this->satvel_X = -Omega_dot * this->satpos_Y + xpkdot * cok - tmp * sok;
|
pos_vel_dtr[3] = -Omega_dot * pos_vel_dtr[1] + xpkdot * cok - tmp * sok;
|
||||||
this->satvel_Y = Omega_dot * this->satpos_X + xpkdot * sok + tmp * cok;
|
pos_vel_dtr[4] = Omega_dot * pos_vel_dtr[0] + xpkdot * sok + tmp * cok;
|
||||||
this->satvel_Z = yprime * cik * ikdot + ypkdot * sik;
|
pos_vel_dtr[5] = yprime * cik * ikdot + ypkdot * sik;
|
||||||
|
|
||||||
// Time from ephemeris reference clock
|
// Time from ephemeris reference clock
|
||||||
tk = check_t(transmitTime - this->toc);
|
tk = check_t(transmitTime - this->toc);
|
||||||
|
|
||||||
this->dtr = this->af0 + this->af1 * tk + this->af2 * tk * tk;
|
pos_vel_dtr[6] = this->af0 + this->af1 * tk + this->af2 * tk * tk;
|
||||||
|
|
||||||
if (this->System == 'E')
|
if (this->System == 'E')
|
||||||
{
|
{
|
||||||
this->dtr -= 2.0 * sqrt(GALILEO_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
pos_vel_dtr[6] -= 2.0 * sqrt(GALILEO_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
||||||
}
|
}
|
||||||
else if (this->System == 'B')
|
else if (this->System == 'B')
|
||||||
{
|
{
|
||||||
this->dtr -= 2.0 * sqrt(BEIDOU_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
pos_vel_dtr[6] -= 2.0 * sqrt(BEIDOU_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->dtr -= 2.0 * sqrt(GPS_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
pos_vel_dtr[6] -= 2.0 * sqrt(GPS_GM * a) * this->ecc * sek / (SPEED_OF_LIGHT_M_S * SPEED_OF_LIGHT_M_S);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double Gnss_Ephemeris::sv_clock_drift(double transmitTime)
|
double Gnss_Ephemeris::check_t(double time) const
|
||||||
{
|
{
|
||||||
const double dt = check_t(transmitTime - this->toc);
|
const double half_week = 302400.0; // seconds
|
||||||
this->dtr = sv_clock_relativistic_term(transmitTime);
|
double corrTime = time;
|
||||||
this->satClkDrift = this->af0 + this->af1 * dt + this->af2 * (dt * dt) + this->dtr;
|
if (time > half_week)
|
||||||
return this->satClkDrift;
|
{
|
||||||
|
corrTime = time - 2.0 * half_week;
|
||||||
|
}
|
||||||
|
else if (time < -half_week)
|
||||||
|
{
|
||||||
|
corrTime = time + 2.0 * half_week;
|
||||||
|
}
|
||||||
|
return corrTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -184,7 +332,7 @@ double Gnss_Ephemeris::sv_clock_relativistic_term(double transmitTime) const
|
|||||||
{
|
{
|
||||||
n0 = sqrt(GALILEO_GM / (a * a * a));
|
n0 = sqrt(GALILEO_GM / (a * a * a));
|
||||||
}
|
}
|
||||||
else if (this->System == 'E')
|
else if (this->System == 'B')
|
||||||
{
|
{
|
||||||
n0 = sqrt(BEIDOU_GM / (a * a * a));
|
n0 = sqrt(BEIDOU_GM / (a * a * a));
|
||||||
}
|
}
|
||||||
@ -198,9 +346,6 @@ double Gnss_Ephemeris::sv_clock_relativistic_term(double transmitTime) const
|
|||||||
// Mean anomaly
|
// Mean anomaly
|
||||||
const double M = this->M_0 + n * tk;
|
const double M = this->M_0 + n * tk;
|
||||||
|
|
||||||
// Reduce mean anomaly to between 0 and 2pi
|
|
||||||
// M = fmod((M + 2.0 * GNSS_PI), (2.0 * GNSS_PI));
|
|
||||||
|
|
||||||
// Initial guess of eccentric anomaly
|
// Initial guess of eccentric anomaly
|
||||||
double E = M;
|
double E = M;
|
||||||
double E_old;
|
double E_old;
|
||||||
@ -235,19 +380,3 @@ double Gnss_Ephemeris::sv_clock_relativistic_term(double transmitTime) const
|
|||||||
}
|
}
|
||||||
return dtr_;
|
return dtr_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
double Gnss_Ephemeris::check_t(double time) const
|
|
||||||
{
|
|
||||||
const double half_week = 302400.0; // seconds
|
|
||||||
double corrTime = time;
|
|
||||||
if (time > half_week)
|
|
||||||
{
|
|
||||||
corrTime = time - 2.0 * half_week;
|
|
||||||
}
|
|
||||||
else if (time < -half_week)
|
|
||||||
{
|
|
||||||
corrTime = time + 2.0 * half_week;
|
|
||||||
}
|
|
||||||
return corrTime;
|
|
||||||
}
|
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
#ifndef GNSS_SDR_GNSS_EPHEMERIS_H
|
#ifndef GNSS_SDR_GNSS_EPHEMERIS_H
|
||||||
#define GNSS_SDR_GNSS_EPHEMERIS_H
|
#define GNSS_SDR_GNSS_EPHEMERIS_H
|
||||||
|
|
||||||
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
@ -36,6 +37,34 @@ public:
|
|||||||
*/
|
*/
|
||||||
double sv_clock_drift(double transmitTime);
|
double sv_clock_drift(double transmitTime);
|
||||||
|
|
||||||
|
/*!
|
||||||
|
* \brief Computes prediction of the Doppler shift for a given time and receiver's position and velocity.
|
||||||
|
* \f[
|
||||||
|
* f_{d} = - \mathbf{v} \frac{\mathbf{x}^{T}}{\left| \mathbf{x} \right| } \frac{f_{L}}{c}
|
||||||
|
* \f]
|
||||||
|
* where:
|
||||||
|
* \f[
|
||||||
|
* \mathbf{v} = \mathbf{v}_{sat} - \mathbf{v}_{rx}
|
||||||
|
* \f]
|
||||||
|
* \f[
|
||||||
|
* \mathbf{x} = \mathbf{x}_{sat} - \mathbf{x}_{rx}
|
||||||
|
* \f]
|
||||||
|
* \f[
|
||||||
|
* \left| \mathbf{x} \right| = \sqrt{\mathbf{x}\mathbf{x}^{T}}
|
||||||
|
* \f]
|
||||||
|
*
|
||||||
|
* @param[in] rx_time_s Time of Week in seconds
|
||||||
|
* @param[in] lat Receiver's latitude in degrees
|
||||||
|
* @param[in] lon Receiver's longitude in degrees
|
||||||
|
* @param[in] h Receiver's height in meters
|
||||||
|
* @param[in] ve Receiver's velocity in the East direction [m/s]
|
||||||
|
* @param[in] vn Receiver's velocity in the North direction [m/s]
|
||||||
|
* @param[in] vu Receiver's velocity in the Up direction [m/s]
|
||||||
|
* @param[in] band Signal band for which the Doppler will be computed
|
||||||
|
* (1: L1 C/A, E1B, BI1; 2: L2C, BI2; 3: BI3; 5: L5/E5a; 6: E6B; 7: E5b; 8: E5a+E5b)
|
||||||
|
*/
|
||||||
|
double predicted_doppler(double rx_time_s, double lat, double lon, double h, double ve, double vn, double vu, int band) const;
|
||||||
|
|
||||||
void satellitePosition(double transmitTime); //!< Computes the ECEF SV coordinates and ECEF velocity
|
void satellitePosition(double transmitTime); //!< Computes the ECEF SV coordinates and ECEF velocity
|
||||||
|
|
||||||
uint32_t PRN{}; //!< SV ID
|
uint32_t PRN{}; //!< SV ID
|
||||||
@ -83,6 +112,7 @@ protected:
|
|||||||
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'B': BeiDou
|
char System{}; //!< Character ID of the GNSS system. 'G': GPS. 'E': Galileo. 'B': BeiDou
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void satellitePosVelComputation(double transmitTime, std::array<double, 7>& pos_vel_dtr) const;
|
||||||
double check_t(double time) const;
|
double check_t(double time) const;
|
||||||
double sv_clock_relativistic_term(double transmitTime) const;
|
double sv_clock_relativistic_term(double transmitTime) const;
|
||||||
};
|
};
|
||||||
|
@ -38,7 +38,10 @@ public:
|
|||||||
/*!
|
/*!
|
||||||
* Default constructor
|
* Default constructor
|
||||||
*/
|
*/
|
||||||
Gps_Almanac() = default;
|
Gps_Almanac()
|
||||||
|
{
|
||||||
|
this->System = 'G';
|
||||||
|
};
|
||||||
|
|
||||||
int32_t SV_health{}; //!< SV Health
|
int32_t SV_health{}; //!< SV Health
|
||||||
int32_t AS_status{}; //!< Anti-Spoofing Flags and SV Configuration
|
int32_t AS_status{}; //!< Anti-Spoofing Flags and SV Configuration
|
||||||
|
@ -465,18 +465,6 @@ Gps_Ephemeris Gps_Navigation_Message::get_ephemeris() const
|
|||||||
ephemeris.alert_flag = b_alert_flag;
|
ephemeris.alert_flag = b_alert_flag;
|
||||||
ephemeris.antispoofing_flag = b_antispoofing_flag;
|
ephemeris.antispoofing_flag = b_antispoofing_flag;
|
||||||
|
|
||||||
// These parameters are empty; can be computed later with
|
|
||||||
// ephemeris.sv_clock_drift(double transmitTime);
|
|
||||||
// ephemeris.satellitePosition(double transmitTime);
|
|
||||||
ephemeris.satClkDrift = d_satClkDrift;
|
|
||||||
ephemeris.dtr = d_dtr;
|
|
||||||
ephemeris.satpos_X = d_satpos_X;
|
|
||||||
ephemeris.satpos_Y = d_satpos_Y;
|
|
||||||
ephemeris.satpos_Z = d_satpos_Z;
|
|
||||||
ephemeris.satvel_X = d_satvel_X;
|
|
||||||
ephemeris.satvel_Y = d_satvel_Y;
|
|
||||||
ephemeris.satvel_Z = d_satvel_Z;
|
|
||||||
|
|
||||||
return ephemeris;
|
return ephemeris;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -195,22 +195,6 @@ private:
|
|||||||
int32_t i_Toa{}; // Almanac reference time [s]
|
int32_t i_Toa{}; // Almanac reference time [s]
|
||||||
int32_t i_WN_A{}; // Modulo 256 of the GPS week number to which the almanac reference time (i_Toa) is referenced
|
int32_t i_WN_A{}; // Modulo 256 of the GPS week number to which the almanac reference time (i_Toa) is referenced
|
||||||
|
|
||||||
// clock terms
|
|
||||||
// double d_master_clock{}; // GPS transmission time
|
|
||||||
|
|
||||||
double d_dtr{}; // relativistic clock correction term
|
|
||||||
double d_satClkDrift{};
|
|
||||||
|
|
||||||
// satellite positions
|
|
||||||
double d_satpos_X{}; // Earth-fixed coordinate x of the satellite [m]. Intersection of the IERS Reference Meridian (IRM) and the plane passing through the origin and normal to the Z-axis.
|
|
||||||
double d_satpos_Y{}; // Earth-fixed coordinate y of the satellite [m]. Completes a right-handed, Earth-Centered, Earth-Fixed orthogonal coordinate system.
|
|
||||||
double d_satpos_Z{}; // Earth-fixed coordinate z of the satellite [m]. The direction of the IERS (International Earth Rotation and Reference Systems Service) Reference Pole (IRP).
|
|
||||||
|
|
||||||
// Satellite velocity
|
|
||||||
double d_satvel_X{}; // Earth-fixed velocity coordinate x of the satellite [m]
|
|
||||||
double d_satvel_Y{}; // Earth-fixed velocity coordinate y of the satellite [m]
|
|
||||||
double d_satvel_Z{}; // Earth-fixed velocity coordinate z of the satellite [m]
|
|
||||||
|
|
||||||
// satellite identification info
|
// satellite identification info
|
||||||
int32_t i_channel_ID{};
|
int32_t i_channel_ID{};
|
||||||
uint32_t i_satellite_PRN{};
|
uint32_t i_satellite_PRN{};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef GNSS_SDR_VERSION
|
#ifndef GNSS_SDR_VERSION
|
||||||
#define GNSS_SDR_VERSION "0.0.15"
|
#define GNSS_SDR_VERSION "0.0.16"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef GOOGLE_STRIP_LOG
|
#ifndef GOOGLE_STRIP_LOG
|
||||||
|
@ -344,9 +344,9 @@ int main(int argc, char** argv)
|
|||||||
{
|
{
|
||||||
std::cout << "Exception caught while capturing samples (bad lexical cast)\n";
|
std::cout << "Exception caught while capturing samples (bad lexical cast)\n";
|
||||||
}
|
}
|
||||||
catch (const boost::io::too_few_args& e)
|
catch (const std::exception& e)
|
||||||
{
|
{
|
||||||
std::cout << "Exception caught while capturing samples (too few args)\n";
|
std::cout << "Exception caught while capturing samples: " << e.what() << '\n';
|
||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
126
src/utils/scripts/download-galileo-almanac.sh
Executable file
126
src/utils/scripts/download-galileo-almanac.sh
Executable file
@ -0,0 +1,126 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# GNSS-SDR shell script that tries to download the latest Galileo Almanac file
|
||||||
|
# published by the European GNSS Service Centre.
|
||||||
|
#
|
||||||
|
# Usage: ./download-galileo-almanac.sh
|
||||||
|
#
|
||||||
|
# SPDX-FileCopyrightText: 2022 Carles Fernandez-Prades <cfernandez(at)cttc.es>
|
||||||
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
|
|
||||||
|
if ! [ -x "$(command -v wget)" ]; then
|
||||||
|
echo "Please install wget before using this script."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
help()
|
||||||
|
{
|
||||||
|
echo "This script tries to download the most recent Galileo Almanac XML file"
|
||||||
|
echo "published by the European GNSS Service Centre."
|
||||||
|
echo "More info at https://www.gsc-europa.eu/product-almanacs"
|
||||||
|
echo "If today there is no published file, the script will look up to one week ago."
|
||||||
|
echo ""
|
||||||
|
echo "Usage:"
|
||||||
|
echo "./download-galileo-almanac.sh [OPTION]"
|
||||||
|
echo " Options:"
|
||||||
|
echo " -h, --help Prints this message"
|
||||||
|
echo " -r, --rename Gets latest Galileo Almanac XML file and saves it as gal_almanac.xml"
|
||||||
|
echo " -d, --date [date] Retrieves file for a specific date, with format YYYY-MM-DD"
|
||||||
|
echo " -rd [date] Retrieves file for a specific date, with format YYYY-MM-DD"
|
||||||
|
echo " and saves it as gal_almanac.xml"
|
||||||
|
echo ""
|
||||||
|
echo " Examples:"
|
||||||
|
echo " ./download-galileo-almanac.sh # Gets latest Galileo Almanac XML file"
|
||||||
|
echo " ./download-galileo-almanac.sh -r # Gets latest Galileo Almanac XML file, stores it as gal_almanac.xml"
|
||||||
|
echo " ./download-galileo-almanac.sh -d 2022-03-15 # Gets Galileo Almanac XML file for that day"
|
||||||
|
echo " ./download-galileo-almanac.sh -rd 2022-03-15 # Gets Galileo Almanac XML file for that day, stores it as gal_almanac.xml"
|
||||||
|
}
|
||||||
|
|
||||||
|
if (([ "$1" = "-h" ]) || ([ "$1" = "--help" ])) ; then
|
||||||
|
help
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
RENAME=""
|
||||||
|
if (([ "$1" = "-r" ]) || ([ "$1" = "--rename" ])) ; then
|
||||||
|
RENAME=" -O gal_almanac.xml "
|
||||||
|
fi
|
||||||
|
|
||||||
|
BASE_URL="https://www.gsc-europa.eu/sites/default/files/sites/all/files/"
|
||||||
|
YEAR=$(date '+%Y')
|
||||||
|
SPACING="-"
|
||||||
|
MONTH=$(date '+%m')
|
||||||
|
DAY=$(date '+%d')
|
||||||
|
|
||||||
|
TERMINATION1="_0.xml"
|
||||||
|
TERMINATION2=".xml"
|
||||||
|
|
||||||
|
COUNTER=1
|
||||||
|
MAX_COUNTER=7
|
||||||
|
|
||||||
|
if (([ "$1" = "-d" ]) || ([ "$1" = "--date" ])) ; then
|
||||||
|
if wget "$BASE_URL$2$TERMINATION2" >/dev/null 2>&1 ; then
|
||||||
|
echo "Downloaded latest Galileo almanac from $BASE_URL$2$TERMINATION2"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Couldn't find an XML file for that date."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
elif [ "$1" = "-rd" ] ; then
|
||||||
|
if wget -O gal_almanac.xml "$BASE_URL$2$TERMINATION2" >/dev/null 2>&1 ; then
|
||||||
|
echo "Downloaded latest Galileo almanac from $BASE_URL$2$TERMINATION2"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "Couldn't find an XML file for that date."
|
||||||
|
rm gal_almanac.xml
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "According to system time, today is $(date '+%Y-%m-%d'). Searching for the latest Galileo almanac ..."
|
||||||
|
fi
|
||||||
|
|
||||||
|
lowercase()
|
||||||
|
{
|
||||||
|
echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||||
|
}
|
||||||
|
|
||||||
|
OS=`lowercase \`uname\``
|
||||||
|
|
||||||
|
date_before()
|
||||||
|
{
|
||||||
|
if [ "$OS" = "darwin" ]; then
|
||||||
|
YEAR=$(date -v -"$COUNTER"d '+%Y')
|
||||||
|
MONTH=$(date -v -"$COUNTER"d '+%m')
|
||||||
|
DAY=$(date -v -"$COUNTER"d '+%d')
|
||||||
|
else
|
||||||
|
YEAR=$(date -d "$COUNTER day ago" '+%Y')
|
||||||
|
MONTH=$(date -d "$COUNTER day ago" '+%m')
|
||||||
|
DAY=$(date -d "$COUNTER day ago" '+%d')
|
||||||
|
fi
|
||||||
|
COUNTER=$(($COUNTER+1))
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
try_download()
|
||||||
|
{
|
||||||
|
while [ $COUNTER -le $MAX_COUNTER ]
|
||||||
|
do
|
||||||
|
url="$BASE_URL$YEAR$SPACING$MONTH$SPACING$DAY$TERMINATION2"
|
||||||
|
if wget $RENAME $url >/dev/null 2>&1 ; then
|
||||||
|
echo "Downloaded latest Galileo almanac from $url"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
date_before
|
||||||
|
try_download
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
url="$BASE_URL$YEAR$SPACING$MONTH$SPACING$DAY$TERMINATION1"
|
||||||
|
if wget $RENAME $url >/dev/null 2>&1 ; then
|
||||||
|
echo "Downloaded latest Galileo almanac from $url"
|
||||||
|
else
|
||||||
|
try_download
|
||||||
|
echo "Couldn't find a recent Galileo almanac."
|
||||||
|
exit 1
|
||||||
|
fi
|
Loading…
Reference in New Issue
Block a user