1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-09 11:30:03 +00:00
This commit is contained in:
Carles Fernandez 2018-03-05 10:42:42 +01:00
commit dbdc0a5c3f
995 changed files with 49605 additions and 46277 deletions

97
.clang-format Normal file
View File

@ -0,0 +1,97 @@
---
Language: Cpp
# BasedOnStyle: Google
# More info: http://clang.llvm.org/docs/ClangFormatStyleOptions.html
AccessModifierOffset: -4
AlignAfterOpenBracket: DontAlign
AlignConsecutiveAssignments: false
AlignConsecutiveDeclarations: false
AlignEscapedNewlinesLeft: true
AlignOperands: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: true
AllowShortBlocksOnASingleLine: false
AllowShortCaseLabelsOnASingleLine: false
AllowShortFunctionsOnASingleLine: All
AllowShortIfStatementsOnASingleLine: true
AllowShortLoopsOnASingleLine: true
AlwaysBreakAfterDefinitionReturnType: None
AlwaysBreakAfterReturnType: None
AlwaysBreakBeforeMultilineStrings: true
AlwaysBreakTemplateDeclarations: false
BinPackArguments: true
BinPackParameters: true
BraceWrapping:
AfterClass: false
AfterControlStatement: false
AfterEnum: false
AfterFunction: false
AfterNamespace: false
AfterObjCDeclaration: false
AfterStruct: false
AfterUnion: false
BeforeCatch: false
BeforeElse: false
IndentBraces: false
BreakBeforeBinaryOperators: None
BreakBeforeBraces: GNU
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BreakAfterJavaFieldAnnotations: false
BreakStringLiterals: true
ColumnLimit: 0
CommentPragmas: '^ IWYU pragma:'
ConstructorInitializerAllOnOneLineOrOnePerLine: true
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: true
DerivePointerAlignment: true
DisableFormat: false
ExperimentalAutoDetectBinPacking: false
ForEachMacros: [ foreach, Q_FOREACH, BOOST_FOREACH ]
IncludeCategories:
- Regex: '^<.*\.h>'
Priority: 1
- Regex: '^<.*'
Priority: 2
- Regex: '.*'
Priority: 3
IncludeIsMainRegex: '([-_](test|unittest))?$'
IndentCaseLabels: false
IndentWidth: 4
IndentWrappedFunctionNames: false
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: false
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 2
NamespaceIndentation: None
ObjCBlockIndentWidth: 2
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakFirstLessLess: 120
PenaltyBreakString: 1000
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
ReflowComments: true
SortIncludes: false
SpaceAfterCStyleCast: false
SpaceAfterTemplateKeyword: true
SpaceBeforeAssignmentOperators: true
SpaceBeforeParens: ControlStatements
SpaceInEmptyParentheses: false
SpacesBeforeTrailingComments: 2
SpacesInAngles: false
SpacesInContainerLiterals: true
SpacesInCStyleCastParentheses: false
SpacesInParentheses: false
SpacesInSquareBrackets: false
Standard: Auto
TabWidth: 8
UseTab: Never
...

View File

@ -128,6 +128,8 @@ $ git pull --rebase upstream next
### How to submit a pull request ### How to submit a pull request
Before submitting you code, please be sure to [apply clang-format](http://gnss-sdr.org/coding-style/#use-tools-for-automated-code-formatting).
When the contribution is ready, you can [submit a pull When the contribution is ready, you can [submit a pull
request](https://github.com/gnss-sdr/gnss-sdr/compare/). Head to your request](https://github.com/gnss-sdr/gnss-sdr/compare/). Head to your
GitHub repository, switch to your `my_feature` branch, and click the GitHub repository, switch to your `my_feature` branch, and click the

View File

@ -84,7 +84,7 @@ $ sudo yum install make automake gcc gcc-c++ kernel-devel cmake git boost-devel
boost-date-time boost-system boost-filesystem boost-thread boost-chrono \ boost-date-time boost-system boost-filesystem boost-thread boost-chrono \
boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \ boost-serialization log4cpp-devel gnuradio-devel gr-osmosdr-devel \
blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \ blas-devel lapack-devel matio-devel armadillo-devel gflags-devel \
glog-devel gnutls-devel openssl-devel python-mako python-six glog-devel openssl-devel python-mako python-six
~~~~~~ ~~~~~~
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
@ -97,11 +97,11 @@ If you are using CentOS 7, you can install the dependencies via Extra Packages f
$ sudo yum install wget $ sudo yum install wget
$ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm $ wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ sudo rpm -Uvh epel-release-latest-7.noarch.rpm $ sudo rpm -Uvh epel-release-latest-7.noarch.rpm
$ sudo yum install make automake gcc gcc-c++ kernel-devel libtool automake \ $ sudo yum install make automake gcc gcc-c++ kernel-devel libtool \
hdf5-devel cmake git boost-devel boost-date-time boost-system \ hdf5-devel cmake git boost-devel boost-date-time boost-system \
boost-filesystem boost-thread boost-chrono boost-serialization \ boost-filesystem boost-thread boost-chrono boost-serialization \
log4cpp-devel gnuradio-devel gr-osmosdr-devel blas-devel lapack-devel \ log4cpp-devel gnuradio-devel gr-osmosdr-devel blas-devel lapack-devel \
armadillo-devel gnutls-devel openssl-devel python-mako python-six armadillo-devel openssl-devel python-mako python-six
~~~~~~ ~~~~~~
Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux). Once you have installed these packages, you can jump directly to [download the source code and build GNSS-SDR](#download-and-build-linux).
@ -244,11 +244,11 @@ changing `/home/username/googletest-release-1.8.0/googletest` by the actual dire
#### Install the [GnuTLS library](http://www.gnutls.org/ "GnuTLS's Homepage"): #### Install the [GnuTLS](http://www.gnutls.org/ "GnuTLS's Homepage") or [OpenSSL](https://www.openssl.org/ "OpenSSL's Homepage") libraries:
~~~~~~ ~~~~~~
$ sudo apt-get install libgnutls-openssl-dev # For Debian/Ubuntu/LinuxMint $ sudo apt-get install libgnutls-openssl-dev # For Debian/Ubuntu/LinuxMint
$ sudo yum install libgnutls-openssl-devel # For Fedora/CentOS/RHEL $ sudo yum install openssl-devel # For Fedora/CentOS/RHEL
~~~~~~ ~~~~~~
In case the GnuTLS library with openssl extensions package is not available in your GNU/Linux distribution, GNSS-SDR can also work well with OpenSSL. In case the GnuTLS library with openssl extensions package is not available in your GNU/Linux distribution, GNSS-SDR can also work well with OpenSSL.

View File

@ -5,7 +5,8 @@ Before submitting your pull request, please make sure the following is done:
2. If you are a first-time contributor, after your pull request you will be asked to sign an Individual Contributor License Agreement ([CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement)) before your code gets accepted into `master`. This license is for your protection as a Contributor as well as for the protection of [CTTC](http://www.cttc.es/); it does not change your rights to use your own contributions for any other purpose. Except for the license granted therein to CTTC and recipients of software distributed by CTTC, you reserve all right, title, and interest in and to your contributions. The information you provide in that CLA will be maintained in accordance with [CTTC's privacy policy](http://www.cttc.es/privacy/). 2. If you are a first-time contributor, after your pull request you will be asked to sign an Individual Contributor License Agreement ([CLA](https://en.wikipedia.org/wiki/Contributor_License_Agreement)) before your code gets accepted into `master`. This license is for your protection as a Contributor as well as for the protection of [CTTC](http://www.cttc.es/); it does not change your rights to use your own contributions for any other purpose. Except for the license granted therein to CTTC and recipients of software distributed by CTTC, you reserve all right, title, and interest in and to your contributions. The information you provide in that CLA will be maintained in accordance with [CTTC's privacy policy](http://www.cttc.es/privacy/).
3. You have read the [Contributing Guidelines](https://github.com/gnss-sdr/gnss-sdr/blob/master/CONTRIBUTING.md). 3. You have read the [Contributing Guidelines](https://github.com/gnss-sdr/gnss-sdr/blob/master/CONTRIBUTING.md).
4. You have read the [coding style guide](http://gnss-sdr.org/coding-style/). 4. You have read the [coding style guide](http://gnss-sdr.org/coding-style/).
5. You have forked the [gnss-sdr upstream repository](https://github.com/gnss-sdr/gnss-sdr) and have created your branch from `next` (or any other currently living branch in the upstream repository). 5. Specifically, you have read [about clang-format](http://gnss-sdr.org/coding-style/#use-tools-for-automated-code-formatting) and you have applied it.
6. Please include a description of your changes here. 6. You have forked the [gnss-sdr upstream repository](https://github.com/gnss-sdr/gnss-sdr) and have created your branch from `next` (or any other currently living branch in the upstream repository).
7. Please include a description of your changes here.
**Please feel free to delete this line and the above text once you have read it and in case you want to go on with your pull request.** **Please feel free to delete this line and the above text once you have read it and in case you want to go on with your pull request.**

View File

@ -44,8 +44,7 @@ using google::LogMessage;
RtklibPvt::RtklibPvt(ConfigurationInterface* configuration, RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
std::string role, std::string role,
unsigned int in_streams, unsigned int in_streams,
unsigned int out_streams) : unsigned int out_streams) : role_(role),
role_(role),
in_streams_(in_streams), in_streams_(in_streams),
out_streams_(out_streams) out_streams_(out_streams)
{ {
@ -417,7 +416,8 @@ RtklibPvt::RtklibPvt(ConfigurationInterface* configuration,
snrmask_t snrmask = {{}, {{}, {}}}; snrmask_t snrmask = {{}, {{}, {}}};
prcopt_t rtklib_configuration_options = {positioning_mode, /* positioning mode (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h */ prcopt_t rtklib_configuration_options = {
positioning_mode, /* positioning mode (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h */
0, /* solution type (0:forward,1:backward,2:combined) */ 0, /* solution type (0:forward,1:backward,2:combined) */
number_of_frequencies, /* number of frequencies (1:L1, 2:L1+L2, 3:L1+L2+L5)*/ number_of_frequencies, /* number of frequencies (1:L1, 2:L1+L2, 3:L1+L2+L5)*/
navigation_system, /* navigation system */ navigation_system, /* navigation system */
@ -522,7 +522,9 @@ RtklibPvt::~RtklibPvt()
void RtklibPvt::connect(gr::top_block_sptr top_block) void RtklibPvt::connect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
// Nothing to connect internally // Nothing to connect internally
DLOG(INFO) << "nothing to connect internally"; DLOG(INFO) << "nothing to connect internally";
} }
@ -530,7 +532,9 @@ void RtklibPvt::connect(gr::top_block_sptr top_block)
void RtklibPvt::disconnect(gr::top_block_sptr top_block) void RtklibPvt::disconnect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
// Nothing to disconnect // Nothing to disconnect
} }

View File

@ -29,7 +29,6 @@
*/ */
#ifndef GNSS_SDR_RTKLIB_PVT_H_ #ifndef GNSS_SDR_RTKLIB_PVT_H_
#define GNSS_SDR_RTKLIB_PVT_H_ #define GNSS_SDR_RTKLIB_PVT_H_

View File

@ -218,7 +218,6 @@ void rtklib_pvt_cc::msg_handler_telemetry(pmt::pmt_t msg)
{ {
LOG(WARNING) << "msg_handler_telemetry unknown object type!"; LOG(WARNING) << "msg_handler_telemetry unknown object type!";
} }
} }
catch (boost::bad_any_cast& e) catch (boost::bad_any_cast& e)
{ {
@ -237,9 +236,7 @@ rtklib_pvt_cc::rtklib_pvt_cc(unsigned int nchannels, bool dump, std::string dump
int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port, int output_rate_ms, int display_rate_ms, bool flag_nmea_tty_port,
std::string nmea_dump_filename, std::string nmea_dump_devname, int rinex_version, std::string nmea_dump_filename, std::string nmea_dump_devname, int rinex_version,
bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port, bool flag_rtcm_server, bool flag_rtcm_tty_port, unsigned short rtcm_tcp_port,
unsigned short rtcm_station_id, std::map<int,int> rtcm_msg_rate_ms, std::string unsigned short rtcm_station_id, std::map<int, int> rtcm_msg_rate_ms, std::string rtcm_dump_devname, const unsigned int type_of_receiver, rtk_t& rtk) : gr::sync_block("rtklib_pvt_cc",
rtcm_dump_devname, const unsigned int type_of_receiver, rtk_t & rtk) :
gr::sync_block("rtklib_pvt_cc",
gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)), gr::io_signature::make(nchannels, nchannels, sizeof(Gnss_Synchro)),
gr::io_signature::make(0, 0, 0)) gr::io_signature::make(0, 0, 0))
{ {
@ -542,13 +539,7 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
std::map<int, Galileo_Ephemeris>::const_iterator tmp_eph_iter_gal = d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN); std::map<int, Galileo_Ephemeris>::const_iterator tmp_eph_iter_gal = d_ls_pvt->galileo_ephemeris_map.find(in[i][epoch].PRN);
std::map<int, Gps_CNAV_Ephemeris>::const_iterator tmp_eph_iter_cnav = d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN); std::map<int, Gps_CNAV_Ephemeris>::const_iterator tmp_eph_iter_cnav = d_ls_pvt->gps_cnav_ephemeris_map.find(in[i][epoch].PRN);
std::map<int, Glonass_Gnav_Ephemeris>::const_iterator tmp_eph_iter_glo_gnav = d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN); std::map<int, Glonass_Gnav_Ephemeris>::const_iterator tmp_eph_iter_glo_gnav = d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN);
if(((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1C") == 0)) if (((tmp_eph_iter_gps->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1C") == 0)) || ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2S") == 0)) || ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1B") == 0)) || ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("5X") == 0)) || ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1G") == 0)) || ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2G") == 0)) || ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("L5") == 0)))
|| ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2S") == 0))
|| ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1B") == 0))
|| ((tmp_eph_iter_gal->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("5X") == 0))
|| ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("1G") == 0))
|| ((tmp_eph_iter_glo_gnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("2G") == 0))
|| ((tmp_eph_iter_cnav->second.i_satellite_PRN == in[i][epoch].PRN) && (std::string(in[i][epoch].Signal).compare("L5") == 0)))
{ {
// store valid observables in a map. // store valid observables in a map.
gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(i, in[i][epoch])); gnss_observables_map.insert(std::pair<int, Gnss_Synchro>(i, in[i][epoch]));
@ -582,7 +573,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
d_rtcm_printer->lock_time(d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time d_rtcm_printer->lock_time(d_ls_pvt->glonass_gnav_ephemeris_map.find(in[i][epoch].PRN)->second, in[i][epoch].RX_time, in[i][epoch]); // keep track of locking time
} }
} }
} }
} }
@ -734,7 +724,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, d_rx_time); rp->rinex_obs_header(rp->obsFile, gps_ephemeris_iter->second, d_rx_time);
rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model); rp->rinex_nav_header(rp->navFile, d_ls_pvt->gps_iono, d_ls_pvt->gps_utc_model);
b_rinex_header_written = true; // do not write header anymore b_rinex_header_written = true; // do not write header anymore
} }
} }
if (type_of_rx == 2) // GPS L2C only if (type_of_rx == 2) // GPS L2C only
@ -958,7 +947,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
rp->log_rinex_nav(rp->navFile, d_ls_pvt->gps_ephemeris_map); rp->log_rinex_nav(rp->navFile, d_ls_pvt->gps_ephemeris_map);
rp->log_rinex_nav(rp->navGloFile, d_ls_pvt->glonass_gnav_ephemeris_map); rp->log_rinex_nav(rp->navGloFile, d_ls_pvt->glonass_gnav_ephemeris_map);
} }
} }
if (type_of_rx == 27) // Galileo E1B + GLONASS L1 C/A if (type_of_rx == 27) // Galileo E1B + GLONASS L1 C/A
{ {
@ -1164,7 +1152,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())) if ((glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) && (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()))
{ {
rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map); rp->log_rinex_obs(rp->obsFile, galileo_ephemeris_iter->second, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map);
} }
if (!b_rinex_header_updated && (d_ls_pvt->galileo_utc_model.A0_6 != 0)) if (!b_rinex_header_updated && (d_ls_pvt->galileo_utc_model.A0_6 != 0))
{ {
@ -1303,7 +1290,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
} }
if (flag_write_RTCM_MSM_output == true) if (flag_write_RTCM_MSM_output == true)
{ {
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend()) if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.cend())
{ {
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
@ -1387,7 +1373,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
} }
if (flag_write_RTCM_MSM_output == true) if (flag_write_RTCM_MSM_output == true)
{ {
if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend()) if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.cend())
{ {
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, {}, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, {}, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
@ -1453,7 +1438,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
} }
if (flag_write_RTCM_MSM_output == true) if (flag_write_RTCM_MSM_output == true)
{ {
if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end()) if (galileo_ephemeris_iter != d_ls_pvt->galileo_ephemeris_map.end())
{ {
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, galileo_ephemeris_iter->second, {}, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);
@ -1461,7 +1445,6 @@ int rtklib_pvt_cc::work (int noutput_items, gr_vector_const_void_star &input_ite
} }
if (flag_write_RTCM_MSM_output == true) if (flag_write_RTCM_MSM_output == true)
{ {
if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end()) if (glonass_gnav_ephemeris_iter != d_ls_pvt->glonass_gnav_ephemeris_map.end())
{ {
d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, {}, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0); d_rtcm_printer->Print_Rtcm_MSM(7, {}, {}, {}, glonass_gnav_ephemeris_iter->second, d_rx_time, gnss_observables_map, 0, 0, 0, 0, 0);

View File

@ -144,7 +144,8 @@ private:
bool first_fix; bool first_fix;
key_t sysv_msg_key; key_t sysv_msg_key;
int sysv_msqid; int sysv_msqid;
typedef struct { typedef struct
{
long mtype; //required by sys v message long mtype; //required by sys v message
double ttff; double ttff;
} ttff_msgbuf; } ttff_msgbuf;

View File

@ -194,5 +194,3 @@ bool GeoJSON_Printer::close_file()
return false; return false;
} }
} }

