mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
lib/system_identification/signal_generator: change functions to inline functions for optimization
This commit is contained in:
parent
deed375579
commit
74d43c2fee
@ -40,7 +40,7 @@
|
||||
namespace signal_generator
|
||||
{
|
||||
|
||||
float getLinearSineSweep(float f_start, float f_end, float duration, float t)
|
||||
inline float getLinearSineSweep(float f_start, float f_end, float duration, float t)
|
||||
{
|
||||
if (t > duration) {
|
||||
return 0.f;
|
||||
@ -52,7 +52,7 @@ float getLinearSineSweep(float f_start, float f_end, float duration, float t)
|
||||
return sinf(w_start * t + 0.5f * (w_end - w_start) * t * t / duration);
|
||||
}
|
||||
|
||||
float getLogSineSweep(float f_start, float f_end, float duration, float t)
|
||||
inline float getLogSineSweep(float f_start, float f_end, float duration, float t)
|
||||
{
|
||||
if (t > duration) {
|
||||
return 0.f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user