mirror of
https://github.com/AlexandreRouma/SDRPlusPlus.git
synced 2025-02-02 21:04:45 +01:00
added missing files
This commit is contained in:
parent
b16ab3f0c0
commit
d903daa046
12
core/src/dsp/utils/math.h
Normal file
12
core/src/dsp/utils/math.h
Normal file
@ -0,0 +1,12 @@
|
||||
#pragma once
|
||||
#include <math.h>
|
||||
|
||||
#define FL_M_PI 3.1415926535f
|
||||
|
||||
namespace dsp {
|
||||
namespace math {
|
||||
inline float sinc(float omega, float x, float norm) {
|
||||
return (x == 0.0f) ? 1.0f : (sinf(omega*x)/(norm*x));
|
||||
}
|
||||
}
|
||||
}
|
28
core/src/dsp/utils/window_functions.h
Normal file
28
core/src/dsp/utils/window_functions.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
#include <dsp/types.h>
|
||||
|
||||
namespace dsp {
|
||||
namespace window_function {
|
||||
inline float blackman(float n, float N, float alpha = 0.16f) {
|
||||
float a0 = (1.0f-alpha) / 2.0f;
|
||||
float a2 = alpha / 2.0f;
|
||||
return a0 - (0.5f*cosf(2.0f*FL_M_PI*(n/N))) + (a2*cosf(4.0f*FL_M_PI*(n/N)));
|
||||
}
|
||||
|
||||
inline float blackmanThirdOrder(float n, float N, float a0, float a1, float a2, float a3) {
|
||||
return a0 - (a1*cosf(2.0f*FL_M_PI*(n/N))) + (a2*cosf(4.0f*FL_M_PI*(n/N))) - (a3*cosf(6.0f*FL_M_PI*(n/N)));
|
||||
}
|
||||
|
||||
inline float nuttall(float n, float N) {
|
||||
return blackmanThirdOrder(n, N, 0.3635819f, 0.4891775f, 0.1365995f, 0.0106411f);
|
||||
}
|
||||
|
||||
inline float blackmanNuttall(float n, float N) {
|
||||
return blackmanThirdOrder(n, N, 0.3635819f, 0.4891775f, 0.1365995f, 0.0106411f);
|
||||
}
|
||||
|
||||
inline float blackmanHarris(float n, float N) {
|
||||
return blackmanThirdOrder(n, N, 0.35875f, 0.48829f, 0.14128f, 0.01168f);
|
||||
}
|
||||
}
|
||||
}
|
11
root/res/colormaps/websdr.json
Normal file
11
root/res/colormaps/websdr.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"name": "WebSDR",
|
||||
"author": "Ryzerth",
|
||||
"map": [
|
||||
"#000000",
|
||||
"#000050",
|
||||
"#FF00FF",
|
||||
"#FFFF50",
|
||||
"#FFFFFF"
|
||||
]
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user