View File

@ -50,6 +50,7 @@ private:
std::ofstream geojson_file; std::ofstream geojson_file;
bool first_pos; bool first_pos;
std::string filename_; std::string filename_;
public: public:
GeoJSON_Printer(); GeoJSON_Printer();
~GeoJSON_Printer(); ~GeoJSON_Printer();

View File

@ -347,7 +347,8 @@ bool hybrid_ls_pvt::get_PVT(std::map<int,Gnss_Synchro> gnss_observables_map, dou
DLOG(INFO) << "Hybrid Position at " << boost::posix_time::to_simple_string(p_time) DLOG(INFO) << "Hybrid Position at " << boost::posix_time::to_simple_string(p_time)
<< " is Lat = " << this->get_latitude() << " [deg], Long = " << this->get_longitude() << " is Lat = " << this->get_latitude() << " [deg], Long = " << this->get_longitude()
<< " [deg], Height= " << this->get_height() << " [m]" << " RX time offset= " << this->get_time_offset_s() << " [s]"; << " [deg], Height= " << this->get_height() << " [m]"
<< " RX time offset= " << this->get_time_offset_s() << " [s]";
// ###### Compute DOPs ######## // ###### Compute DOPs ########
hybrid_ls_pvt::compute_DOP(); hybrid_ls_pvt::compute_DOP();

View File

@ -54,6 +54,7 @@ private:
std::ofstream d_dump_file; std::ofstream d_dump_file;
int d_nchannels; // Number of available channels for positioning int d_nchannels; // Number of available channels for positioning
double d_galileo_current_time; double d_galileo_current_time;
public: public:
hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file); hybrid_ls_pvt(int nchannels, std::string dump_filename, bool flag_dump_to_file);
~hybrid_ls_pvt(); ~hybrid_ls_pvt();

View File

@ -124,7 +124,6 @@ bool Kml_Printer::set_headers(std::string filename, bool time_tag_name)
} }
bool Kml_Printer::print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values) bool Kml_Printer::print_position(const std::shared_ptr<Pvt_Solution>& position, bool print_average_values)
{ {
double latitude; double latitude;
@ -164,7 +163,6 @@ bool Kml_Printer::close_file()
{ {
if (kml_file.is_open()) if (kml_file.is_open())
{ {
kml_file << "</coordinates>" << std::endl kml_file << "</coordinates>" << std::endl
<< "</LineString>" << std::endl << "</LineString>" << std::endl
<< "</Placemark>" << std::endl << "</Placemark>" << std::endl
@ -180,14 +178,12 @@ bool Kml_Printer::close_file()
} }
Kml_Printer::Kml_Printer() Kml_Printer::Kml_Printer()
{ {
positions_printed = false; positions_printed = false;
} }
Kml_Printer::~Kml_Printer() Kml_Printer::~Kml_Printer()
{ {
close_file(); close_file();
@ -196,4 +192,3 @@ Kml_Printer::~Kml_Printer ()
if (remove(kml_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary KML file"; if (remove(kml_filename.c_str()) != 0) LOG(INFO) << "Error deleting temporary KML file";
} }
} }

View File

@ -50,6 +50,7 @@ private:
std::ofstream kml_file; std::ofstream kml_file;
bool positions_printed; bool positions_printed;
std::string kml_filename; std::string kml_filename;
public: public:
Kml_Printer(); Kml_Printer();
~Kml_Printer(); ~Kml_Printer();

View File

@ -41,7 +41,6 @@ using google::LogMessage;
Ls_Pvt::Ls_Pvt() : Pvt_Solution() Ls_Pvt::Ls_Pvt() : Pvt_Solution()
{ {
} }
arma::vec Ls_Pvt::bancroftPos(const arma::mat& satpos, const arma::vec& obs) arma::vec Ls_Pvt::bancroftPos(const arma::mat& satpos, const arma::vec& obs)
@ -222,8 +221,10 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat & satpos, const arma::vec & obs
{ {
//--- Update equations ----------------------------------------- //--- Update equations -----------------------------------------
rho2 = (X(0, i) - pos(0)) * rho2 = (X(0, i) - pos(0)) *
(X(0, i) - pos(0)) + (X(1, i) - pos(1)) * (X(0, i) - pos(0)) +
(X(1, i) - pos(1)) + (X(2, i) - pos(2)) * (X(1, i) - pos(1)) *
(X(1, i) - pos(1)) +
(X(2, i) - pos(2)) *
(X(2, i) - pos(2)); (X(2, i) - pos(2));
traveltime = sqrt(rho2) / GPS_C_m_s; traveltime = sqrt(rho2) / GPS_C_m_s;
@ -290,5 +291,3 @@ arma::vec Ls_Pvt::leastSquarePos(const arma::mat & satpos, const arma::vec & obs
} }
return pos; return pos;
} }

View File

@ -46,6 +46,7 @@ private:
* \brief Computes the Lorentz inner product between two vectors * \brief Computes the Lorentz inner product between two vectors
*/ */
double lorentz(const arma::vec& x, const arma::vec& y); double lorentz(const arma::vec& x, const arma::vec& y);
public: public:
Ls_Pvt(); Ls_Pvt();
@ -58,7 +59,6 @@ public:
* \brief Computes the Weighted Least Squares position solution * \brief Computes the Weighted Least Squares position solution
*/ */
arma::vec leastSquarePos(const arma::mat& satpos, const arma::vec& obs, const arma::vec& w_vec); arma::vec leastSquarePos(const arma::mat& satpos, const arma::vec& obs, const arma::vec& w_vec);
}; };
#endif #endif

View File

@ -161,7 +161,8 @@ bool Nmea_Printer::Print_Nmea_Line(const std::shared_ptr<Pvt_Solution>& pvt_data
} }
catch (const std::exception& ex) catch (const std::exception& ex)
{ {
DLOG(INFO) << "NMEA printer can not write on output file" << nmea_filename.c_str();; DLOG(INFO) << "NMEA printer can not write on output file" << nmea_filename.c_str();
;
} }
//write to serial device //write to serial device
@ -708,4 +709,3 @@ std::string Nmea_Printer::get_GPGGA()
return sentence_str.str(); return sentence_str.str();
//$GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A //$GPGGA,104427.591,5920.7009,N,01803.2938,E,1,05,3.3,78.2,M,23.2,M,0.0,0000*4A
} }

View File

