mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-28 18:04:51 +00:00
Fix kernel
This commit is contained in:
parent
d8f1e4b437
commit
41036c1538
@ -102,9 +102,9 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g
|
||||
#endif
|
||||
}
|
||||
tmp32_1 = *in_common++ * (*phase);
|
||||
|
||||
phase_doppler *= phase_inc;
|
||||
phase_doppler_rate = cpowf(phase_inc_rate, lv_cmake(n * n, 0.0f));
|
||||
phase_doppler_rate /= hypotf(lv_creal(phase_doppler_rate), lv_cimag(phase_doppler_rate));
|
||||
(*phase) = phase_doppler * phase_doppler_rate;
|
||||
|
||||
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||
@ -117,11 +117,13 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g
|
||||
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic_acc(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
||||
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic_arg(lv_32fc_t* result, const lv_32fc_t* in_common, const lv_32fc_t phase_inc, const lv_32fc_t phase_inc_rate, lv_32fc_t* phase, const float** in_a, int num_a_vectors, unsigned int num_points)
|
||||
{
|
||||
lv_32fc_t tmp32_1 = lv_cmake(0.0f, 0.0f);
|
||||
lv_32fc_t phase_rate_acc = lv_cmake(1.0f, 0.0f);
|
||||
lv_32fc_t tmp32_1;
|
||||
lv_32fc_t phase_doppler_rate = lv_cmake(1.0f, 0.0f);
|
||||
lv_32fc_t phase_doppler = (*phase);
|
||||
int n_vec;
|
||||
const float arga = cargf(phase_inc_rate);
|
||||
unsigned int n;
|
||||
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||
{
|
||||
@ -138,8 +140,12 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_g
|
||||
(*phase) /= hypotf(lv_creal(*phase), lv_cimag(*phase));
|
||||
#endif
|
||||
}
|
||||
phase_rate_acc += phase_inc_rate;
|
||||
(*phase) *= lv_cmake(cosf(phase_rate_acc), sinf(phase_rate_acc));
|
||||
tmp32_1 = *in_common++ * (*phase);
|
||||
phase_doppler *= phase_inc;
|
||||
const float theta = (float)(n * n) * arga;
|
||||
phase_doppler_rate = lv_cmake(cosf(theta), sinf(theta));
|
||||
(*phase) = phase_doppler * phase_doppler_rate;
|
||||
|
||||
for (n_vec = 0; n_vec < num_a_vectors; n_vec++)
|
||||
{
|
||||
result[n_vec] += (tmp32_1 * in_a[n_vec][n]);
|
||||
|
@ -49,11 +49,11 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32
|
||||
float rem_carrier_phase_in_rad = 0.25;
|
||||
float phase_step_rad = 0.1;
|
||||
lv_32fc_t phase[1];
|
||||
phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
|
||||
phase[0] = lv_cmake(cosf(rem_carrier_phase_in_rad), sinf(rem_carrier_phase_in_rad));
|
||||
lv_32fc_t phase_inc[1];
|
||||
phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
|
||||
phase_inc[0] = lv_cmake(cosf(phase_step_rad), sinf(phase_step_rad));
|
||||
lv_32fc_t phase_inc_rate[1];
|
||||
phase_inc_rate[0] = lv_cmake(cos(phase_step_rad * 0.001), sin(phase_step_rad * 0.001));
|
||||
phase_inc_rate[0] = lv_cmake(cosf(phase_step_rad * 0.001), sinf(phase_step_rad * 0.001));
|
||||
int n;
|
||||
int num_a_vectors = 3;
|
||||
float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
||||
@ -74,17 +74,17 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32
|
||||
#endif // Generic
|
||||
|
||||
#ifdef LV_HAVE_GENERIC
|
||||
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_generic_acc(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
|
||||
static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32fc_generic_arg(lv_32fc_t* result, const lv_32fc_t* local_code, const float* in, unsigned int num_points)
|
||||
{
|
||||
// phases must be normalized. Phase rotator expects a complex exponential input!
|
||||
float rem_carrier_phase_in_rad = 0.25;
|
||||
float phase_step_rad = 0.1;
|
||||
lv_32fc_t phase[1];
|
||||
phase[0] = lv_cmake(cos(rem_carrier_phase_in_rad), sin(rem_carrier_phase_in_rad));
|
||||
phase[0] = lv_cmake(cosf(rem_carrier_phase_in_rad), sinf(rem_carrier_phase_in_rad));
|
||||
lv_32fc_t phase_inc[1];
|
||||
phase_inc[0] = lv_cmake(cos(phase_step_rad), sin(phase_step_rad));
|
||||
phase_inc[0] = lv_cmake(cosf(phase_step_rad), sinf(phase_step_rad));
|
||||
lv_32fc_t phase_inc_rate[1];
|
||||
phase_inc_rate[0] = lv_cmake(cos(phase_step_rad * 0.001), sin(phase_step_rad * 0.001));
|
||||
phase_inc_rate[0] = lv_cmake(cosf(phase_step_rad * 0.001), sinf(phase_step_rad * 0.001));
|
||||
int n;
|
||||
int num_a_vectors = 3;
|
||||
float** in_a = (float**)volk_gnsssdr_malloc(sizeof(float*) * num_a_vectors, volk_gnsssdr_get_alignment());
|
||||
@ -94,7 +94,7 @@ static inline void volk_gnsssdr_32fc_32f_high_dynamic_rotator_dotprodxnpuppet_32
|
||||
memcpy((float*)in_a[n], (float*)in, sizeof(float) * num_points);
|
||||
}
|
||||
|
||||
volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic_acc(result, local_code, phase_inc[0], phase_inc_rate[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
||||
volk_gnsssdr_32fc_32f_high_dynamic_rotator_dot_prod_32fc_xn_generic_arg(result, local_code, phase_inc[0], phase_inc_rate[0], phase, (const float**)in_a, num_a_vectors, num_points);
|
||||
|
||||
for (n = 0; n < num_a_vectors; n++)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user