mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-07 07:50:32 +00:00
Fixing some problems with Boost round (works in darwin) and std::round (works in linux gcc). Also fixing building problems
git-svn-id: https://svn.code.sf.net/p/gnss-sdr/code/trunk@95 64b25241-fba3-4117-9849-534c7e92360d
This commit is contained in:
parent
baebfd96be
commit
181596a55e
@ -34,13 +34,10 @@
|
|||||||
#include "gps_sdr_fft.h"
|
#include "gps_sdr_fft.h"
|
||||||
#include "gps_sdr_prn_codes_short.h"
|
#include "gps_sdr_prn_codes_short.h"
|
||||||
#include "control_message_factory.h"
|
#include "control_message_factory.h"
|
||||||
|
#include "gps_sdr_x86.h"
|
||||||
#ifdef NO_SIMD
|
#ifndef NO_SIMD
|
||||||
#include "gps_sdr_x86.h"
|
|
||||||
#else
|
|
||||||
#include "gps_sdr_simd.h"
|
#include "gps_sdr_simd.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <gnuradio/gr_io_signature.h>
|
#include <gnuradio/gr_io_signature.h>
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
@ -183,15 +180,13 @@ int gps_l1_ca_gps_sdr_acquisition_ss::general_work(int noutput_items,
|
|||||||
<< " bytes into buffer (" << d_fft_size << " samples)";
|
<< " bytes into buffer (" << d_fft_size << " samples)";
|
||||||
memcpy(d_baseband_signal, in, d_fft_size * sizeof(CPX));
|
memcpy(d_baseband_signal, in, d_fft_size * sizeof(CPX));
|
||||||
#ifdef NO_SIMD
|
#ifdef NO_SIMD
|
||||||
x86_cmulsc(d_baseband_signal, d_sine_250,
|
x86_cmulsc(d_baseband_signal, d_sine_250,
|
||||||
&d_baseband_signal[d_fft_size], d_fft_size, 14);
|
&d_baseband_signal[d_fft_size], d_fft_size, 14);
|
||||||
x86_cmulsc(d_baseband_signal, d_sine_500, &d_baseband_signal[2
|
x86_cmulsc(d_baseband_signal, d_sine_500, &d_baseband_signal[2
|
||||||
* d_fft_size], d_fft_size, 14);
|
* d_fft_size], d_fft_size, 14);
|
||||||
x86_cmulsc(d_baseband_signal, d_sine_750, &d_baseband_signal[3
|
x86_cmulsc(d_baseband_signal, d_sine_750, &d_baseband_signal[3
|
||||||
* d_fft_size], d_fft_size, 14);
|
* d_fft_size], d_fft_size, 14);
|
||||||
|
|
||||||
x86_cmuls(d_baseband_signal, d_sine_if, d_fft_size, 14);
|
x86_cmuls(d_baseband_signal, d_sine_if, d_fft_size, 14);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
sse_cmulsc(d_baseband_signal, d_sine_250,
|
sse_cmulsc(d_baseband_signal, d_sine_250,
|
||||||
&d_baseband_signal[d_fft_size], d_fft_size, 14);
|
&d_baseband_signal[d_fft_size], d_fft_size, 14);
|
||||||
@ -199,7 +194,6 @@ int gps_l1_ca_gps_sdr_acquisition_ss::general_work(int noutput_items,
|
|||||||
* d_fft_size], d_fft_size, 14);
|
* d_fft_size], d_fft_size, 14);
|
||||||
sse_cmulsc(d_baseband_signal, d_sine_750, &d_baseband_signal[3
|
sse_cmulsc(d_baseband_signal, d_sine_750, &d_baseband_signal[3
|
||||||
* d_fft_size], d_fft_size, 14);
|
* d_fft_size], d_fft_size, 14);
|
||||||
|
|
||||||
sse_cmuls(d_baseband_signal, d_sine_if, d_fft_size, 14);
|
sse_cmuls(d_baseband_signal, d_sine_if, d_fft_size, 14);
|
||||||
#endif
|
#endif
|
||||||
for (unsigned int i = 0; i < d_doppler_resolution; i++)
|
for (unsigned int i = 0; i < d_doppler_resolution; i++)
|
||||||
@ -227,14 +221,12 @@ int gps_l1_ca_gps_sdr_acquisition_ss::general_work(int noutput_items,
|
|||||||
x86_cmulsc(&d_baseband_signal_shift[(j * (d_fft_size + 201))
|
x86_cmulsc(&d_baseband_signal_shift[(j * (d_fft_size + 201))
|
||||||
+ 100 + i], d_fft_codes[d_satellite], buffer,
|
+ 100 + i], d_fft_codes[d_satellite], buffer,
|
||||||
d_fft_size, 10);
|
d_fft_size, 10);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
sse_cmulsc(&d_baseband_signal_shift[(j * (d_fft_size + 201))
|
sse_cmulsc(&d_baseband_signal_shift[(j * (d_fft_size + 201))
|
||||||
+ 100 + i], d_fft_codes[d_satellite], buffer,
|
+ 100 + i], d_fft_codes[d_satellite], buffer,
|
||||||
d_fft_size, 10);
|
d_fft_size, 10);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
d_piFFT->doiFFT(buffer, true);
|
d_piFFT->doiFFT(buffer, true);
|
||||||
x86_cmag(buffer, d_fft_size);
|
x86_cmag(buffer, d_fft_size);
|
||||||
x86_max((unsigned int *)buffer, &indext, &magt, d_fft_size);
|
x86_max((unsigned int *)buffer, &indext, &magt, d_fft_size);
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
project : build-dir ../../../../build ;
|
project : build-dir ../../../../build ;
|
||||||
|
|
||||||
obj gps_l1_ca_gps_sdr_acquisition_cc : gps_l1_ca_gps_sdr_acquisition_cc.cc ;
|
obj gps_l1_ca_gps_sdr_acquisition_cc : gps_l1_ca_gps_sdr_acquisition_cc.cc ;
|
||||||
obj gps_l1_ca_gps_sdr_acquisition_ss : gps_l1_ca_gps_sdr_acquisition_ss.cc : <toolset>darwin:<define>NO_SIMD ;
|
obj gps_l1_ca_gps_sdr_acquisition_ss : gps_l1_ca_gps_sdr_acquisition_ss.cc : <toolset>darwin:<define>NO_SIMD <toolset>gcc:<define>USE_SIMD ;
|
||||||
obj gps_l1_ca_pcps_acquisition_cc : gps_l1_ca_pcps_acquisition_cc.cc ;
|
obj gps_l1_ca_pcps_acquisition_cc : gps_l1_ca_pcps_acquisition_cc.cc ;
|
||||||
obj gps_l1_ca_tong_pcps_acquisition_cc : gps_l1_ca_tong_pcps_acquisition_cc.cc ;
|
obj gps_l1_ca_tong_pcps_acquisition_cc : gps_l1_ca_tong_pcps_acquisition_cc.cc ;
|
||||||
|
@ -20,9 +20,7 @@ write to the:
|
|||||||
|
|
||||||
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
************************************************************************************************/
|
************************************************************************************************/
|
||||||
#ifdef NO_SIMD
|
#ifdef USE_SIMD
|
||||||
#else
|
|
||||||
|
|
||||||
#include "gps_sdr_simd.h"
|
#include "gps_sdr_simd.h"
|
||||||
|
|
||||||
// __asm
|
// __asm
|
||||||
|
@ -3,8 +3,8 @@ project : build-dir ../../../build ;
|
|||||||
obj gps_sdr_signal_processing : gps_sdr_signal_processing.cc ;
|
obj gps_sdr_signal_processing : gps_sdr_signal_processing.cc ;
|
||||||
obj gnss_sdr_valve : gnss_sdr_valve.cc ;
|
obj gnss_sdr_valve : gnss_sdr_valve.cc ;
|
||||||
obj pass_through : pass_through.cc ;
|
obj pass_through : pass_through.cc ;
|
||||||
obj gps_sdr_fft : gps_sdr_fft.cc : <toolset>darwin:<define>NO_SIMD ;
|
obj gps_sdr_fft : gps_sdr_fft.cc : <toolset>darwin:<define>NO_SIMD <toolset>gcc:<define>USE_SIMD ;
|
||||||
obj gps_sdr_simd : gps_sdr_simd.cc : <toolset>darwin:<define>NO_SIMD ;
|
obj gps_sdr_simd : gps_sdr_simd.cc : <toolset>darwin:<define>NO_SIMD <toolset>gcc:<define>USE_SIMD ;
|
||||||
obj gps_sdr_x86 : gps_sdr_x86.cc ;
|
obj gps_sdr_x86 : gps_sdr_x86.cc ;
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
#include "gps_l1_ca_dll_fll_pll_tracking.h"
|
#include "gps_l1_ca_dll_fll_pll_tracking.h"
|
||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include <boost/math/special_functions/round.hpp>
|
#ifdef GNSS_SDR_USE_BOOST_ROUND
|
||||||
|
#include <boost/math/special_functions/round.hpp>
|
||||||
|
#endif
|
||||||
#include <gnuradio/gr_io_signature.h>
|
#include <gnuradio/gr_io_signature.h>
|
||||||
|
|
||||||
#include <glog/log_severity.h>
|
#include <glog/log_severity.h>
|
||||||
@ -84,8 +86,12 @@ GpsL1CaDllFllPllTracking::GpsL1CaDllFllPllTracking(
|
|||||||
std::string default_dump_filename = "./track_ch";
|
std::string default_dump_filename = "./track_ch";
|
||||||
dump_filename = configuration->property(role + ".dump_filename",
|
dump_filename = configuration->property(role + ".dump_filename",
|
||||||
default_dump_filename); //unused!
|
default_dump_filename); //unused!
|
||||||
|
#ifdef USE_BOOST_ROUND
|
||||||
vector_length = round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
vector_length = round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
#else
|
||||||
|
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//################# MAKE TRACKING GNURadio object ###################
|
//################# MAKE TRACKING GNURadio object ###################
|
||||||
if (item_type.compare("gr_complex") == 0)
|
if (item_type.compare("gr_complex") == 0)
|
||||||
|
@ -36,7 +36,9 @@
|
|||||||
#include "gps_l1_ca_dll_pll_tracking.h"
|
#include "gps_l1_ca_dll_pll_tracking.h"
|
||||||
#include "GPS_L1_CA.h"
|
#include "GPS_L1_CA.h"
|
||||||
#include "configuration_interface.h"
|
#include "configuration_interface.h"
|
||||||
#include <boost/math/special_functions/round.hpp>
|
#ifdef GNSS_SDR_USE_BOOST_ROUND
|
||||||
|
#include <boost/math/special_functions/round.hpp>
|
||||||
|
#endif
|
||||||
#include <gnuradio/gr_io_signature.h>
|
#include <gnuradio/gr_io_signature.h>
|
||||||
|
|
||||||
#include <glog/log_severity.h>
|
#include <glog/log_severity.h>
|
||||||
@ -80,9 +82,11 @@ GpsL1CaDllPllTracking::GpsL1CaDllPllTracking(
|
|||||||
std::string default_dump_filename = "./track_ch";
|
std::string default_dump_filename = "./track_ch";
|
||||||
dump_filename = configuration->property(role + ".dump_filename",
|
dump_filename = configuration->property(role + ".dump_filename",
|
||||||
default_dump_filename); //unused!
|
default_dump_filename); //unused!
|
||||||
|
#ifdef GNSS_SDR_USE_BOOST_CONST
|
||||||
vector_length = round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
vector_length = round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
#else
|
||||||
|
vector_length = std::round(fs_in / (GPS_L1_CA_CODE_RATE_HZ / GPS_L1_CA_CODE_LENGTH_CHIPS));
|
||||||
|
#endif
|
||||||
//################# MAKE TRACKING GNURadio object ###################
|
//################# MAKE TRACKING GNURadio object ###################
|
||||||
if (item_type.compare("gr_complex") == 0)
|
if (item_type.compare("gr_complex") == 0)
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project : build-dir ../../../../build ;
|
project : build-dir ../../../../build ;
|
||||||
|
|
||||||
obj gps_l1_ca_dll_pll_tracking : gps_l1_ca_dll_pll_tracking.cc ;
|
obj gps_l1_ca_dll_pll_tracking : gps_l1_ca_dll_pll_tracking.cc : <toolset>darwin:<define>GNSS_SDR_USE_BOOST_ROUND ;
|
||||||
obj gps_l1_ca_dll_fll_pll_tracking : gps_l1_ca_dll_fll_pll_tracking.cc ;
|
obj gps_l1_ca_dll_fll_pll_tracking : gps_l1_ca_dll_fll_pll_tracking.cc : <toolset>darwin:<define>GNSS_SDR_USE_BOOST_ROUND ;
|
||||||
|
@ -16,7 +16,7 @@ exe gnss-sdr : main.cc
|
|||||||
../algorithms/libs//gnss_sdr_valve
|
../algorithms/libs//gnss_sdr_valve
|
||||||
../algorithms/libs//pass_through
|
../algorithms/libs//pass_through
|
||||||
../algorithms/libs//gps_sdr_fft
|
../algorithms/libs//gps_sdr_fft
|
||||||
#../algorithms/libs//gps_sdr_simd
|
../algorithms/libs//gps_sdr_simd
|
||||||
../algorithms/libs//gps_sdr_x86
|
../algorithms/libs//gps_sdr_x86
|
||||||
../algorithms/observables/adapters//gps_l1_ca_observables
|
../algorithms/observables/adapters//gps_l1_ca_observables
|
||||||
../algorithms/observables/gnuradio_blocks//gps_l1_ca_observables_cc
|
../algorithms/observables/gnuradio_blocks//gps_l1_ca_observables_cc
|
||||||
|
Loading…
Reference in New Issue
Block a user