@ -299,7 +299,10 @@ int Pvt_Solution::tropo(double *ddr_m, double sinel, double hsta_km, double p_mb
double tkelp = tksea + tlapse * hp_km; double tkelp = tksea + tlapse * hp_km;
double psea = p_mb * pow((tksea / tkelp), em); double psea = p_mb * pow((tksea / tkelp), em);
if(sinel < 0) { sinel = 0.0; } if (sinel < 0)
{
sinel = 0.0;
}
double tropo_delay = 0.0; double tropo_delay = 0.0;
bool done = false; bool done = false;
@ -317,7 +320,10 @@ int Pvt_Solution::tropo(double *ddr_m, double sinel, double hsta_km, double p_mb
rtop = pow((a_e + htop), 2) - pow((a_e + hsta_km), 2) * (1 - pow(sinel, 2)); rtop = pow((a_e + htop), 2) - pow((a_e + hsta_km), 2) * (1 - pow(sinel, 2));
// check to see if geometry is crazy // check to see if geometry is crazy
if(rtop < 0) { rtop = 0; } if (rtop < 0)
{
rtop = 0;
}
rtop = sqrt(rtop) - (a_e + hsta_km) * sinel; rtop = sqrt(rtop) - (a_e + hsta_km) * sinel;
@ -330,7 +336,6 @@ int Pvt_Solution::tropo(double *ddr_m, double sinel, double hsta_km, double p_mb
for (int i = 0; i < 8; i++) for (int i = 0; i < 8; i++)
{ {
rn(i) = pow(rtop, (i + 1 + 1)); rn(i) = pow(rtop, (i + 1 + 1));
} }
arma::rowvec alpha = {2 * a, 2 * pow(a, 2) + 4 * b / 3, a * (pow(a, 2) + 3 * b), arma::rowvec alpha = {2 * a, 2 * pow(a, 2) + 4 * b / 3, a * (pow(a, 2) + 3 * b),
@ -440,7 +445,6 @@ int Pvt_Solution::topocent(double *Az, double *El, double *D, const arma::vec &
} }
int Pvt_Solution::compute_DOP() int Pvt_Solution::compute_DOP()
{ {
// ###### Compute DOPs ######## // ###### Compute DOPs ########

View File

@ -479,7 +479,9 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Glonass_Gnav_Utc_M
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
std::string line; std::string line;
stringVersion = "3.02"; stringVersion = "3.02";
version = 3; version = 3;
@ -601,7 +603,9 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_Iono& gps_iono
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
std::string line; std::string line;
stringVersion = "3.02"; stringVersion = "3.02";
version = 3; version = 3;
@ -723,9 +727,13 @@ void Rinex_Printer::rinex_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps
void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::rinex_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
//Avoid compiler warning, there is not time system correction between Galileo and GLONASS //Avoid compiler warning, there is not time system correction between Galileo and GLONASS
if(galileo_almanac.A_0G_10){} if (galileo_almanac.A_0G_10)
{
}
std::string line; std::string line;
// -------- Line 1 // -------- Line 1
@ -1471,7 +1479,9 @@ void Rinex_Printer::rinex_sbs_header(std::fstream& out)
void Rinex_Printer::update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
std::vector<std::string> data; std::vector<std::string> data;
std::string line_aux; std::string line_aux;
@ -1521,7 +1531,6 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Glonass_Gnav_Utc_
{ {
data.push_back(line_str); data.push_back(line_str);
} }
} }
else else
{ {
@ -1617,7 +1626,6 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& gal
{ {
data.push_back(line_str); data.push_back(line_str);
} }
} }
else else
{ {
@ -2017,7 +2025,9 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion
void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_iono, const Gps_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
std::vector<std::string> data; std::vector<std::string> data;
std::string line_aux; std::string line_aux;
@ -2100,7 +2110,6 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion
{ {
data.push_back(line_str); data.push_back(line_str);
} }
} }
else else
{ {
@ -2124,7 +2133,9 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_Iono& gps_ion
void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gps_iono, const Gps_CNAV_Utc_Model& gps_utc_model, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
std::vector<std::string> data; std::vector<std::string> data;
std::string line_aux; std::string line_aux;
@ -2230,9 +2241,13 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Gps_CNAV_Iono& gp
void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac) void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& galileo_iono, const Galileo_Utc_Model& galileo_utc_model, const Galileo_Almanac& galileo_almanac, const Glonass_Gnav_Utc_Model& glonass_gnav_utc_model, const Glonass_Gnav_Almanac& glonass_gnav_almanac)
{ {
if(glonass_gnav_almanac.i_satellite_freq_channel){} //Avoid compiler warning if (glonass_gnav_almanac.i_satellite_freq_channel)
{
} //Avoid compiler warning
//Avoid compiler warning, there is not time system correction between Galileo and GLONASS //Avoid compiler warning, there is not time system correction between Galileo and GLONASS
if(galileo_almanac.A_0G_10){} if (galileo_almanac.A_0G_10)
{
}
std::vector<std::string> data; std::vector<std::string> data;
std::string line_aux; std::string line_aux;
@ -2305,7 +2320,6 @@ void Rinex_Printer::update_nav_header(std::fstream& out, const Galileo_Iono& gal
{ {
data.push_back(line_str); data.push_back(line_str);
} }
} }
else else
{ {
@ -2947,9 +2961,7 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int, Galileo
if (E1B_DVS == "1") LOG(WARNING) << "Navigation data without guarantee"; if (E1B_DVS == "1") LOG(WARNING) << "Navigation data without guarantee";
E1B_DVS = "0"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID E1B_DVS = "0"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID
std::string SVhealth_str = E5B_HS + boost::lexical_cast<std::string>(galileo_ephemeris_iter->second.E5b_DVS_5) std::string SVhealth_str = E5B_HS + boost::lexical_cast<std::string>(galileo_ephemeris_iter->second.E5b_DVS_5) + "11" + "1" + E1B_DVS + E1B_HS + boost::lexical_cast<std::string>(galileo_ephemeris_iter->second.E1B_DVS_5);
+ "11" + "1" + E1B_DVS + E1B_HS
+ boost::lexical_cast<std::string>(galileo_ephemeris_iter->second.E1B_DVS_5);
SVhealth_str = "000000000"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID SVhealth_str = "000000000"; // *************** CHANGE THIS WHEN GALILEO SIGNAL IS VALID
int SVhealth = Rinex_Printer::toInt(SVhealth_str, 9); int SVhealth = Rinex_Printer::toInt(SVhealth_str, 9);
line += Rinex_Printer::doub2for(static_cast<double>(SVhealth), 18, 2); line += Rinex_Printer::doub2for(static_cast<double>(SVhealth), 18, 2);
@ -3208,7 +3220,9 @@ void Rinex_Printer::log_rinex_nav(std::fstream& out, const std::map<int, Galileo
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string glonass_bands) void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephemeris& eph, const double d_TOW_first_observation, const std::string glonass_bands)
{ {
if(eph.d_m){} //Avoid compiler warning if (eph.d_m)
{
} //Avoid compiler warning
std::string line; std::string line;
std::map<int, Glonass_Gnav_Ephemeris>::const_iterator glonass_gnav_ephemeris_iter; std::map<int, Glonass_Gnav_Ephemeris>::const_iterator glonass_gnav_ephemeris_iter;
@ -3536,7 +3550,9 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Glonass_Gnav_Ephem
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string glonass_bands) void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string glonass_bands)
{ {
if(glonass_gnav_eph.d_m){} // avoid warning, not needed if (glonass_gnav_eph.d_m)
{
} // avoid warning, not needed
std::string line; std::string line;
// -------- Line 1 // -------- Line 1
@ -3887,7 +3903,9 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string glonass_bands) void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string glonass_bands)
{ {
if(glonass_gnav_eph.d_m){} // avoid warning, not needed if (glonass_gnav_eph.d_m)
{
} // avoid warning, not needed
std::string line; std::string line;
// -------- Line 1 // -------- Line 1
@ -4203,7 +4221,9 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_CNAV_Ephemeris
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string galileo_bands, const std::string glonass_bands) void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, const double d_TOW_first_observation, const std::string galileo_bands, const std::string glonass_bands)
{ {
if(glonass_gnav_eph.d_m){} // avoid warning, not needed if (glonass_gnav_eph.d_m)
{
} // avoid warning, not needed
std::string line; std::string line;
version = 3; version = 3;
@ -4988,7 +5008,9 @@ void Rinex_Printer::rinex_obs_header(std::fstream & out, const Gps_CNAV_Ephemeri
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation) void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, const double d_TOW_first_observation)
{ {
if(eph_cnav.d_i_0){} // avoid warning, not needed if (eph_cnav.d_i_0)
{
} // avoid warning, not needed
std::string line; std::string line;
// -------- Line 1 // -------- Line 1
@ -5475,7 +5497,9 @@ void Rinex_Printer::rinex_obs_header(std::fstream& out, const Galileo_Ephemeris&
void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string galileo_bands) void Rinex_Printer::rinex_obs_header(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, const double d_TOW_first_observation, const std::string galileo_bands)
{ {
if(galileo_eph.e_1){} // avoid warning, not needed if (galileo_eph.e_1)
{
} // avoid warning, not needed
std::string line; std::string line;
version = 3; version = 3;
@ -5891,7 +5915,6 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Gps_CNAV_Utc_Mode
{ {
data.push_back(line_str); data.push_back(line_str);
} }
} }
else else
{ {
@ -5951,7 +5974,6 @@ void Rinex_Printer::update_obs_header(std::fstream& out, const Galileo_Utc_Model
{ {
data.push_back(line_str); data.push_back(line_str);
} }
} }
else else
{ {
@ -5978,7 +6000,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
std::string line; std::string line;
// Avoid compiler warning // Avoid compiler warning
if(glonass_band.size()){} if (glonass_band.size())
{
}
boost::posix_time::ptime p_glonass_time = Rinex_Printer::compute_UTC_time(eph, obs_time); boost::posix_time::ptime p_glonass_time = Rinex_Printer::compute_UTC_time(eph, obs_time);
std::string timestring = boost::posix_time::to_iso_string(p_glonass_time); std::string timestring = boost::posix_time::to_iso_string(p_glonass_time);
@ -6218,7 +6242,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Glonass_Gnav_Ephemeri
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int, Gnss_Synchro>& observables) void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int, Gnss_Synchro>& observables)
{ {
if(glonass_gnav_eph.d_m){} // avoid warning, not needed if (glonass_gnav_eph.d_m)
{
} // avoid warning, not needed
std::string line; std::string line;
// -------- EPOCH record // -------- EPOCH record
@ -6534,7 +6560,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int, Gnss_Synchro>& observables) void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& gps_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double gps_obs_time, const std::map<int, Gnss_Synchro>& observables)
{ {
if(glonass_gnav_eph.d_m){} // avoid warning, not needed if (glonass_gnav_eph.d_m)
{
} // avoid warning, not needed
std::string line; std::string line;
// -------- EPOCH record // -------- EPOCH record
@ -6772,7 +6800,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_CNAV_Ephemeris& g
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double galileo_obs_time, const std::map<int, Gnss_Synchro>& observables) void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& galileo_eph, const Glonass_Gnav_Ephemeris& glonass_gnav_eph, double galileo_obs_time, const std::map<int, Gnss_Synchro>& observables)
{ {
if(glonass_gnav_eph.d_m){} // avoid warning, not needed if (glonass_gnav_eph.d_m)
{
} // avoid warning, not needed
std::string line; std::string line;
boost::posix_time::ptime p_galileo_time = Rinex_Printer::compute_Galileo_time(galileo_eph, galileo_obs_time); boost::posix_time::ptime p_galileo_time = Rinex_Printer::compute_Galileo_time(galileo_eph, galileo_obs_time);
@ -7367,7 +7397,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream & out, const Gps_CNAV_Ephemeris &
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int, Gnss_Synchro>& observables) void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& eph, const Gps_CNAV_Ephemeris& eph_cnav, double obs_time, const std::map<int, Gnss_Synchro>& observables)
{ {
if(eph_cnav.d_i_0){} // avoid warning, not needed if (eph_cnav.d_i_0)
{
} // avoid warning, not needed
// RINEX observations timestamps are GPS timestamps. // RINEX observations timestamps are GPS timestamps.
std::string line; std::string line;
@ -7799,7 +7831,9 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Galileo_Ephemeris& ep
void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int, Gnss_Synchro>& observables) void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_eph, const Galileo_Ephemeris& galileo_eph, double gps_obs_time, const std::map<int, Gnss_Synchro>& observables)
{ {
if(galileo_eph.e_1){} // avoid warning, not needed if (galileo_eph.e_1)
{
} // avoid warning, not needed
std::string line; std::string line;
boost::posix_time::ptime p_gps_time = Rinex_Printer::compute_GPS_time(gps_eph, gps_obs_time); boost::posix_time::ptime p_gps_time = Rinex_Printer::compute_GPS_time(gps_eph, gps_obs_time);
@ -8049,7 +8083,6 @@ void Rinex_Printer::log_rinex_obs(std::fstream& out, const Gps_Ephemeris& gps_ep
} }
void Rinex_Printer::to_date_time(int gps_week, int gps_tow, int& year, int& month, int& day, int& hour, int& minute, int& second) void Rinex_Printer::to_date_time(int gps_week, int gps_tow, int& year, int& month, int& day, int& hour, int& minute, int& second)
{ {
// represents GPS time (week, TOW) in the date time format of the Gregorian calendar. // represents GPS time (week, TOW) in the date time format of the Gregorian calendar.

View File

@ -421,7 +421,8 @@ private:
const std::string::size_type length, const std::string::size_type length,
const char pad = ' ') const char pad = ' ')
{ {
std::string t(s); return leftJustify(t, length, pad); std::string t(s);
return leftJustify(t, length, pad);
} }
@ -445,7 +446,8 @@ private:
const std::string::size_type length, const std::string::size_type length,
const char pad = ' ') const char pad = ' ')
{ {
std::string t(s); return rightJustify(t, length, pad); std::string t(s);
return rightJustify(t, length, pad);
} }
@ -555,13 +557,13 @@ private:
* @param x object to turn into a string. * @param x object to turn into a string.
* @return string representation of \a x. * @return string representation of \a x.
*/ */
template <class X> inline std::string asString(const X x); template <class X>
inline std::string asString(const X x);
inline std::string asFixWidthString(const int x, const int width, char fill_digit); inline std::string asFixWidthString(const int x, const int width, char fill_digit);
}; };
// Implementation of inline functions (modified versions from GPSTk http://www.gpstk.org) // Implementation of inline functions (modified versions from GPSTk http://www.gpstk.org)
inline std::string& Rinex_Printer::leftJustify(std::string& s, inline std::string& Rinex_Printer::leftJustify(std::string& s,
@ -598,7 +600,6 @@ inline std::string & Rinex_Printer::rightJustify(std::string & s,
} }
inline std::string Rinex_Printer::doub2for(const double& d, inline std::string Rinex_Printer::doub2for(const double& d,
const std::string::size_type length, const std::string::size_type length,
const std::string::size_type expLen, const std::string::size_type expLen,
@ -736,7 +737,6 @@ inline std::string & Rinex_Printer::sci2for(std::string & aStr,
} // end sci2for } // end sci2for
inline std::string asString(const long double x, const std::string::size_type precision) inline std::string asString(const long double x, const std::string::size_type precision)
{ {
std::ostringstream ss; std::ostringstream ss;
@ -780,7 +780,8 @@ inline int Rinex_Printer::toInt(std::string bitString, int sLength)
} }
template<class X> inline std::string Rinex_Printer::asString(const X x) template <class X>
inline std::string Rinex_Printer::asString(const X x)
{ {
std::ostringstream ss; std::ostringstream ss;
ss << x; ss << x;

View File

@ -351,7 +351,6 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
{ {
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN; DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
} }
} }
// GLONASS GNAV L2 // GLONASS GNAV L2
if (sig_.compare("2G") == 0) if (sig_.compare("2G") == 0)
@ -391,8 +390,6 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
{ {
DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN; DLOG(INFO) << "No ephemeris data for SV " << gnss_observables_iter->second.PRN;
} }
} }
break; break;
} }
@ -456,7 +453,8 @@ bool rtklib_solver::get_PVT(const std::map<int,Gnss_Synchro> & gnss_observables_
DLOG(INFO) << "RTKLIB Position at " << boost::posix_time::to_simple_string(p_time) DLOG(INFO) << "RTKLIB Position at " << boost::posix_time::to_simple_string(p_time)
<< " is Lat = " << this->get_latitude() << " [deg], Long = " << this->get_longitude() << " is Lat = " << this->get_latitude() << " [deg], Long = " << this->get_longitude()
<< " [deg], Height= " << this->get_height() << " [m]" << " RX time offset= " << this->get_time_offset_s() << " [s]"; << " [deg], Height= " << this->get_height() << " [m]"
<< " RX time offset= " << this->get_time_offset_s() << " [s]";
// ######## LOG FILE ######### // ######## LOG FILE #########
if (d_flag_dump_enabled == true) if (d_flag_dump_enabled == true)

View File

@ -42,8 +42,7 @@ using google::LogMessage;
GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition( GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -77,9 +76,7 @@ GalileoE1Pcps8msAmbiguousAcquisition::GalileoE1Pcps8msAmbiguousAcquisition(
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = round( code_length_ = round(
fs_in_ fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
/ (Galileo_E1_CODE_CHIP_RATE_HZ
/ Galileo_E1_B_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4); vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
@ -209,8 +206,7 @@ void GalileoE1Pcps8msAmbiguousAcquisition::set_local_code()
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
bool cboc = configuration_->property( bool cboc = configuration_->property(
"Acquisition" + boost::lexical_cast<std::string>(channel_) "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false);
+ ".cboc", false);
std::complex<float>* code = new std::complex<float>[code_length_]; std::complex<float>* code = new std::complex<float>[code_length_];
@ -287,4 +283,3 @@ gr::basic_block_sptr GalileoE1Pcps8msAmbiguousAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -43,8 +43,7 @@ using google::LogMessage;
GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition( GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -95,7 +94,10 @@ GalileoE1PcpsAmbiguousAcquisition::GalileoE1PcpsAmbiguousAcquisition(
{ {
item_size_ = sizeof(lv_16sc_t); item_size_ = sizeof(lv_16sc_t);
} }
else { item_size_ = sizeof(gr_complex); } else
{
item_size_ = sizeof(gr_complex);
}
acquisition_ = pcps_make_acquisition(sampled_ms_, max_dwells_, acquisition_ = pcps_make_acquisition(sampled_ms_, max_dwells_,
doppler_max_, if_, fs_in_, samples_per_ms, code_length_, doppler_max_, if_, fs_in_, samples_per_ms, code_length_,
bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_, bit_transition_flag_, use_CFAR_algorithm_flag_, dump_, blocking_,
@ -192,8 +194,7 @@ void GalileoE1PcpsAmbiguousAcquisition::init()
void GalileoE1PcpsAmbiguousAcquisition::set_local_code() void GalileoE1PcpsAmbiguousAcquisition::set_local_code()
{ {
bool cboc = configuration_->property( bool cboc = configuration_->property(
"Acquisition" + boost::lexical_cast<std::string>(channel_) "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false);
+ ".cboc", false);
std::complex<float>* code = new std::complex<float>[code_length_]; std::complex<float>* code = new std::complex<float>[code_length_];
@ -330,4 +331,3 @@ gr::basic_block_sptr GalileoE1PcpsAmbiguousAcquisition::get_right_block()
{ {
return acquisition_; return acquisition_;
} }

View File

@ -42,8 +42,7 @@ using google::LogMessage;
GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition( GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -77,9 +76,7 @@ GalileoE1PcpsCccwsrAmbiguousAcquisition::GalileoE1PcpsCccwsrAmbiguousAcquisition
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = round( code_length_ = round(
fs_in_ fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
/ (Galileo_E1_CODE_CHIP_RATE_HZ
/ Galileo_E1_B_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4); vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
@ -212,8 +209,7 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_local_code()
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
bool cboc = configuration_->property( bool cboc = configuration_->property(
"Acquisition" + boost::lexical_cast<std::string>(channel_) "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false);
+ ".cboc", false);
char signal[3]; char signal[3];
@ -246,10 +242,11 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::set_state(int state)
} }
float GalileoE1PcpsCccwsrAmbiguousAcquisition::calculate_threshold(float pfa) float GalileoE1PcpsCccwsrAmbiguousAcquisition::calculate_threshold(float pfa)
{ {
if(pfa){ /* Not implemented*/}; if (pfa)
{ /* Not implemented*/
};
return 0.0; return 0.0;
} }
@ -260,7 +257,6 @@ void GalileoE1PcpsCccwsrAmbiguousAcquisition::connect(gr::top_block_sptr top_blo
{ {
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
} }
} }
@ -283,4 +279,3 @@ gr::basic_block_sptr GalileoE1PcpsCccwsrAmbiguousAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -42,8 +42,7 @@ using google::LogMessage;
GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition( GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -64,9 +63,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
/*--- Find number of samples per spreading code (4 ms) -----------------*/ /*--- Find number of samples per spreading code (4 ms) -----------------*/
code_length_ = round( code_length_ = round(
fs_in_ fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
/ (Galileo_E1_CODE_CHIP_RATE_HZ
/ Galileo_E1_B_CODE_LENGTH_CHIPS));
int samples_per_ms = round(code_length_ / 4.0); int samples_per_ms = round(code_length_ / 4.0);
@ -96,7 +93,6 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::GalileoE1PcpsQuickSyncAmbiguousAcqui
LOG(WARNING) << "coherent_integration_time should be multiple of " LOG(WARNING) << "coherent_integration_time should be multiple of "
<< "Galileo code length (4 ms). coherent_integration_time = " << "Galileo code length (4 ms). coherent_integration_time = "
<< sampled_ms_ << " ms will be used."; << sampled_ms_ << " ms will be used.";
} }
// vector_length_ = (sampled_ms_/folding_factor_) * code_length_; // vector_length_ = (sampled_ms_/folding_factor_) * code_length_;
vector_length_ = sampled_ms_ * samples_per_ms; vector_length_ = sampled_ms_ * samples_per_ms;
@ -153,8 +149,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::~GalileoE1PcpsQuickSyncAmbiguousAcqu
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel)
GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel)
{ {
channel_ = channel; channel_ = channel;
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
@ -164,10 +159,8 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_channel(unsigned int channel)
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold)
GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
@ -190,8 +183,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_threshold(float threshold)
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int doppler_max)
{ {
doppler_max_ = doppler_max; doppler_max_ = doppler_max;
@ -202,8 +194,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_max(unsigned int doppler
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step)
GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_step(unsigned int doppler_step)
{ {
doppler_step_ = doppler_step; doppler_step_ = doppler_step;
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
@ -212,8 +203,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_doppler_step(unsigned int dopple
} }
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_gnss_synchro(
GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_gnss_synchro(
Gnss_Synchro* gnss_synchro) Gnss_Synchro* gnss_synchro)
{ {
gnss_synchro_ = gnss_synchro; gnss_synchro_ = gnss_synchro;
@ -238,22 +228,19 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::mag()
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::init()
GalileoE1PcpsQuickSyncAmbiguousAcquisition::init()
{ {
acquisition_cc_->init(); acquisition_cc_->init();
//set_local_code(); //set_local_code();
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code()
GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code()
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
bool cboc = configuration_->property( bool cboc = configuration_->property(
"Acquisition" + boost::lexical_cast<std::string>(channel_) "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false);
+ ".cboc", false);
std::complex<float>* code = new std::complex<float>[code_length_]; std::complex<float>* code = new std::complex<float>[code_length_];
@ -276,8 +263,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_local_code()
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset()
GalileoE1PcpsQuickSyncAmbiguousAcquisition::reset()
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
@ -294,7 +280,6 @@ void GalileoE1PcpsQuickSyncAmbiguousAcquisition::set_state(int state)
} }
float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa) float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa)
{ {
unsigned int frequency_bins = 0; unsigned int frequency_bins = 0;
@ -316,8 +301,7 @@ float GalileoE1PcpsQuickSyncAmbiguousAcquisition::calculate_threshold(float pfa)
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_block)
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
@ -326,8 +310,7 @@ GalileoE1PcpsQuickSyncAmbiguousAcquisition::connect(gr::top_block_sptr top_block
} }
void void GalileoE1PcpsQuickSyncAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
GalileoE1PcpsQuickSyncAmbiguousAcquisition::disconnect(gr::top_block_sptr top_block)
{ {
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
@ -346,4 +329,3 @@ gr::basic_block_sptr GalileoE1PcpsQuickSyncAmbiguousAcquisition::get_right_block
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -42,8 +42,7 @@ using google::LogMessage;
GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition( GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -80,9 +79,7 @@ GalileoE1PcpsTongAmbiguousAcquisition::GalileoE1PcpsTongAmbiguousAcquisition(
//--- Find number of samples per spreading code (4 ms) ----------------- //--- Find number of samples per spreading code (4 ms) -----------------
code_length_ = round( code_length_ = round(
fs_in_ fs_in_ / (Galileo_E1_CODE_CHIP_RATE_HZ / Galileo_E1_B_CODE_LENGTH_CHIPS));
/ (Galileo_E1_CODE_CHIP_RATE_HZ
/ Galileo_E1_B_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4); vector_length_ = code_length_ * static_cast<int>(sampled_ms_ / 4);
@ -134,7 +131,6 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_channel(unsigned int channel)
void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold) void GalileoE1PcpsTongAmbiguousAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
@ -175,7 +171,6 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_doppler_step(unsigned int dopple
{ {
acquisition_cc_->set_doppler_step(doppler_step_); acquisition_cc_->set_doppler_step(doppler_step_);
} }
} }
@ -215,8 +210,7 @@ void GalileoE1PcpsTongAmbiguousAcquisition::set_local_code()
if (item_type_.compare("gr_complex") == 0) if (item_type_.compare("gr_complex") == 0)
{ {
bool cboc = configuration_->property( bool cboc = configuration_->property(
"Acquisition" + boost::lexical_cast<std::string>(channel_) "Acquisition" + boost::lexical_cast<std::string>(channel_) + ".cboc", false);
+ ".cboc", false);
std::complex<float>* code = new std::complex<float>[code_length_]; std::complex<float>* code = new std::complex<float>[code_length_];
@ -299,4 +293,3 @@ gr::basic_block_sptr GalileoE1PcpsTongAmbiguousAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -48,8 +48,7 @@ using google::LogMessage;
GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf( GalileoE5aNoncoherentIQAcquisitionCaf::GalileoE5aNoncoherentIQAcquisitionCaf(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -138,7 +137,6 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_channel(unsigned int channel)
void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold) void GalileoE5aNoncoherentIQAcquisitionCaf::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0); if (pfa == 0.0) pfa = configuration_->property(role_ + ".pfa", 0.0);
@ -266,9 +264,7 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_local_code()
acquisition_cc_->set_local_code(codeI_, codeQ_); acquisition_cc_->set_local_code(codeI_, codeQ_);
delete[] codeI; delete[] codeI;
delete[] codeQ; delete[] codeQ;
} }
} }
@ -309,14 +305,18 @@ void GalileoE5aNoncoherentIQAcquisitionCaf::set_state(int state)
void GalileoE5aNoncoherentIQAcquisitionCaf::connect(gr::top_block_sptr top_block) void GalileoE5aNoncoherentIQAcquisitionCaf::connect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
// Nothing to connect internally // Nothing to connect internally
} }
void GalileoE5aNoncoherentIQAcquisitionCaf::disconnect(gr::top_block_sptr top_block) void GalileoE5aNoncoherentIQAcquisitionCaf::disconnect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
// Nothing to disconnect internally // Nothing to disconnect internally
} }

View File

@ -42,8 +42,7 @@
using google::LogMessage; using google::LogMessage;
GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration, GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* configuration,
std::string role, unsigned int in_streams, unsigned int out_streams) : std::string role, unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -57,7 +56,10 @@ GalileoE5aPcpsAcquisition::GalileoE5aPcpsAcquisition(ConfigurationInterface* con
fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated); fs_in_ = configuration_->property("GNSS-SDR.internal_fs_sps", fs_in_deprecated);
acq_pilot_ = configuration_->property(role + ".acquire_pilot", false); acq_pilot_ = configuration_->property(role + ".acquire_pilot", false);
acq_iq_ = configuration_->property(role + ".acquire_iq", false); acq_iq_ = configuration_->property(role + ".acquire_iq", false);
if(acq_iq_) { acq_pilot_ = false; } if (acq_iq_)
{
acq_pilot_ = false;
}
dump_ = configuration_->property(role + ".dump", false); dump_ = configuration_->property(role + ".dump", false);
doppler_max_ = configuration_->property(role + ".doppler_max", 5000); doppler_max_ = configuration_->property(role + ".doppler_max", 5000);
if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max; if (FLAGS_doppler_max != 0) doppler_max_ = FLAGS_doppler_max;
@ -115,14 +117,22 @@ void GalileoE5aPcpsAcquisition::set_channel(unsigned int channel)
void GalileoE5aPcpsAcquisition::set_threshold(float threshold) void GalileoE5aPcpsAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); float pfa = configuration_->property(role_ + boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0);
if(pfa == 0.0) { pfa = configuration_->property(role_ + ".pfa", 0.0); } if (pfa == 0.0)
{
pfa = configuration_->property(role_ + ".pfa", 0.0);
}
if(pfa == 0.0) { threshold_ = threshold; } if (pfa == 0.0)
{
threshold_ = threshold;
}
else { threshold_ = calculate_threshold(pfa); } else
{
threshold_ = calculate_threshold(pfa);
}
DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_; DLOG(INFO) << "Channel " << channel_ << " Threshold = " << threshold_;
@ -168,9 +178,18 @@ void GalileoE5aPcpsAcquisition::set_local_code()
gr_complex* code = new gr_complex[code_length_]; gr_complex* code = new gr_complex[code_length_];
char signal_[3]; char signal_[3];
if(acq_iq_) { strcpy(signal_, "5X"); } if (acq_iq_)
else if(acq_pilot_) { strcpy(signal_, "5Q"); } {
else { strcpy(signal_, "5I"); } strcpy(signal_, "5X");
}
else if (acq_pilot_)
{
strcpy(signal_, "5Q");
}
else
{
strcpy(signal_, "5I");
}
galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, fs_in_, 0); galileo_e5_a_code_gen_complex_sampled(code, signal_, gnss_synchro_->PRN, fs_in_, 0);

View File

@ -124,7 +124,6 @@ public:
void set_state(int state); void set_state(int state);
private: private:
float calculate_threshold(float pfa); float calculate_threshold(float pfa);
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
@ -167,6 +166,5 @@ private:
gr_complex* code_; gr_complex* code_;
Gnss_Synchro* gnss_synchro_; Gnss_Synchro* gnss_synchro_;
}; };
#endif /* GALILEO_E5A_PCPS_ACQUISITION_H_ */ #endif /* GALILEO_E5A_PCPS_ACQUISITION_H_ */

View File

@ -44,8 +44,7 @@ using google::LogMessage;
GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition( GlonassL1CaPcpsAcquisition::GlonassL1CaPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";

View File

@ -42,13 +42,11 @@
#include <glog/logging.h> #include <glog/logging.h>
using google::LogMessage; using google::LogMessage;
GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition( GpsL1CaPcpsAcquisition::GpsL1CaPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -212,7 +210,6 @@ void GpsL1CaPcpsAcquisition::set_state(int state)
} }
float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa) float GpsL1CaPcpsAcquisition::calculate_threshold(float pfa)
{ {
//Calculate the threshold //Calculate the threshold
@ -309,4 +306,3 @@ gr::basic_block_sptr GpsL1CaPcpsAcquisition::get_right_block()
{ {
return acquisition_; return acquisition_;
} }

View File

@ -43,8 +43,7 @@ using google::LogMessage;
GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler( GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./data/acquisition.dat"; std::string default_dump_filename = "./data/acquisition.dat";
@ -64,8 +63,7 @@ GpsL1CaPcpsAcquisitionFineDoppler::GpsL1CaPcpsAcquisitionFineDoppler(
max_dwells_ = configuration->property(role + ".max_dwells", 1); max_dwells_ = configuration->property(role + ".max_dwells", 1);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
vector_length_ = round(fs_in_ vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
/ (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
code_ = new gr_complex[vector_length_]; code_ = new gr_complex[vector_length_];
@ -158,14 +156,18 @@ void GpsL1CaPcpsAcquisitionFineDoppler::reset()
void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr<gr::top_block> top_block) void GpsL1CaPcpsAcquisitionFineDoppler::connect(boost::shared_ptr<gr::top_block> top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
//nothing to disconnect, now the tracking uses gr_sync_decimator //nothing to disconnect, now the tracking uses gr_sync_decimator
} }
void GpsL1CaPcpsAcquisitionFineDoppler::disconnect(boost::shared_ptr<gr::top_block> top_block) void GpsL1CaPcpsAcquisitionFineDoppler::disconnect(boost::shared_ptr<gr::top_block> top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
//nothing to disconnect, now the tracking uses gr_sync_decimator //nothing to disconnect, now the tracking uses gr_sync_decimator
} }
@ -180,4 +182,3 @@ boost::shared_ptr<gr::basic_block> GpsL1CaPcpsAcquisitionFineDoppler::get_right_
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -40,7 +40,6 @@
#include "pcps_acquisition_fine_doppler_cc.h" #include "pcps_acquisition_fine_doppler_cc.h"
class ConfigurationInterface; class ConfigurationInterface;
/*! /*!

View File

@ -43,8 +43,7 @@ using google::LogMessage;
GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga( GpsL1CaPcpsAcquisitionFpga::GpsL1CaPcpsAcquisitionFpga(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
unsigned int code_length; unsigned int code_length;
bool bit_transition_flag; bool bit_transition_flag;

View File

@ -44,8 +44,7 @@ using google::LogMessage;
GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition( GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_filename = "./data/acquisition.dat"; std::string default_dump_filename = "./data/acquisition.dat";
@ -65,8 +64,7 @@ GpsL1CaPcpsAssistedAcquisition::GpsL1CaPcpsAssistedAcquisition(
dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration->property(role + ".dump_filename", default_dump_filename);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
vector_length_ = round(fs_in_ vector_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
/ (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
code_ = new gr_complex[vector_length_]; code_ = new gr_complex[vector_length_];
@ -157,14 +155,18 @@ void GpsL1CaPcpsAssistedAcquisition::reset()
void GpsL1CaPcpsAssistedAcquisition::connect(gr::top_block_sptr top_block) void GpsL1CaPcpsAssistedAcquisition::connect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
//nothing to disconnect, now the tracking uses gr_sync_decimator //nothing to disconnect, now the tracking uses gr_sync_decimator
} }
void GpsL1CaPcpsAssistedAcquisition::disconnect(gr::top_block_sptr top_block) void GpsL1CaPcpsAssistedAcquisition::disconnect(gr::top_block_sptr top_block)
{ {
if(top_block) { /* top_block is not null */}; if (top_block)
{ /* top_block is not null */
};
//nothing to disconnect, now the tracking uses gr_sync_decimator //nothing to disconnect, now the tracking uses gr_sync_decimator
} }
@ -179,4 +181,3 @@ gr::basic_block_sptr GpsL1CaPcpsAssistedAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -40,7 +40,6 @@
#include "pcps_assisted_acquisition_cc.h" #include "pcps_assisted_acquisition_cc.h"
class ConfigurationInterface; class ConfigurationInterface;
/*! /*!

View File

@ -42,8 +42,7 @@ using google::LogMessage;
GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition( GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -77,8 +76,7 @@ GpsL1CaPcpsOpenClAcquisition::GpsL1CaPcpsOpenClAcquisition(
default_dump_filename); default_dump_filename);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = round(fs_in_ code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
/ (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * sampled_ms_; vector_length_ = code_length_ * sampled_ms_;
@ -168,7 +166,6 @@ void GpsL1CaPcpsOpenClAcquisition::set_doppler_step(unsigned int doppler_step)
{ {
acquisition_cc_->set_doppler_step(doppler_step_); acquisition_cc_->set_doppler_step(doppler_step_);
} }
} }
@ -283,4 +280,3 @@ gr::basic_block_sptr GpsL1CaPcpsOpenClAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -39,7 +39,6 @@
#include "pcps_opencl_acquisition_cc.h" #include "pcps_opencl_acquisition_cc.h"
class ConfigurationInterface; class ConfigurationInterface;
/*! /*!

View File

@ -43,8 +43,7 @@ using google::LogMessage;
GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition( GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -62,8 +61,7 @@ GpsL1CaPcpsQuickSyncAcquisition::GpsL1CaPcpsQuickSyncAcquisition(
sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4); sampled_ms_ = configuration_->property(role + ".coherent_integration_time_ms", 4);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = round(fs_in_ code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
/ (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
/*Calculate the folding factor value based on the calculations*/ /*Calculate the folding factor value based on the calculations*/
unsigned int temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_)))); unsigned int temp = static_cast<unsigned int>(ceil(sqrt(log2(code_length_))));
@ -157,7 +155,8 @@ void GpsL1CaPcpsQuickSyncAcquisition::set_channel(unsigned int channel)
void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold) void GpsL1CaPcpsQuickSyncAcquisition::set_threshold(float threshold)
{ {
float pfa = configuration_->property(role_ + float pfa = configuration_->property(role_ +
boost::lexical_cast<std::string>(channel_) + ".pfa", 0.0); boost::lexical_cast<std::string>(channel_) + ".pfa",
0.0);
if (pfa == 0.0) if (pfa == 0.0)
{ {
@ -320,5 +319,3 @@ gr::basic_block_sptr GpsL1CaPcpsQuickSyncAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -41,7 +41,6 @@
#include "configuration_interface.h" #include "configuration_interface.h"
class ConfigurationInterface; class ConfigurationInterface;
/*! /*!
@ -131,6 +130,7 @@ public:
* \brief If state = 1, it forces the block to start acquiring from the first sample * \brief If state = 1, it forces the block to start acquiring from the first sample
*/ */
void set_state(int state); void set_state(int state);
private: private:
ConfigurationInterface* configuration_; ConfigurationInterface* configuration_;
pcps_quicksync_acquisition_cc_sptr acquisition_cc_; pcps_quicksync_acquisition_cc_sptr acquisition_cc_;
@ -158,7 +158,6 @@ private:
unsigned int out_streams_; unsigned int out_streams_;
float calculate_threshold(float pfa); float calculate_threshold(float pfa);
}; };
#endif /* GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_ */ #endif /* GNSS_SDR_GPS_L1_CA_PCPS_QUICKSYNC_ACQUISITION_H_ */

View File

@ -42,8 +42,7 @@ using google::LogMessage;
GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition( GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -68,8 +67,7 @@ GpsL1CaPcpsTongAcquisition::GpsL1CaPcpsTongAcquisition(
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = round(fs_in_ code_length_ = round(fs_in_ / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
/ (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
vector_length_ = code_length_ * sampled_ms_; vector_length_ = code_length_ * sampled_ms_;
@ -159,7 +157,6 @@ void GpsL1CaPcpsTongAcquisition::set_doppler_step(unsigned int doppler_step)
{ {
acquisition_cc_->set_doppler_step(doppler_step_); acquisition_cc_->set_doppler_step(doppler_step_);
} }
} }
@ -259,7 +256,6 @@ void GpsL1CaPcpsTongAcquisition::connect(gr::top_block_sptr top_block)
{ {
top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0); top_block->connect(stream_to_vector_, 0, acquisition_cc_, 0);
} }
} }
@ -282,4 +278,3 @@ gr::basic_block_sptr GpsL1CaPcpsTongAcquisition::get_right_block()
{ {
return acquisition_cc_; return acquisition_cc_;
} }

View File

@ -44,8 +44,7 @@ using google::LogMessage;
GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition( GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -72,8 +71,7 @@ GpsL2MPcpsAcquisition::GpsL2MPcpsAcquisition(
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = round(static_cast<double>(fs_in_) code_length_ = round(static_cast<double>(fs_in_) / (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
/ (GPS_L2_M_CODE_RATE_HZ / static_cast<double>(GPS_L2_M_CODE_LENGTH_CHIPS)));
vector_length_ = code_length_; vector_length_ = code_length_;
@ -191,7 +189,6 @@ void GpsL2MPcpsAcquisition::init()
void GpsL2MPcpsAcquisition::set_local_code() void GpsL2MPcpsAcquisition::set_local_code()
{ {
gps_l2c_m_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_); gps_l2c_m_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_);
acquisition_->set_local_code(code_); acquisition_->set_local_code(code_);
@ -209,7 +206,6 @@ void GpsL2MPcpsAcquisition::set_state(int state)
} }
float GpsL2MPcpsAcquisition::calculate_threshold(float pfa) float GpsL2MPcpsAcquisition::calculate_threshold(float pfa)
{ {
//Calculate the threshold //Calculate the threshold
@ -306,4 +302,3 @@ gr::basic_block_sptr GpsL2MPcpsAcquisition::get_right_block()
{ {
return acquisition_; return acquisition_;
} }

View File

@ -44,7 +44,6 @@
#include <string> #include <string>
class ConfigurationInterface; class ConfigurationInterface;
/*! /*!

View File

@ -44,8 +44,7 @@ using google::LogMessage;
GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition( GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams), out_streams_(out_streams)
{ {
configuration_ = configuration; configuration_ = configuration;
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
@ -71,8 +70,7 @@ GpsL5iPcpsAcquisition::GpsL5iPcpsAcquisition(
dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename); dump_filename_ = configuration_->property(role + ".dump_filename", default_dump_filename);
//--- Find number of samples per spreading code ------------------------- //--- Find number of samples per spreading code -------------------------
code_length_ = round(static_cast<double>(fs_in_) code_length_ = round(static_cast<double>(fs_in_) / (GPS_L5i_CODE_RATE_HZ / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS)));
/ (GPS_L5i_CODE_RATE_HZ / static_cast<double>(GPS_L5i_CODE_LENGTH_CHIPS)));
vector_length_ = code_length_; vector_length_ = code_length_;
@ -188,7 +186,6 @@ void GpsL5iPcpsAcquisition::init()
void GpsL5iPcpsAcquisition::set_local_code() void GpsL5iPcpsAcquisition::set_local_code()
{ {
gps_l5i_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_); gps_l5i_code_gen_complex_sampled(code_, gnss_synchro_->PRN, fs_in_);
acquisition_->set_local_code(code_); acquisition_->set_local_code(code_);
@ -206,7 +203,6 @@ void GpsL5iPcpsAcquisition::set_state(int state)
} }
float GpsL5iPcpsAcquisition::calculate_threshold(float pfa) float GpsL5iPcpsAcquisition::calculate_threshold(float pfa)
{ {
//Calculate the threshold //Calculate the threshold
@ -303,4 +299,3 @@ gr::basic_block_sptr GpsL5iPcpsAcquisition::get_right_block()
{ {
return acquisition_; return acquisition_;
} }

View File

@ -57,7 +57,6 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr galileo_e5a_noncoherentIQ_make
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_) int Zero_padding_)
{ {
return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr( return galileo_e5a_noncoherentIQ_acquisition_caf_cc_sptr(
new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms, new galileo_e5a_noncoherentIQ_acquisition_caf_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_)); samples_per_code, bit_transition_flag, dump, dump_filename, both_signal_components_, CAF_window_hz_, Zero_padding_));
@ -73,8 +72,7 @@ galileo_e5a_noncoherentIQ_acquisition_caf_cc::galileo_e5a_noncoherentIQ_acquisit
std::string dump_filename, std::string dump_filename,
bool both_signal_components_, bool both_signal_components_,
int CAF_window_hz_, int CAF_window_hz_,
int Zero_padding_) : int Zero_padding_) : gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",
gr::block("galileo_e5a_noncoherentIQ_acquisition_caf_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(0, 0, sizeof(gr_complex))) gr::io_signature::make(0, 0, sizeof(gr_complex)))
{ {
@ -319,7 +317,6 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::init()
} }
void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state) void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
{ {
d_state = state; d_state = state;
@ -334,7 +331,8 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
d_test_statistics = 0.0; d_test_statistics = 0.0;
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";
@ -342,8 +340,6 @@ void galileo_e5a_noncoherentIQ_acquisition_caf_cc::set_state(int state)
} }
int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items __attribute__((unused)), int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items __attribute__((unused)),
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused))) gr_vector_void_star &output_items __attribute__((unused)))
@ -519,14 +515,20 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
if (magt_IA >= magt_IB) if (magt_IA >= magt_IB)
{ {
// if (d_CAF_filter) {d_CAF_vector_I[doppler_index] = magt_IA;} // if (d_CAF_filter) {d_CAF_vector_I[doppler_index] = magt_IA;}
if (d_CAF_window_hz > 0) {d_CAF_vector_I[doppler_index] = d_magnitudeIA[indext_IA];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_I[doppler_index] = d_magnitudeIA[indext_IA];
}
if (d_both_signal_components) if (d_both_signal_components)
{ {
// Integrate non-coherently I+Q // Integrate non-coherently I+Q
if (magt_QA >= magt_QB) if (magt_QA >= magt_QB)
{ {
// if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QA;} // if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QA;}
if (d_CAF_window_hz > 0) {d_CAF_vector_Q[doppler_index] = d_magnitudeQA[indext_QA];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_Q[doppler_index] = d_magnitudeQA[indext_QA];
}
for (unsigned int i = 0; i < d_fft_size; i++) for (unsigned int i = 0; i < d_fft_size; i++)
{ {
d_magnitudeIA[i] += d_magnitudeQA[i]; d_magnitudeIA[i] += d_magnitudeQA[i];
@ -535,7 +537,10 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
else else
{ {
// if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QB;} // if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QB;}
if (d_CAF_window_hz > 0) {d_CAF_vector_Q[doppler_index] = d_magnitudeQB[indext_QB];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_Q[doppler_index] = d_magnitudeQB[indext_QB];
}
for (unsigned int i = 0; i < d_fft_size; i++) for (unsigned int i = 0; i < d_fft_size; i++)
{ {
d_magnitudeIA[i] += d_magnitudeQB[i]; d_magnitudeIA[i] += d_magnitudeQB[i];
@ -548,14 +553,20 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
else else
{ {
// if (d_CAF_filter) {d_CAF_vector_I[doppler_index] = magt_IB;} // if (d_CAF_filter) {d_CAF_vector_I[doppler_index] = magt_IB;}
if (d_CAF_window_hz > 0) {d_CAF_vector_I[doppler_index] = d_magnitudeIB[indext_IB];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_I[doppler_index] = d_magnitudeIB[indext_IB];
}
if (d_both_signal_components) if (d_both_signal_components)
{ {
// Integrate non-coherently I+Q // Integrate non-coherently I+Q
if (magt_QA >= magt_QB) if (magt_QA >= magt_QB)
{ {
//if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QA;} //if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QA;}
if (d_CAF_window_hz > 0) {d_CAF_vector_Q[doppler_index] = d_magnitudeQA[indext_QA];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_Q[doppler_index] = d_magnitudeQA[indext_QA];
}
for (unsigned int i = 0; i < d_fft_size; i++) for (unsigned int i = 0; i < d_fft_size; i++)
{ {
d_magnitudeIB[i] += d_magnitudeQA[i]; d_magnitudeIB[i] += d_magnitudeQA[i];
@ -564,7 +575,10 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
else else
{ {
// if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QB;} // if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QB;}
if (d_CAF_window_hz > 0) {d_CAF_vector_Q[doppler_index] = d_magnitudeQB[indext_QB];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_Q[doppler_index] = d_magnitudeQB[indext_QB];
}
for (unsigned int i = 0; i < d_fft_size; i++) for (unsigned int i = 0; i < d_fft_size; i++)
{ {
d_magnitudeIB[i] += d_magnitudeQB[i]; d_magnitudeIB[i] += d_magnitudeQB[i];
@ -578,11 +592,17 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
else else
{ {
// if (d_CAF_filter) {d_CAF_vector_I[doppler_index] = magt_IA;} // if (d_CAF_filter) {d_CAF_vector_I[doppler_index] = magt_IA;}
if (d_CAF_window_hz > 0) {d_CAF_vector_I[doppler_index] = d_magnitudeIA[indext_IA];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_I[doppler_index] = d_magnitudeIA[indext_IA];
}
if (d_both_signal_components) if (d_both_signal_components)
{ {
// if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QA;} // if (d_CAF_filter) {d_CAF_vector_Q[doppler_index] = magt_QA;}
if (d_CAF_window_hz > 0) {d_CAF_vector_Q[doppler_index] = d_magnitudeQA[indext_QA];} if (d_CAF_window_hz > 0)
{
d_CAF_vector_Q[doppler_index] = d_magnitudeQA[indext_QA];
}
// NON-Coherent integration of only 1 code // NON-Coherent integration of only 1 code
for (unsigned int i = 0; i < d_fft_size; i++) for (unsigned int i = 0; i < d_fft_size; i++)
{ {
@ -812,4 +832,3 @@ int galileo_e5a_noncoherentIQ_acquisition_caf_cc::general_work(int noutput_items
return 0; return 0;
} }

View File

@ -246,6 +246,5 @@ public:
int general_work(int noutput_items, gr_vector_int& ninput_items, int general_work(int noutput_items, gr_vector_int& ninput_items,
gr_vector_const_void_star& input_items, gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items); gr_vector_void_star& output_items);
}; };
#endif /* GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H_ */ #endif /* GALILEO_E5A_NONCOHERENT_IQ_ACQUISITION_CAF_CC_H_ */

View File

@ -45,7 +45,6 @@ galileo_pcps_8ms_acquisition_cc_sptr galileo_pcps_8ms_make_acquisition_cc(
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool dump, std::string dump_filename) bool dump, std::string dump_filename)
{ {
return galileo_pcps_8ms_acquisition_cc_sptr( return galileo_pcps_8ms_acquisition_cc_sptr(
new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms, new galileo_pcps_8ms_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
samples_per_code, dump, dump_filename)); samples_per_code, dump, dump_filename));
@ -55,8 +54,8 @@ galileo_pcps_8ms_acquisition_cc::galileo_pcps_8ms_acquisition_cc(
unsigned int sampled_ms, unsigned int max_dwells, unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in, unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool dump, std::string dump_filename) : bool dump,
gr::block("galileo_pcps_8ms_acquisition_cc", std::string dump_filename) : gr::block("galileo_pcps_8ms_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {
@ -197,7 +196,8 @@ void galileo_pcps_8ms_acquisition_cc::set_state(int state)
d_test_statistics = 0.0; d_test_statistics = 0.0;
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";
@ -205,7 +205,6 @@ void galileo_pcps_8ms_acquisition_cc::set_state(int state)
} }
int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items, int galileo_pcps_8ms_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused))) gr_vector_void_star &output_items __attribute__((unused)))

View File

@ -44,8 +44,7 @@ using google::LogMessage;
void wait3(int seconds) void wait3(int seconds)
{ {
boost::this_thread::sleep_for(boost::chrono::seconds boost::this_thread::sleep_for(boost::chrono::seconds{seconds});
{ seconds });
} }
@ -72,9 +71,7 @@ gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc(
int samples_per_code, int vector_length, unsigned int nsamples_total, int samples_per_code, int vector_length, unsigned int nsamples_total,
bool bit_transition_flag, bool use_CFAR_algorithm_flag, bool bit_transition_flag, bool use_CFAR_algorithm_flag,
unsigned int select_queue_Fpga, std::string device_name, bool dump, unsigned int select_queue_Fpga, std::string device_name, bool dump,
std::string dump_filename) : std::string dump_filename) : gr::block("pcps_acquisition_fpga_sc",
gr::block("pcps_acquisition_fpga_sc",
gr::io_signature::make(0, 0, sizeof(lv_16sc_t)), gr::io_signature::make(0, 0, sizeof(lv_16sc_t)),
gr::io_signature::make(0, 0, 0)) gr::io_signature::make(0, 0, 0))
{ {
@ -102,8 +99,7 @@ gps_pcps_acquisition_fpga_sc::gps_pcps_acquisition_fpga_sc(
d_gnss_synchro = 0; d_gnss_synchro = 0;
// instantiate HW accelerator class // instantiate HW accelerator class
acquisition_fpga_8sc = std::make_shared < gps_fpga_acquisition_8sc> acquisition_fpga_8sc = std::make_shared<gps_fpga_acquisition_8sc>(device_name, vector_length, d_fft_size, nsamples_total, fs_in, freq, sampled_ms, select_queue_Fpga);
(device_name, vector_length, d_fft_size, nsamples_total, fs_in, freq, sampled_ms, select_queue_Fpga);
} }
@ -136,9 +132,7 @@ void gps_pcps_acquisition_fpga_sc::init()
d_mag = 0.0; d_mag = 0.0;
d_num_doppler_bins = ceil( d_num_doppler_bins = ceil(
static_cast<double>(static_cast<int>(d_doppler_max) static_cast<double>(static_cast<int>(d_doppler_max) - static_cast<int>(-d_doppler_max)) / static_cast<double>(d_doppler_step));
- static_cast<int>(-d_doppler_max))
/ static_cast<double>(d_doppler_step));
acquisition_fpga_8sc->open_device(); acquisition_fpga_8sc->open_device();
@ -198,7 +192,8 @@ void gps_pcps_acquisition_fpga_sc::set_active(bool active)
DLOG(INFO) << "Channel: " << d_channel DLOG(INFO) << "Channel: " << d_channel
<< " , doing acquisition of satellite: " << d_gnss_synchro->System << " , doing acquisition of satellite: " << d_gnss_synchro->System
<< " " << d_gnss_synchro->PRN << " ,sample stamp: " << " " << d_gnss_synchro->PRN << " ,sample stamp: "
<< d_sample_counter << ", threshold: " << ", threshold: " << d_sample_counter << ", threshold: "
<< ", threshold: "
<< d_threshold << ", doppler_max: " << d_doppler_max << d_threshold << ", doppler_max: " << d_doppler_max
<< ", doppler_step: " << d_doppler_step; << ", doppler_step: " << d_doppler_step;
@ -206,9 +201,7 @@ void gps_pcps_acquisition_fpga_sc::set_active(bool active)
for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins; for (unsigned int doppler_index = 0; doppler_index < d_num_doppler_bins;
doppler_index++) doppler_index++)
{ {
doppler = -static_cast<int>(d_doppler_max) + d_doppler_step * doppler_index;
doppler = -static_cast<int>(d_doppler_max)
+ d_doppler_step * doppler_index;
acquisition_fpga_8sc->set_phase_step(doppler_index); acquisition_fpga_8sc->set_phase_step(doppler_index);
acquisition_fpga_8sc->run_acquisition(); // runs acquisition and waits until it is finished acquisition_fpga_8sc->run_acquisition(); // runs acquisition and waits until it is finished
@ -224,8 +217,7 @@ void gps_pcps_acquisition_fpga_sc::set_active(bool active)
peak_to_noise_level = temp_peak_to_noise_level; peak_to_noise_level = temp_peak_to_noise_level;
d_mag = magt; d_mag = magt;
input_power = (input_power - d_mag) input_power = (input_power - d_mag) / (effective_fft_size - 1);
/ (effective_fft_size - 1);
d_gnss_synchro->Acq_delay_samples = d_gnss_synchro->Acq_delay_samples =
static_cast<double>(indext % d_samples_per_code); static_cast<double>(indext % d_samples_per_code);

View File

@ -107,9 +107,13 @@ private:
unsigned int d_num_doppler_bins; unsigned int d_num_doppler_bins;
Gnss_Synchro *d_gnss_synchro; Gnss_Synchro *d_gnss_synchro;
float d_mag;bool d_bit_transition_flag;bool d_use_CFAR_algorithm_flag; float d_mag;
std::ofstream d_dump_file;bool d_active; bool d_bit_transition_flag;
int d_state;bool d_dump; bool d_use_CFAR_algorithm_flag;
std::ofstream d_dump_file;
bool d_active;
int d_state;
bool d_dump;
unsigned int d_channel; unsigned int d_channel;
std::string d_dump_filename; std::string d_dump_filename;
@ -209,7 +213,6 @@ public:
int general_work(int noutput_items, gr_vector_int &ninput_items, int general_work(int noutput_items, gr_vector_int &ninput_items,
gr_vector_const_void_star &input_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items); gr_vector_void_star &output_items);
}; };
#endif /* GNSS_SDR_PCPS_ACQUISITION_SC_H_*/ #endif /* GNSS_SDR_PCPS_ACQUISITION_SC_H_*/

View File

@ -65,8 +65,8 @@ pcps_acquisition::pcps_acquisition(
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool use_CFAR_algorithm_flag, bool bit_transition_flag, bool use_CFAR_algorithm_flag,
bool dump, bool blocking, bool dump, bool blocking,
std::string dump_filename, size_t it_size) : std::string dump_filename,
gr::block("pcps_acquisition", size_t it_size) : gr::block("pcps_acquisition",
gr::io_signature::make(1, 1, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1)), gr::io_signature::make(1, 1, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1)),
gr::io_signature::make(0, 0, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1))) gr::io_signature::make(0, 0, it_size * sampled_ms * samples_per_ms * (bit_transition_flag ? 2 : 1)))
{ {
@ -95,8 +95,14 @@ pcps_acquisition::pcps_acquisition(
d_code_phase = 0; d_code_phase = 0;
d_test_statistics = 0.0; d_test_statistics = 0.0;
d_channel = 0; d_channel = 0;
if(it_size == sizeof(gr_complex)) { d_cshort = false; } if (it_size == sizeof(gr_complex))
else { d_cshort = true; } {
d_cshort = false;
}
else
{
d_cshort = true;
}
// COD: // COD:
// Experimenting with the overlap/save technique for handling bit trannsitions // Experimenting with the overlap/save technique for handling bit trannsitions
@ -158,7 +164,10 @@ pcps_acquisition::~pcps_acquisition()
delete d_ifft; delete d_ifft;
delete d_fft_if; delete d_fft_if;
volk_gnsssdr_free(d_data_buffer); volk_gnsssdr_free(d_data_buffer);
if(d_cshort) { volk_gnsssdr_free(d_data_buffer_sc); } if (d_cshort)
{
volk_gnsssdr_free(d_data_buffer_sc);
}
} }
@ -278,7 +287,8 @@ void pcps_acquisition::set_state(int state)
d_active = true; d_active = true;
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";
@ -366,8 +376,14 @@ int pcps_acquisition::general_work(int noutput_items __attribute__((unused)),
case 1: case 1:
{ {
// Copy the data to the core and let it know that new data is available // Copy the data to the core and let it know that new data is available
if(d_cshort) { memcpy(d_data_buffer_sc, input_items[0], d_fft_size * sizeof(lv_16sc_t)); } if (d_cshort)
else { memcpy(d_data_buffer, input_items[0], d_fft_size * sizeof(gr_complex)); } {
memcpy(d_data_buffer_sc, input_items[0], d_fft_size * sizeof(lv_16sc_t));
}
else
{
memcpy(d_data_buffer, input_items[0], d_fft_size * sizeof(gr_complex));
}
if (d_blocking) if (d_blocking)
{ {
lk.unlock(); lk.unlock();
@ -397,7 +413,10 @@ void pcps_acquisition::acquisition_core( unsigned long int samp_count )
float magt = 0.0; float magt = 0.0;
const gr_complex* in = d_data_buffer; //Get the input samples pointer const gr_complex* in = d_data_buffer; //Get the input samples pointer
int effective_fft_size = (d_bit_transition_flag ? d_fft_size / 2 : d_fft_size); int effective_fft_size = (d_bit_transition_flag ? d_fft_size / 2 : d_fft_size);
if(d_cshort) { volk_gnsssdr_16ic_convert_32fc(d_data_buffer, d_data_buffer_sc, d_fft_size); } if (d_cshort)
{
volk_gnsssdr_16ic_convert_32fc(d_data_buffer, d_data_buffer_sc, d_fft_size);
}
float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size); float fft_normalization_factor = static_cast<float>(d_fft_size) * static_cast<float>(d_fft_size);
d_input_power = 0.0; d_input_power = 0.0;

View File

@ -242,7 +242,6 @@ public:
int general_work(int noutput_items, gr_vector_int& ninput_items, int general_work(int noutput_items, gr_vector_int& ninput_items,
gr_vector_const_void_star& input_items, gr_vector_const_void_star& input_items,
gr_vector_void_star& output_items); gr_vector_void_star& output_items);
}; };
#endif /* GNSS_SDR_PCPS_ACQUISITION_H_*/ #endif /* GNSS_SDR_PCPS_ACQUISITION_H_*/

View File

@ -49,7 +49,6 @@ pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(
long fs_in, int samples_per_ms, bool dump, long fs_in, int samples_per_ms, bool dump,
std::string dump_filename) std::string dump_filename)
{ {
return pcps_acquisition_fine_doppler_cc_sptr( return pcps_acquisition_fine_doppler_cc_sptr(
new pcps_acquisition_fine_doppler_cc(max_dwells, sampled_ms, doppler_max, doppler_min, freq, new pcps_acquisition_fine_doppler_cc(max_dwells, sampled_ms, doppler_max, doppler_min, freq,
fs_in, samples_per_ms, dump, dump_filename)); fs_in, samples_per_ms, dump, dump_filename));
@ -59,8 +58,7 @@ pcps_acquisition_fine_doppler_cc_sptr pcps_make_acquisition_fine_doppler_cc(
pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc( pcps_acquisition_fine_doppler_cc::pcps_acquisition_fine_doppler_cc(
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq, int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq,
long fs_in, int samples_per_ms, bool dump, long fs_in, int samples_per_ms, bool dump,
std::string dump_filename) : std::string dump_filename) : gr::block("pcps_acquisition_fine_doppler_cc",
gr::block("pcps_acquisition_fine_doppler_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(0, 0, sizeof(gr_complex))) gr::io_signature::make(0, 0, sizeof(gr_complex)))
{ {
@ -259,8 +257,7 @@ double pcps_acquisition_fine_doppler_cc::search_maximum()
filename << "../data/test_statistics_" << d_gnss_synchro->System filename << "../data/test_statistics_" << d_gnss_synchro->System
<< "_" << d_gnss_synchro->Signal << "_sat_" << "_" << d_gnss_synchro->Signal << "_sat_"
<< d_gnss_synchro->PRN << "_doppler_" << d_gnss_synchro->Acq_doppler_hz << ".dat"; << d_gnss_synchro->PRN << "_doppler_" << d_gnss_synchro->Acq_doppler_hz << ".dat";
d_dump_file.open(filename.str().c_str(), std::ios::out d_dump_file.open(filename.str().c_str(), std::ios::out | std::ios::binary);
| std::ios::binary);
d_dump_file.write(reinterpret_cast<char *>(d_grid_data[index_doppler]), n); //write directly |abs(x)|^2 in this Doppler bin? d_dump_file.write(reinterpret_cast<char *>(d_grid_data[index_doppler]), n); //write directly |abs(x)|^2 in this Doppler bin?
d_dump_file.close(); d_dump_file.close();
} }

View File

@ -56,12 +56,10 @@ pcps_assisted_acquisition_cc_sptr pcps_make_assisted_acquisition_cc(
} }
pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc( pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq, int max_dwells, unsigned int sampled_ms, int doppler_max, int doppler_min, long freq,
long fs_in, int samples_per_ms, bool dump, long fs_in, int samples_per_ms, bool dump,
std::string dump_filename) : std::string dump_filename) : gr::block("pcps_assisted_acquisition_cc",
gr::block("pcps_assisted_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(0, 0, sizeof(gr_complex))) gr::io_signature::make(0, 0, sizeof(gr_complex)))
{ {
@ -111,14 +109,12 @@ pcps_assisted_acquisition_cc::pcps_assisted_acquisition_cc(
} }
void pcps_assisted_acquisition_cc::set_doppler_step(unsigned int doppler_step) void pcps_assisted_acquisition_cc::set_doppler_step(unsigned int doppler_step)
{ {
d_doppler_step = doppler_step; d_doppler_step = doppler_step;
} }
void pcps_assisted_acquisition_cc::free_grid_memory() void pcps_assisted_acquisition_cc::free_grid_memory()
{ {
for (int i = 0; i < d_num_doppler_points; i++) for (int i = 0; i < d_num_doppler_points; i++)
@ -130,7 +126,6 @@ void pcps_assisted_acquisition_cc::free_grid_memory()
} }
pcps_assisted_acquisition_cc::~pcps_assisted_acquisition_cc() pcps_assisted_acquisition_cc::~pcps_assisted_acquisition_cc()
{ {
volk_gnsssdr_free(d_carrier); volk_gnsssdr_free(d_carrier);
@ -144,14 +139,12 @@ pcps_assisted_acquisition_cc::~pcps_assisted_acquisition_cc()
} }
void pcps_assisted_acquisition_cc::set_local_code(std::complex<float> *code) void pcps_assisted_acquisition_cc::set_local_code(std::complex<float> *code)
{ {
memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size); memcpy(d_fft_if->get_inbuf(), code, sizeof(gr_complex) * d_fft_size);
} }
void pcps_assisted_acquisition_cc::init() void pcps_assisted_acquisition_cc::init()
{ {
d_gnss_synchro->Flag_valid_acquisition = false; d_gnss_synchro->Flag_valid_acquisition = false;
@ -172,7 +165,6 @@ void pcps_assisted_acquisition_cc::init()
} }
void pcps_assisted_acquisition_cc::forecast(int noutput_items, void pcps_assisted_acquisition_cc::forecast(int noutput_items,
gr_vector_int &ninput_items_required) gr_vector_int &ninput_items_required)
{ {
@ -183,7 +175,6 @@ void pcps_assisted_acquisition_cc::forecast (int noutput_items,
} }
void pcps_assisted_acquisition_cc::get_assistance() void pcps_assisted_acquisition_cc::get_assistance()
{ {
Gps_Acq_Assist gps_acq_assisistance; Gps_Acq_Assist gps_acq_assisistance;
@ -212,7 +203,6 @@ void pcps_assisted_acquisition_cc::get_assistance()
} }
void pcps_assisted_acquisition_cc::reset_grid() void pcps_assisted_acquisition_cc::reset_grid()
{ {
d_well_count = 0; d_well_count = 0;
@ -226,7 +216,6 @@ void pcps_assisted_acquisition_cc::reset_grid()
} }
void pcps_assisted_acquisition_cc::redefine_grid() void pcps_assisted_acquisition_cc::redefine_grid()
{ {
if (this->d_disable_assist == true) if (this->d_disable_assist == true)
@ -261,7 +250,6 @@ void pcps_assisted_acquisition_cc::redefine_grid()
} }
double pcps_assisted_acquisition_cc::search_maximum() double pcps_assisted_acquisition_cc::search_maximum()
{ {
float magt = 0.0; float magt = 0.0;
@ -311,7 +299,6 @@ double pcps_assisted_acquisition_cc::search_maximum()
} }
float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_star &input_items) float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_star &input_items)
{ {
const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer const gr_complex *in = reinterpret_cast<const gr_complex *>(input_items[0]); //Get the input samples pointer
@ -328,7 +315,6 @@ float pcps_assisted_acquisition_cc::estimate_input_power(gr_vector_const_void_st
} }
int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items) int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_void_star &input_items)
{ {
// initialize acquisition algorithm // initialize acquisition algorithm
@ -370,7 +356,6 @@ int pcps_assisted_acquisition_cc::compute_and_accumulate_grid(gr_vector_const_vo
} }
int pcps_assisted_acquisition_cc::general_work(int noutput_items, int pcps_assisted_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused))) gr_vector_void_star &output_items __attribute__((unused)))

View File

@ -61,8 +61,8 @@ pcps_cccwsr_acquisition_cc::pcps_cccwsr_acquisition_cc(
unsigned int sampled_ms, unsigned int max_dwells, unsigned int sampled_ms, unsigned int max_dwells,
unsigned int doppler_max, long freq, long fs_in, unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool dump, std::string dump_filename) : bool dump,
gr::block("pcps_cccwsr_acquisition_cc", std::string dump_filename) : gr::block("pcps_cccwsr_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {
@ -211,7 +211,8 @@ void pcps_cccwsr_acquisition_cc::set_state(int state)
d_test_statistics = 0.0; d_test_statistics = 0.0;
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";
@ -223,7 +224,6 @@ int pcps_cccwsr_acquisition_cc::general_work(int noutput_items,
gr_vector_int &ninput_items, gr_vector_const_void_star &input_items, gr_vector_int &ninput_items, gr_vector_const_void_star &input_items,
gr_vector_void_star &output_items __attribute__((unused))) gr_vector_void_star &output_items __attribute__((unused)))
{ {
int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL int acquisition_message = -1; //0=STOP_CHANNEL 1=ACQ_SUCCEES 2=ACQ_FAIL
switch (d_state) switch (d_state)

View File

@ -58,8 +58,8 @@
#include <volk/volk.h> #include <volk/volk.h>
#include <volk_gnsssdr/volk_gnsssdr.h> #include <volk_gnsssdr/volk_gnsssdr.h>
#include "control_message_factory.h" #include "control_message_factory.h"
#include "fft_base_kernels.h" #include "opencl/fft_base_kernels.h"
#include "fft_internal.h" #include "opencl/fft_internal.h"
#include "GPS_L1_CA.h" //GPS_TWO_PI #include "GPS_L1_CA.h" //GPS_TWO_PI
@ -73,7 +73,6 @@ pcps_opencl_acquisition_cc_sptr pcps_make_opencl_acquisition_cc(
bool dump, bool dump,
std::string dump_filename) std::string dump_filename)
{ {
return pcps_opencl_acquisition_cc_sptr( return pcps_opencl_acquisition_cc_sptr(
new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms, new pcps_opencl_acquisition_cc(sampled_ms, max_dwells, doppler_max, freq, fs_in, samples_per_ms,
samples_per_code, bit_transition_flag, dump, dump_filename)); samples_per_code, bit_transition_flag, dump, dump_filename));
@ -85,8 +84,7 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, bool dump,
std::string dump_filename) : std::string dump_filename) : gr::block("pcps_opencl_acquisition_cc",
gr::block("pcps_opencl_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {
@ -140,11 +138,9 @@ pcps_opencl_acquisition_cc::pcps_opencl_acquisition_cc(
// For dumping samples into a file // For dumping samples into a file
d_dump = dump; d_dump = dump;
d_dump_filename = dump_filename; d_dump_filename = dump_filename;
} }
pcps_opencl_acquisition_cc::~pcps_opencl_acquisition_cc() pcps_opencl_acquisition_cc::~pcps_opencl_acquisition_cc()
{ {
if (d_num_doppler_bins > 0) if (d_num_doppler_bins > 0)
@ -194,7 +190,6 @@ pcps_opencl_acquisition_cc::~pcps_opencl_acquisition_cc()
} }
int pcps_opencl_acquisition_cc::init_opencl_environment(std::string kernel_filename) int pcps_opencl_acquisition_cc::init_opencl_environment(std::string kernel_filename)
{ {
//get all platforms (drivers) //get all platforms (drivers)
@ -286,7 +281,6 @@ int pcps_opencl_acquisition_cc::init_opencl_environment(std::string kernel_filen
} }
void pcps_opencl_acquisition_cc::init() void pcps_opencl_acquisition_cc::init()
{ {
d_gnss_synchro->Flag_valid_acquisition = false; d_gnss_synchro->Flag_valid_acquisition = false;
@ -356,8 +350,7 @@ void pcps_opencl_acquisition_cc::set_local_code(std::complex<float> * code)
sizeof(gr_complex) * (d_fft_size_pow2 - 2 * d_fft_size), sizeof(gr_complex) * (d_fft_size_pow2 - 2 * d_fft_size),
d_zero_vector); d_zero_vector);
d_cl_queue->enqueueWriteBuffer(*d_cl_buffer_2, CL_TRUE, sizeof(gr_complex) d_cl_queue->enqueueWriteBuffer(*d_cl_buffer_2, CL_TRUE, sizeof(gr_complex) * (d_fft_size_pow2 - d_fft_size),
*(d_fft_size_pow2 - d_fft_size),
sizeof(gr_complex) * d_fft_size, code); sizeof(gr_complex) * d_fft_size, code);
clFFT_ExecuteInterleaved((*d_cl_queue)(), d_cl_fft_plan, d_cl_fft_batch_size, clFFT_ExecuteInterleaved((*d_cl_queue)(), d_cl_fft_plan, d_cl_fft_batch_size,
@ -686,7 +679,8 @@ void pcps_opencl_acquisition_cc::set_state(int state)
d_sample_counter_buffer.clear(); d_sample_counter_buffer.clear();
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";

View File

@ -57,11 +57,11 @@
#include <gnuradio/block.h> #include <gnuradio/block.h>
#include <gnuradio/gr_complex.h> #include <gnuradio/gr_complex.h>
#include <gnuradio/fft/fft.h> #include <gnuradio/fft/fft.h>
#include "fft_internal.h" #include "opencl/fft_internal.h"
#include "gnss_synchro.h" #include "gnss_synchro.h"
#ifdef __APPLE__ #ifdef __APPLE__
#include "cl.hpp" #include "opencl/cl.hpp"
#else #else
#include <CL/cl.hpp> #include <CL/cl.hpp>
#endif #endif

View File

@ -67,8 +67,8 @@ pcps_quicksync_acquisition_cc::pcps_quicksync_acquisition_cc(
unsigned int doppler_max, long freq, long fs_in, unsigned int doppler_max, long freq, long fs_in,
int samples_per_ms, int samples_per_code, int samples_per_ms, int samples_per_code,
bool bit_transition_flag, bool bit_transition_flag,
bool dump, std::string dump_filename): bool dump,
gr::block("pcps_quicksync_acquisition_cc", std::string dump_filename) : gr::block("pcps_quicksync_acquisition_cc",
gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)), gr::io_signature::make(1, 1, (sizeof(gr_complex) * sampled_ms * samples_per_ms)),
gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms))) gr::io_signature::make(0, 0, (sizeof(gr_complex) * sampled_ms * samples_per_ms)))
{ {
@ -187,7 +187,6 @@ void pcps_quicksync_acquisition_cc::set_local_code(std::complex<float>* code)
//Conjugate the local code //Conjugate the local code
volk_32fc_conjugate_32fc(d_fft_codes, d_fft_if->get_outbuf(), d_fft_size); volk_32fc_conjugate_32fc(d_fft_codes, d_fft_if->get_outbuf(), d_fft_size);
} }
@ -246,7 +245,8 @@ void pcps_quicksync_acquisition_cc::set_state(int state)
d_active = 1; d_active = 1;
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";
@ -432,7 +432,6 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
for (int i = 0; i < static_cast<int>(d_folding_factor); i++) for (int i = 0; i < static_cast<int>(d_folding_factor); i++)
{ {
/*Copy a signal of 1 code length into suggested buffer. /*Copy a signal of 1 code length into suggested buffer.
The copied signal must have doppler effect corrected*/ The copied signal must have doppler effect corrected*/
memcpy(in_1code, &in_temp[d_possible_delay[i]], memcpy(in_1code, &in_temp[d_possible_delay[i]],
@ -449,7 +448,6 @@ int pcps_quicksync_acquisition_cc::general_work(int noutput_items,
{ {
complex_acumulator[i] += (corr_output[j]); complex_acumulator[i] += (corr_output[j]);
} }
} }
/*Obtain maximun value of correlation given the possible delay selected */ /*Obtain maximun value of correlation given the possible delay selected */
volk_32fc_magnitude_squared_32f(d_corr_output_f, complex_acumulator, d_folding_factor); volk_32fc_magnitude_squared_32f(d_corr_output_f, complex_acumulator, d_folding_factor);

View File

@ -76,8 +76,8 @@ pcps_tong_acquisition_cc::pcps_tong_acquisition_cc(
long freq, long fs_in, int samples_per_ms, long freq, long fs_in, int samples_per_ms,
int samples_per_code, unsigned int tong_init_val, int samples_per_code, unsigned int tong_init_val,
unsigned int tong_max_val, unsigned int tong_max_dwells, unsigned int tong_max_val, unsigned int tong_max_dwells,
bool dump, std::string dump_filename) : bool dump,
gr::block("pcps_tong_acquisition_cc", std::string dump_filename) : gr::block("pcps_tong_acquisition_cc",
gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms), gr::io_signature::make(1, 1, sizeof(gr_complex) * sampled_ms * samples_per_ms),
gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms)) gr::io_signature::make(0, 0, sizeof(gr_complex) * sampled_ms * samples_per_ms))
{ {
@ -228,7 +228,8 @@ void pcps_tong_acquisition_cc::set_state(int state)
} }
} }
else if (d_state == 0) else if (d_state == 0)
{} {
}
else else
{ {
LOG(ERROR) << "State can only be set to 0 or 1"; LOG(ERROR) << "State can only be set to 0 or 1";

View File

@ -78,7 +78,6 @@ bool gps_fpga_acquisition_8sc::init()
bool gps_fpga_acquisition_8sc::set_local_code(unsigned int PRN) bool gps_fpga_acquisition_8sc::set_local_code(unsigned int PRN)
{ {
// select the code with the chosen PRN // select the code with the chosen PRN
gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code( gps_fpga_acquisition_8sc::fpga_configure_acquisition_local_code(
&d_all_fft_codes[d_vector_length * PRN]); &d_all_fft_codes[d_vector_length * PRN]);
@ -155,7 +154,6 @@ gps_fpga_acquisition_8sc::gps_fpga_acquisition_8sc(std::string device_name,
d_all_fft_codes[i + vector_length * PRN] = lv_16sc_t(static_cast<int>(d_fft_codes_padded[i].real() * (pow(2, 7) - 1) / max), d_all_fft_codes[i + vector_length * PRN] = lv_16sc_t(static_cast<int>(d_fft_codes_padded[i].real() * (pow(2, 7) - 1) / max),
static_cast<int>(d_fft_codes_padded[i].imag() * (pow(2, 7) - 1) / max)); static_cast<int>(d_fft_codes_padded[i].imag() * (pow(2, 7) - 1) / max));
} }
} }
// temporary buffers that we can delete // temporary buffers that we can delete
@ -291,7 +289,6 @@ void gps_fpga_acquisition_8sc::unblock_samples()
void gps_fpga_acquisition_8sc::open_device() void gps_fpga_acquisition_8sc::open_device()
{ {
if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1) if ((d_fd = open(d_device_name.c_str(), O_RDWR | O_SYNC)) == -1)
{ {
LOG(WARNING) << "Cannot open deviceio" << d_device_name; LOG(WARNING) << "Cannot open deviceio" << d_device_name;
@ -335,4 +332,3 @@ void gps_fpga_acquisition_8sc::close_device()
} }
close(d_fd); close(d_fd);
} }

View File

@ -51,7 +51,9 @@ public:
unsigned int vector_length, unsigned int nsamples, unsigned int vector_length, unsigned int nsamples,
unsigned int nsamples_total, long fs_in, long freq, unsigned int nsamples_total, long fs_in, long freq,
unsigned int sampled_ms, unsigned select_queue); unsigned int sampled_ms, unsigned select_queue);
~gps_fpga_acquisition_8sc();bool init();bool set_local_code( ~gps_fpga_acquisition_8sc();
bool init();
bool set_local_code(
unsigned int PRN); //int code_length_chips, const lv_16sc_t* local_code_in, float *shifts_chips); unsigned int PRN); //int code_length_chips, const lv_16sc_t* local_code_in, float *shifts_chips);
bool free(); bool free();
void run_acquisition(void); void run_acquisition(void);
@ -82,7 +84,6 @@ public:
} }
private: private:
long d_freq; long d_freq;
long d_fs_in; long d_fs_in;
gr::fft::fft_complex *d_fft_if; // function used to run the fft of the local codes gr::fft::fft_complex *d_fft_if; // function used to run the fft of the local codes
@ -102,7 +103,6 @@ private:
unsigned fpga_acquisition_test_register(unsigned writeval); unsigned fpga_acquisition_test_register(unsigned writeval);
void fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[]); void fpga_configure_acquisition_local_code(lv_16sc_t fft_local_code[]);
void configure_acquisition(); void configure_acquisition();
}; };
#endif /* GNSS_SDR_FPGA_MULTICORRELATOR_H_ */ #endif /* GNSS_SDR_FPGA_MULTICORRELATOR_H_ */

