[修改]修改了错误的exporter名称

This commit is contained in:
makotocc0107
2024-09-04 09:51:10 +08:00
committed by Coding
parent 211a89778c
commit d93daaab6b
37 changed files with 0 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
//
// Created by baiguwen on 2022/4/23.
//
#include "periodic_interference.h"
#include <math.h>
#include <numbers>
#include <random>
void periodic_interference::set_config(const nlohmann::json &config) {
try {
eval_time_ = 0;
amplitude_ = jsonValue(config, "PERIODIC_INTERFERENCE_AMPLITUDE");
amplitude_base_ = jsonValue(config, "PERIODIC_INTERFERENCE_AMPLITUDE_BASE");
cycle_ = jsonValue(config, "CYCLE_");
config_ = config;
} catch (...) {
}
}
nlohmann::json periodic_interference::config() {
return config_;
}
double periodic_interference::eval(double value) {
return value + amplitude_base_ * sin((2 * std::numbers::pi / cycle_) * eval_time_++) + amplitude_;
}