View File

@ -212,4 +212,3 @@ void Channel::start_acquisition()
} }
DLOG(INFO) << "Channel start_acquisition()"; DLOG(INFO) << "Channel start_acquisition()";
} }

View File

@ -58,7 +58,6 @@ class TelemetryDecoderInterface;
*/ */
class Channel : public ChannelInterface class Channel : public ChannelInterface
{ {
public: public:
//! Constructor //! Constructor
Channel(ConfigurationInterface* configuration, unsigned int channel, Channel(ConfigurationInterface* configuration, unsigned int channel,

View File

@ -34,7 +34,6 @@
#include <glog/logging.h> #include <glog/logging.h>
ChannelFsm::ChannelFsm() ChannelFsm::ChannelFsm()
{ {
acq_ = nullptr; acq_ = nullptr;
@ -44,9 +43,7 @@ ChannelFsm::ChannelFsm()
} }
ChannelFsm::ChannelFsm(std::shared_ptr<AcquisitionInterface> acquisition) : acq_(acquisition)
ChannelFsm::ChannelFsm(std::shared_ptr<AcquisitionInterface> acquisition) :
acq_(acquisition)
{ {
trk_ = nullptr; trk_ = nullptr;
channel_ = 0; channel_ = 0;

View File

@ -62,7 +62,6 @@ public:
bool Event_failed_tracking_standby(); bool Event_failed_tracking_standby();
private: private:
void start_acquisition(); void start_acquisition();
void start_tracking(); void start_tracking();
void request_satellite(); void request_satellite();

View File

@ -82,8 +82,7 @@ void channel_msg_receiver_cc::msg_handler_events(pmt::pmt_t msg)
} }
channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> channel_fsm, bool repeat) : gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
gr::block("channel_msg_receiver_cc", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0))
{ {
this->message_port_register_in(pmt::mp("events")); this->message_port_register_in(pmt::mp("events"));
this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1)); this->set_msg_handler(pmt::mp("events"), boost::bind(&channel_msg_receiver_cc::msg_handler_events, this, _1));
@ -93,5 +92,4 @@ channel_msg_receiver_cc::channel_msg_receiver_cc(std::shared_ptr<ChannelFsm> cha
} }
channel_msg_receiver_cc::~channel_msg_receiver_cc() channel_msg_receiver_cc::~channel_msg_receiver_cc() {}
{}

View File

@ -54,7 +54,6 @@ private:
public: public:
~channel_msg_receiver_cc(); //!< Default destructor ~channel_msg_receiver_cc(); //!< Default destructor
}; };
#endif #endif

View File

@ -38,18 +38,21 @@ using google::LogMessage;
// Constructor // Constructor
ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration, ArraySignalConditioner::ArraySignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt, std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(data_type_adapt),
data_type_adapt_(data_type_adapt), in_filt_(in_filt),
in_filt_(in_filt), res_(res), role_(role), implementation_(implementation) res_(res),
role_(role),
implementation_(implementation)
{ {
connected_ = false; connected_ = false;
if(configuration){ }; if (configuration)
{
};
} }
// Destructor // Destructor
ArraySignalConditioner::~ArraySignalConditioner() ArraySignalConditioner::~ArraySignalConditioner() {}
{}
void ArraySignalConditioner::connect(gr::top_block_sptr top_block) void ArraySignalConditioner::connect(gr::top_block_sptr top_block)
@ -76,7 +79,6 @@ void ArraySignalConditioner::connect(gr::top_block_sptr top_block)
} }
void ArraySignalConditioner::disconnect(gr::top_block_sptr top_block) void ArraySignalConditioner::disconnect(gr::top_block_sptr top_block)
{ {
if (!connected_) if (!connected_)
@ -105,9 +107,7 @@ gr::basic_block_sptr ArraySignalConditioner::get_left_block()
} }
gr::basic_block_sptr ArraySignalConditioner::get_right_block() gr::basic_block_sptr ArraySignalConditioner::get_right_block()
{ {
return res_->get_right_block(); return res_->get_right_block();
} }

View File

@ -38,18 +38,21 @@ using google::LogMessage;
// Constructor // Constructor
SignalConditioner::SignalConditioner(ConfigurationInterface *configuration, SignalConditioner::SignalConditioner(ConfigurationInterface *configuration,
std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt, std::shared_ptr<GNSSBlockInterface> data_type_adapt, std::shared_ptr<GNSSBlockInterface> in_filt,
std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : std::shared_ptr<GNSSBlockInterface> res, std::string role, std::string implementation) : data_type_adapt_(data_type_adapt),
data_type_adapt_(data_type_adapt), in_filt_(in_filt),
in_filt_(in_filt), res_(res), role_(role), implementation_(implementation) res_(res),
role_(role),
implementation_(implementation)
{ {
connected_ = false; connected_ = false;
if(configuration){ }; if (configuration)
{
};
} }
// Destructor // Destructor
SignalConditioner::~SignalConditioner() SignalConditioner::~SignalConditioner() {}
{}
void SignalConditioner::connect(gr::top_block_sptr top_block) void SignalConditioner::connect(gr::top_block_sptr top_block)
@ -102,4 +105,3 @@ gr::basic_block_sptr SignalConditioner::get_right_block()
{ {
return res_->get_right_block(); return res_->get_right_block();
} }

View File

@ -36,9 +36,7 @@
using google::LogMessage; using google::LogMessage;
ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role, ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
std::string default_input_item_type = "byte"; std::string default_input_item_type = "byte";
std::string default_output_item_type = "short"; std::string default_output_item_type = "short";
@ -66,7 +64,8 @@ ByteToShort::ByteToShort(ConfigurationInterface* configuration, std::string role
ByteToShort::~ByteToShort() ByteToShort::~ByteToShort()
{} {
}
void ByteToShort::connect(gr::top_block_sptr top_block) void ByteToShort::connect(gr::top_block_sptr top_block)
@ -91,16 +90,13 @@ void ByteToShort::disconnect(gr::top_block_sptr top_block)
} }
gr::basic_block_sptr ByteToShort::get_left_block() gr::basic_block_sptr ByteToShort::get_left_block()
{ {
return gr_char_to_short_; return gr_char_to_short_;
} }
gr::basic_block_sptr ByteToShort::get_right_block() gr::basic_block_sptr ByteToShort::get_right_block()
{ {
return gr_char_to_short_; return gr_char_to_short_;
} }

View File

@ -37,9 +37,7 @@
using google::LogMessage; using google::LogMessage;
IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, std::string role, IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
std::string default_input_item_type = "byte"; std::string default_input_item_type = "byte";
std::string default_output_item_type = "lv_8sc_t"; std::string default_output_item_type = "lv_8sc_t";
@ -72,7 +70,8 @@ IbyteToCbyte::IbyteToCbyte(ConfigurationInterface* configuration, std::string ro
IbyteToCbyte::~IbyteToCbyte() IbyteToCbyte::~IbyteToCbyte()
{} {
}
void IbyteToCbyte::connect(gr::top_block_sptr top_block) void IbyteToCbyte::connect(gr::top_block_sptr top_block)

View File

@ -35,9 +35,7 @@
using google::LogMessage; using google::LogMessage;
IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, std::string role, IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
std::string default_input_item_type = "byte"; std::string default_input_item_type = "byte";
std::string default_output_item_type = "gr_complex"; std::string default_output_item_type = "gr_complex";
@ -70,7 +68,8 @@ IbyteToComplex::IbyteToComplex(ConfigurationInterface* configuration, std::strin
IbyteToComplex::~IbyteToComplex() IbyteToComplex::~IbyteToComplex()
{} {
}
void IbyteToComplex::connect(gr::top_block_sptr top_block) void IbyteToComplex::connect(gr::top_block_sptr top_block)

View File

@ -38,9 +38,7 @@
using google::LogMessage; using google::LogMessage;
IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, std::string role, IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
std::string default_input_item_type = "byte"; std::string default_input_item_type = "byte";
std::string default_output_item_type = "cshort"; std::string default_output_item_type = "cshort";
@ -73,7 +71,8 @@ IbyteToCshort::IbyteToCshort(ConfigurationInterface* configuration, std::string
IbyteToCshort::~IbyteToCshort() IbyteToCshort::~IbyteToCshort()
{} {
}
void IbyteToCshort::connect(gr::top_block_sptr top_block) void IbyteToCshort::connect(gr::top_block_sptr top_block)

View File

@ -35,9 +35,7 @@
using google::LogMessage; using google::LogMessage;
IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::string role, IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
std::string default_input_item_type = "short"; std::string default_input_item_type = "short";
std::string default_output_item_type = "gr_complex"; std::string default_output_item_type = "gr_complex";
@ -70,7 +68,8 @@ IshortToComplex::IshortToComplex(ConfigurationInterface* configuration, std::str
IshortToComplex::~IshortToComplex() IshortToComplex::~IshortToComplex()
{} {
}
void IshortToComplex::connect(gr::top_block_sptr top_block) void IshortToComplex::connect(gr::top_block_sptr top_block)

View File

@ -37,9 +37,7 @@
using google::LogMessage; using google::LogMessage;
IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, std::string role, IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
std::string default_input_item_type = "short"; std::string default_input_item_type = "short";
std::string default_output_item_type = "cshort"; std::string default_output_item_type = "cshort";
@ -72,7 +70,8 @@ IshortToCshort::IshortToCshort(ConfigurationInterface* configuration, std::strin
IshortToCshort::~IshortToCshort() IshortToCshort::~IshortToCshort()
{} {
}
void IshortToCshort::connect(gr::top_block_sptr top_block) void IshortToCshort::connect(gr::top_block_sptr top_block)

View File

@ -40,7 +40,6 @@ interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte()
} }
interleaved_byte_to_complex_byte::interleaved_byte_to_complex_byte() : sync_decimator("interleaved_byte_to_complex_byte", interleaved_byte_to_complex_byte::interleaved_byte_to_complex_byte() : sync_decimator("interleaved_byte_to_complex_byte",
gr::io_signature::make(1, 1, sizeof(int8_t)), gr::io_signature::make(1, 1, sizeof(int8_t)),
gr::io_signature::make(1, 1, sizeof(lv_8sc_t)), // lv_8sc_t is a Volk's typedef for std::complex<signed char> gr::io_signature::make(1, 1, sizeof(lv_8sc_t)), // lv_8sc_t is a Volk's typedef for std::complex<signed char>

View File

@ -49,6 +49,7 @@ class interleaved_byte_to_complex_byte : public gr::sync_decimator
{ {
private: private:
friend interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte(); friend interleaved_byte_to_complex_byte_sptr make_interleaved_byte_to_complex_byte();
public: public:
interleaved_byte_to_complex_byte(); interleaved_byte_to_complex_byte();

View File

@ -40,7 +40,6 @@ interleaved_byte_to_complex_short_sptr make_interleaved_byte_to_complex_short()
} }
interleaved_byte_to_complex_short::interleaved_byte_to_complex_short() : sync_decimator("interleaved_byte_to_complex_short", interleaved_byte_to_complex_short::interleaved_byte_to_complex_short() : sync_decimator("interleaved_byte_to_complex_short",
gr::io_signature::make(1, 1, sizeof(int8_t)), gr::io_signature::make(1, 1, sizeof(int8_t)),
gr::io_signature::make(1, 1, sizeof(lv_16sc_t)), // lv_16sc_t is a Volk's typedef for std::complex<short int> gr::io_signature::make(1, 1, sizeof(lv_16sc_t)), // lv_16sc_t is a Volk's typedef for std::complex<short int>

View File

@ -48,6 +48,7 @@ class interleaved_byte_to_complex_short : public gr::sync_decimator
{ {
private: private:
friend interleaved_byte_to_complex_short_sptr make_interleaved_byte_to_complex_short(); friend interleaved_byte_to_complex_short_sptr make_interleaved_byte_to_complex_short();
public: public:
interleaved_byte_to_complex_short(); interleaved_byte_to_complex_short();

View File

@ -40,7 +40,6 @@ interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short(
} }
interleaved_short_to_complex_short::interleaved_short_to_complex_short() : sync_decimator("interleaved_short_to_complex_short", interleaved_short_to_complex_short::interleaved_short_to_complex_short() : sync_decimator("interleaved_short_to_complex_short",
gr::io_signature::make(1, 1, sizeof(int16_t)), gr::io_signature::make(1, 1, sizeof(int16_t)),
gr::io_signature::make(1, 1, sizeof(lv_16sc_t)), // lv_16sc_t is a Volk's typedef for std::complex<short int> gr::io_signature::make(1, 1, sizeof(lv_16sc_t)), // lv_16sc_t is a Volk's typedef for std::complex<short int>

View File

@ -48,6 +48,7 @@ class interleaved_short_to_complex_short : public gr::sync_decimator
{ {
private: private:
friend interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short(); friend interleaved_short_to_complex_short_sptr make_interleaved_short_to_complex_short();
public: public:
interleaved_short_to_complex_short(); interleaved_short_to_complex_short();

View File

@ -39,8 +39,7 @@ using google::LogMessage;
BeamformerFilter::BeamformerFilter( BeamformerFilter::BeamformerFilter(
ConfigurationInterface* configuration, std::string role, ConfigurationInterface* configuration, std::string role,
unsigned int in_stream, unsigned int out_stream) : unsigned int in_stream, unsigned int out_stream) : role_(role), in_stream_(in_stream), out_stream_(out_stream)
role_(role), in_stream_(in_stream), out_stream_(out_stream)
{ {
std::string default_item_type = "gr_complex"; std::string default_item_type = "gr_complex";
std::string default_dump_file = "./data/input_filter.dat"; std::string default_dump_file = "./data/input_filter.dat";
@ -55,7 +54,6 @@ BeamformerFilter::BeamformerFilter(
beamformer_ = make_beamformer(); beamformer_ = make_beamformer();
DLOG(INFO) << "Item size " << item_size_; DLOG(INFO) << "Item size " << item_size_;
DLOG(INFO) << "resampler(" << beamformer_->unique_id() << ")"; DLOG(INFO) << "resampler(" << beamformer_->unique_id() << ")";
} }
else else
{ {
@ -76,7 +74,6 @@ BeamformerFilter::BeamformerFilter(
BeamformerFilter::~BeamformerFilter() {} BeamformerFilter::~BeamformerFilter() {}
void BeamformerFilter::connect(gr::top_block_sptr top_block) void BeamformerFilter::connect(gr::top_block_sptr top_block)
{ {
if (dump_) if (dump_)

View File

@ -40,14 +40,11 @@
using google::LogMessage; using google::LogMessage;
FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role, FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
size_t item_size; size_t item_size;
(*this).init(); (*this).init();
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(1, taps_); fir_filter_ccf_ = gr::filter::fir_filter_ccf::make(1, taps_);
@ -58,8 +55,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str()); file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
item_size = sizeof(lv_16sc_t); item_size = sizeof(lv_16sc_t);
cshort_to_float_x2_ = make_cshort_to_float_x2(); cshort_to_float_x2_ = make_cshort_to_float_x2();
@ -76,8 +72,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str()); file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
cshort_to_float_x2_ = make_cshort_to_float_x2(); cshort_to_float_x2_ = make_cshort_to_float_x2();
@ -93,8 +88,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
@ -112,8 +106,7 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str()); file_sink_ = gr::blocks::file_sink::make(item_size, dump_filename_.c_str());
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
item_size = sizeof(lv_8sc_t); item_size = sizeof(lv_8sc_t);
cbyte_to_float_x2_ = make_complex_byte_to_float_x2(); cbyte_to_float_x2_ = make_complex_byte_to_float_x2();
@ -141,16 +134,14 @@ FirFilter::FirFilter(ConfigurationInterface* configuration, std::string role,
} }
FirFilter::~FirFilter() FirFilter::~FirFilter()
{} {
}
void FirFilter::connect(gr::top_block_sptr top_block) void FirFilter::connect(gr::top_block_sptr top_block)
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
@ -161,8 +152,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
DLOG(INFO) << "Nothing to connect internally"; DLOG(INFO) << "Nothing to connect internally";
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0); top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0); top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -175,8 +165,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(short_x2_to_cshort_, 0, file_sink_, 0); top_block->connect(short_x2_to_cshort_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
top_block->connect(cbyte_to_float_x2_, 0, fir_filter_fff_1_, 0); top_block->connect(cbyte_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cbyte_to_float_x2_, 1, fir_filter_fff_2_, 0); top_block->connect(cbyte_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -187,8 +176,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(float_to_complex_, 0, file_sink_, 0); top_block->connect(float_to_complex_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
top_block->connect(cbyte_to_float_x2_, 0, fir_filter_fff_1_, 0); top_block->connect(cbyte_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cbyte_to_float_x2_, 1, fir_filter_fff_2_, 0); top_block->connect(cbyte_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -201,8 +189,7 @@ void FirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(char_x2_cbyte_, 0, file_sink_, 0); top_block->connect(char_x2_cbyte_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0); top_block->connect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0); top_block->connect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -220,19 +207,16 @@ void FirFilter::connect(gr::top_block_sptr top_block)
} }
void FirFilter::disconnect(gr::top_block_sptr top_block) void FirFilter::disconnect(gr::top_block_sptr top_block)
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->disconnect(fir_filter_ccf_, 0, file_sink_, 0); top_block->disconnect(fir_filter_ccf_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
top_block->disconnect(fir_filter_fff_2_, 0, float_to_complex_, 1); top_block->disconnect(fir_filter_fff_2_, 0, float_to_complex_, 1);
top_block->disconnect(fir_filter_fff_1_, 0, float_to_complex_, 0); top_block->disconnect(fir_filter_fff_1_, 0, float_to_complex_, 0);
@ -243,8 +227,7 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(float_to_complex_, 0, file_sink_, 0); top_block->disconnect(float_to_complex_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0); top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0); top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -257,8 +240,7 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0); top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
top_block->disconnect(float_to_char_2_, 0, char_x2_cbyte_, 1); top_block->disconnect(float_to_char_2_, 0, char_x2_cbyte_, 1);
top_block->disconnect(float_to_char_1_, 0, char_x2_cbyte_, 0); top_block->disconnect(float_to_char_1_, 0, char_x2_cbyte_, 0);
@ -271,8 +253,7 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(char_x2_cbyte_, 0, file_sink_, 0); top_block->disconnect(char_x2_cbyte_, 0, file_sink_, 0);
} }
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0); top_block->disconnect(cshort_to_float_x2_, 0, fir_filter_fff_1_, 0);
top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0); top_block->disconnect(cshort_to_float_x2_, 1, fir_filter_fff_2_, 0);
@ -290,31 +271,25 @@ void FirFilter::disconnect(gr::top_block_sptr top_block)
} }
gr::basic_block_sptr FirFilter::get_left_block() gr::basic_block_sptr FirFilter::get_left_block()
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return fir_filter_ccf_; return fir_filter_ccf_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
return cshort_to_float_x2_; return cshort_to_float_x2_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return cbyte_to_float_x2_; return cbyte_to_float_x2_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
return cbyte_to_float_x2_; return cbyte_to_float_x2_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return cshort_to_float_x2_; return cshort_to_float_x2_;
} }
@ -326,31 +301,25 @@ gr::basic_block_sptr FirFilter::get_left_block()
} }
gr::basic_block_sptr FirFilter::get_right_block() gr::basic_block_sptr FirFilter::get_right_block()
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return fir_filter_ccf_; return fir_filter_ccf_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
return short_x2_to_cshort_; return short_x2_to_cshort_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return float_to_complex_; return float_to_complex_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cbyte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
return char_x2_cbyte_; return char_x2_cbyte_;
} }
else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("cshort") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return float_to_complex_; return float_to_complex_;
} }
@ -362,7 +331,6 @@ gr::basic_block_sptr FirFilter::get_right_block()
} }
void FirFilter::init() void FirFilter::init()
{ {
std::string default_input_item_type = "gr_complex"; std::string default_input_item_type = "gr_complex";

View File

@ -41,9 +41,7 @@
using google::LogMessage; using google::LogMessage;
FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration, std::string role, FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
size_t item_size; size_t item_size;
(*this).init(); (*this).init();
@ -51,32 +49,28 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
int default_decimation_factor = 1; int default_decimation_factor = 1;
decimation_factor = config_->property(role_ + ".decimation_factor", default_decimation_factor); decimation_factor = config_->property(role_ + ".decimation_factor", default_decimation_factor);
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); //output item_size = sizeof(gr_complex); //output
input_size_ = sizeof(gr_complex); //input input_size_ = sizeof(gr_complex); //input
freq_xlating_fir_filter_ccf_ = gr::filter::freq_xlating_fir_filter_ccf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_); freq_xlating_fir_filter_ccf_ = gr::filter::freq_xlating_fir_filter_ccf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_ccf_->unique_id() << ")"; DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_ccf_->unique_id() << ")";
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
input_size_ = sizeof(float); //input input_size_ = sizeof(float); //input
freq_xlating_fir_filter_fcf_ = gr::filter::freq_xlating_fir_filter_fcf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_); freq_xlating_fir_filter_fcf_ = gr::filter::freq_xlating_fir_filter_fcf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_fcf_->unique_id() << ")"; DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_fcf_->unique_id() << ")";
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
input_size_ = sizeof(int16_t); //input input_size_ = sizeof(int16_t); //input
freq_xlating_fir_filter_scf_ = gr::filter::freq_xlating_fir_filter_scf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_); freq_xlating_fir_filter_scf_ = gr::filter::freq_xlating_fir_filter_scf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_scf_->unique_id() << ")"; DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_scf_->unique_id() << ")";
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
item_size = sizeof(lv_16sc_t); item_size = sizeof(lv_16sc_t);
input_size_ = sizeof(int16_t); //input input_size_ = sizeof(int16_t); //input
@ -87,8 +81,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
float_to_short_2_ = gr::blocks::float_to_short::make(); float_to_short_2_ = gr::blocks::float_to_short::make();
short_x2_to_cshort_ = make_short_x2_to_cshort(); short_x2_to_cshort_ = make_short_x2_to_cshort();
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
item_size = sizeof(gr_complex); item_size = sizeof(gr_complex);
input_size_ = sizeof(int8_t); //input input_size_ = sizeof(int8_t); //input
@ -96,8 +89,7 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
freq_xlating_fir_filter_scf_ = gr::filter::freq_xlating_fir_filter_scf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_); freq_xlating_fir_filter_scf_ = gr::filter::freq_xlating_fir_filter_scf::make(decimation_factor, taps_, intermediate_freq_, sampling_freq_);
DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_scf_->unique_id() << ")"; DLOG(INFO) << "input_filter(" << freq_xlating_fir_filter_scf_->unique_id() << ")";
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
item_size = sizeof(lv_8sc_t); item_size = sizeof(lv_8sc_t);
input_size_ = sizeof(int8_t); //input input_size_ = sizeof(int8_t); //input
@ -122,40 +114,35 @@ FreqXlatingFirFilter::FreqXlatingFirFilter(ConfigurationInterface* configuration
} }
FreqXlatingFirFilter::~FreqXlatingFirFilter() FreqXlatingFirFilter::~FreqXlatingFirFilter()
{} {
}
void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block) void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->connect(freq_xlating_fir_filter_ccf_, 0, file_sink_, 0); top_block->connect(freq_xlating_fir_filter_ccf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->connect(freq_xlating_fir_filter_fcf_, 0, file_sink_, 0); top_block->connect(freq_xlating_fir_filter_fcf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->connect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0); top_block->connect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
top_block->connect(freq_xlating_fir_filter_scf_, 0, complex_to_float_, 0); top_block->connect(freq_xlating_fir_filter_scf_, 0, complex_to_float_, 0);
top_block->connect(complex_to_float_, 0, float_to_short_1_, 0); top_block->connect(complex_to_float_, 0, float_to_short_1_, 0);
@ -167,8 +154,7 @@ void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(short_x2_to_cshort_, 0, file_sink_, 0); top_block->connect(short_x2_to_cshort_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
top_block->connect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0); top_block->connect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
if (dump_) if (dump_)
@ -176,8 +162,7 @@ void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
top_block->connect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0); top_block->connect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
top_block->connect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0); top_block->connect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
top_block->connect(freq_xlating_fir_filter_scf_, 0, complex_to_complex_byte_, 0); top_block->connect(freq_xlating_fir_filter_scf_, 0, complex_to_complex_byte_, 0);
@ -193,35 +178,30 @@ void FreqXlatingFirFilter::connect(gr::top_block_sptr top_block)
} }
void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block) void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->disconnect(freq_xlating_fir_filter_ccf_, 0, file_sink_, 0); top_block->disconnect(freq_xlating_fir_filter_ccf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->disconnect(freq_xlating_fir_filter_fcf_, 0, file_sink_, 0); top_block->disconnect(freq_xlating_fir_filter_fcf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
if (dump_) if (dump_)
{ {
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0); top_block->disconnect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, complex_to_float_, 0); top_block->disconnect(freq_xlating_fir_filter_scf_, 0, complex_to_float_, 0);
top_block->disconnect(complex_to_float_, 0, float_to_short_1_, 0); top_block->disconnect(complex_to_float_, 0, float_to_short_1_, 0);
@ -233,8 +213,7 @@ void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0); top_block->disconnect(short_x2_to_cshort_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
top_block->disconnect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0); top_block->disconnect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
if (dump_) if (dump_)
@ -242,8 +221,7 @@ void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0); top_block->disconnect(freq_xlating_fir_filter_scf_, 0, file_sink_, 0);
} }
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
top_block->disconnect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0); top_block->disconnect(gr_char_to_short_, 0, freq_xlating_fir_filter_scf_, 0);
top_block->disconnect(freq_xlating_fir_filter_scf_, 0, complex_to_complex_byte_, 0); top_block->disconnect(freq_xlating_fir_filter_scf_, 0, complex_to_complex_byte_, 0);
@ -261,33 +239,27 @@ void FreqXlatingFirFilter::disconnect(gr::top_block_sptr top_block)
gr::basic_block_sptr FreqXlatingFirFilter::get_left_block() gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_ccf_; return freq_xlating_fir_filter_ccf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_fcf_; return freq_xlating_fir_filter_fcf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_scf_; return freq_xlating_fir_filter_scf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
return freq_xlating_fir_filter_scf_; return freq_xlating_fir_filter_scf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return gr_char_to_short_; return gr_char_to_short_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
return gr_char_to_short_; return gr_char_to_short_;
} }
@ -301,33 +273,27 @@ gr::basic_block_sptr FreqXlatingFirFilter::get_left_block()
gr::basic_block_sptr FreqXlatingFirFilter::get_right_block() gr::basic_block_sptr FreqXlatingFirFilter::get_right_block()
{ {
if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("gr_complex") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_ccf_; return freq_xlating_fir_filter_ccf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("float") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_fcf_; return freq_xlating_fir_filter_fcf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_scf_; return freq_xlating_fir_filter_scf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("short") == 0) && (output_item_type_.compare("cshort") == 0))
&& (output_item_type_.compare("cshort") == 0))
{ {
return short_x2_to_cshort_; return short_x2_to_cshort_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("gr_complex") == 0))
&& (output_item_type_.compare("gr_complex") == 0))
{ {
return freq_xlating_fir_filter_scf_; return freq_xlating_fir_filter_scf_;
} }
else if((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) else if ((taps_item_type_.compare("float") == 0) && (input_item_type_.compare("byte") == 0) && (output_item_type_.compare("cbyte") == 0))
&& (output_item_type_.compare("cbyte") == 0))
{ {
return complex_to_complex_byte_; return complex_to_complex_byte_;
} }

View File

@ -39,9 +39,7 @@
using google::LogMessage; using google::LogMessage;
NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role, NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
size_t item_size_; size_t item_size_;
float pfa; float pfa;
@ -71,7 +69,6 @@ NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role
notch_filter_ = make_notch_filter(pfa, p_c_factor, length_, n_segments_est, n_segments_reset); notch_filter_ = make_notch_filter(pfa, p_c_factor, length_, n_segments_est, n_segments_reset);
DLOG(INFO) << "Item size " << item_size_; DLOG(INFO) << "Item size " << item_size_;
DLOG(INFO) << "input filter(" << notch_filter_->unique_id() << ")"; DLOG(INFO) << "input filter(" << notch_filter_->unique_id() << ")";
} }
else else
{ {
@ -88,7 +85,8 @@ NotchFilter::NotchFilter(ConfigurationInterface* configuration, std::string role
NotchFilter::~NotchFilter() NotchFilter::~NotchFilter()
{} {
}
void NotchFilter::connect(gr::top_block_sptr top_block) void NotchFilter::connect(gr::top_block_sptr top_block)

View File

@ -69,7 +69,6 @@ public:
gr::basic_block_sptr get_right_block(); gr::basic_block_sptr get_right_block();
private: private:
bool dump_; bool dump_;
std::string dump_filename_; std::string dump_filename_;
std::string role_; std::string role_;

View File

@ -39,9 +39,7 @@
using google::LogMessage; using google::LogMessage;
NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, std::string role, NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : role_(role), in_streams_(in_streams), out_streams_(out_streams)
role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
size_t item_size_; size_t item_size_;
float p_c_factor; float p_c_factor;
@ -94,7 +92,8 @@ NotchFilterLite::NotchFilterLite(ConfigurationInterface* configuration, std::str
NotchFilterLite::~NotchFilterLite() NotchFilterLite::~NotchFilterLite()
{} {
}
void NotchFilterLite::connect(gr::top_block_sptr top_block) void NotchFilterLite::connect(gr::top_block_sptr top_block)

View File

@ -69,7 +69,6 @@ public:
gr::basic_block_sptr get_right_block(); gr::basic_block_sptr get_right_block();
private: private:
bool dump_; bool dump_;
std::string dump_filename_; std::string dump_filename_;
std::string role_; std::string role_;

View File

@ -39,9 +39,7 @@
using google::LogMessage; using google::LogMessage;
PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration, std::string role, PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration, std::string role,
unsigned int in_streams, unsigned int out_streams) : unsigned int in_streams, unsigned int out_streams) : config_(configuration), role_(role), in_streams_(in_streams), out_streams_(out_streams)
config_(configuration), role_(role), in_streams_(in_streams),
out_streams_(out_streams)
{ {
size_t item_size; size_t item_size;
xlat_ = false; xlat_ = false;
@ -99,10 +97,9 @@ PulseBlankingFilter::PulseBlankingFilter(ConfigurationInterface* configuration,
} }
PulseBlankingFilter::~PulseBlankingFilter() PulseBlankingFilter::~PulseBlankingFilter()
{} {
}
void PulseBlankingFilter::connect(gr::top_block_sptr top_block) void PulseBlankingFilter::connect(gr::top_block_sptr top_block)
@ -126,7 +123,6 @@ void PulseBlankingFilter::connect(gr::top_block_sptr top_block)
} }
void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block) void PulseBlankingFilter::disconnect(gr::top_block_sptr top_block)
{ {
if (input_item_type_.compare("gr_complex") == 0) if (input_item_type_.compare("gr_complex") == 0)

View File

@ -49,7 +49,9 @@ beamformer::beamformer()
{ {
//initialize weight vector //initialize weight vector
if (posix_memalign((void**)&weight_vector, 16, GNSS_SDR_BEAMFORMER_CHANNELS * sizeof(gr_complex)) == 0){}; if (posix_memalign((void **)&weight_vector, 16, GNSS_SDR_BEAMFORMER_CHANNELS * sizeof(gr_complex)) == 0)
{
};
for (int i = 0; i < GNSS_SDR_BEAMFORMER_CHANNELS; i++) for (int i = 0; i < GNSS_SDR_BEAMFORMER_CHANNELS; i++)
{ {

View File

@ -50,7 +50,6 @@ notch_sptr make_notch_filter(float pfa, float p_c_factor,
class Notch : public gr::block class Notch : public gr::block
{ {
private: private:
float pfa; float pfa;
float noise_pow_est; float noise_pow_est;
float thres_; float thres_;
@ -69,7 +68,6 @@ private:
std::unique_ptr<gr::fft::fft_complex> d_fft; std::unique_ptr<gr::fft::fft_complex> d_fft;
public: public:
Notch(float pfa, float p_c_factor, int length_, int n_segments_est, int n_segments_reset); Notch(float pfa, float p_c_factor, int length_, int n_segments_est, int n_segments_reset);
~Notch(); ~Notch();

View File

@ -49,7 +49,6 @@ notch_lite_sptr make_notch_filter_lite(float p_c_factor, float pfa, int length_,
class NotchLite : public gr::block class NotchLite : public gr::block
{ {
private: private:
int length_; int length_;
int n_segments; int n_segments;
int n_segments_est; int n_segments_est;
@ -72,7 +71,6 @@ private:
std::unique_ptr<gr::fft::fft_complex> d_fft; std::unique_ptr<gr::fft::fft_complex> d_fft;
public: public:
NotchLite(float p_c_factor, float pfa, int length_, int n_segments_est, int n_segments_reset, int n_segments_coeff); NotchLite(float p_c_factor, float pfa, int length_, int n_segments_est, int n_segments_reset, int n_segments_coeff);
~NotchLite(); ~NotchLite();

View File

@ -44,7 +44,6 @@ pulse_blanking_cc_sptr make_pulse_blanking_cc(float pfa, int length_, int n_segm
class pulse_blanking_cc : public gr::block class pulse_blanking_cc : public gr::block
{ {
private: private:
int length_; int length_;
int n_segments; int n_segments;
int n_segments_est; int n_segments_est;
@ -57,7 +56,6 @@ private:
gr_complex *zeros_; gr_complex *zeros_;
public: public:
pulse_blanking_cc(float pfa, int length_, int n_segments_est, int n_segments_reset); pulse_blanking_cc(float pfa, int length_, int n_segments_est, int n_segments_reset);
~pulse_blanking_cc(); ~pulse_blanking_cc();
@ -66,7 +64,6 @@ public:
gr_vector_const_void_star &input_items, gr_vector_void_star &output_items); gr_vector_const_void_star &input_items, gr_vector_void_star &output_items);
void forecast(int noutput_items, gr_vector_int &ninput_items_required); void forecast(int noutput_items, gr_vector_int &ninput_items_required);
}; };
#endif #endif

View File

@ -41,9 +41,9 @@ set(GNSS_SPLIBS_SOURCES
if(OPENCL_FOUND) if(OPENCL_FOUND)
set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES} set(GNSS_SPLIBS_SOURCES ${GNSS_SPLIBS_SOURCES}
fft_execute.cc # Needs OpenCL opencl/fft_execute.cc # Needs OpenCL
fft_setup.cc # Needs OpenCL opencl/fft_setup.cc # Needs OpenCL
fft_kernelstring.cc # Needs OpenCL opencl/fft_kernelstring.cc # Needs OpenCL
) )
endif(OPENCL_FOUND) endif(OPENCL_FOUND)

View File

@ -40,7 +40,6 @@ byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte()
} }
byte_x2_to_complex_byte::byte_x2_to_complex_byte() : sync_block("byte_x2_to_complex_byte", byte_x2_to_complex_byte::byte_x2_to_complex_byte() : sync_block("byte_x2_to_complex_byte",
gr::io_signature::make(2, 2, sizeof(int8_t)), // int8_t, defined in stdint.h and included in volk.h (signed char) gr::io_signature::make(2, 2, sizeof(int8_t)), // int8_t, defined in stdint.h and included in volk.h (signed char)
gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char> gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char>

View File

@ -49,6 +49,7 @@ class byte_x2_to_complex_byte : public gr::sync_block
{ {
private: private:
friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte(); friend byte_x2_to_complex_byte_sptr make_byte_x2_to_complex_byte();
public: public:
byte_x2_to_complex_byte(); byte_x2_to_complex_byte();

View File

@ -40,7 +40,6 @@ complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2()
} }
complex_byte_to_float_x2::complex_byte_to_float_x2() : sync_block("complex_byte_to_float_x2", complex_byte_to_float_x2::complex_byte_to_float_x2() : sync_block("complex_byte_to_float_x2",
gr::io_signature::make(1, 1, sizeof(lv_8sc_t)), // lv_8sc_t is a Volk's typedef for std::complex<signed char> gr::io_signature::make(1, 1, sizeof(lv_8sc_t)), // lv_8sc_t is a Volk's typedef for std::complex<signed char>
gr::io_signature::make(2, 2, sizeof(float))) gr::io_signature::make(2, 2, sizeof(float)))

View File

@ -49,6 +49,7 @@ class complex_byte_to_float_x2 : public gr::sync_block
{ {
private: private:
friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2(); friend complex_byte_to_float_x2_sptr make_complex_byte_to_float_x2();
public: public:
complex_byte_to_float_x2(); complex_byte_to_float_x2();

View File

@ -40,7 +40,6 @@ complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte()
} }
complex_float_to_complex_byte::complex_float_to_complex_byte() : sync_block("complex_float_to_complex_byte", complex_float_to_complex_byte::complex_float_to_complex_byte() : sync_block("complex_float_to_complex_byte",
gr::io_signature::make(1, 1, sizeof(gr_complex)), gr::io_signature::make(1, 1, sizeof(gr_complex)),
gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char> gr::io_signature::make(1, 1, sizeof(lv_8sc_t))) // lv_8sc_t is a Volk's typedef for std::complex<signed char>

View File

@ -47,6 +47,7 @@ class complex_float_to_complex_byte : public gr::sync_block
{ {
private: private:
friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte(); friend complex_float_to_complex_byte_sptr make_complex_float_to_complex_byte();
public: public:
complex_float_to_complex_byte(); complex_float_to_complex_byte();

View File

@ -48,6 +48,7 @@ class conjugate_cc : public gr::sync_block
{ {
private: private:
friend conjugate_cc_sptr make_conjugate_cc(); friend conjugate_cc_sptr make_conjugate_cc();
public: public:
conjugate_cc(); conjugate_cc();

Some files were not shown because too many files have changed in this diff Show More