Наведён порядок в коде
This commit is contained in:
@@ -5,13 +5,13 @@
|
||||
#include "radio_receiver.h"
|
||||
#include "pid.h"
|
||||
|
||||
#define CF_ALPHA 0.99f
|
||||
#define CF_ALPHA 0.99f
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float roll; // deg
|
||||
float pitch; // deg
|
||||
float yaw_rate; // deg/s
|
||||
float roll; // deg
|
||||
float pitch; // deg
|
||||
float yaw_rate; // deg/s
|
||||
} attitude_t;
|
||||
|
||||
void complementary_filter_update(attitude_t* att, const imu_scaled_t* imu);
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#define PI 3.14159265359f
|
||||
#define PI 3.14159265359f
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float b0, b1, b2;
|
||||
float a1, a2;
|
||||
|
||||
float x1, x2;
|
||||
float y1, y2;
|
||||
float b0, b1, b2;
|
||||
float a1, a2;
|
||||
|
||||
float x1, x2;
|
||||
float y1, y2;
|
||||
} biquad_t;
|
||||
|
||||
void biquad_init_lpf(biquad_t* f, float cutoff, float sample_rate);
|
||||
|
||||
@@ -5,19 +5,19 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float kp;
|
||||
float ki;
|
||||
float kd;
|
||||
|
||||
float integral;
|
||||
float prev_error;
|
||||
float kp;
|
||||
float ki;
|
||||
float kd;
|
||||
|
||||
float integral;
|
||||
float prev_error;
|
||||
} pid_t;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
float roll;
|
||||
float pitch;
|
||||
float yaw;
|
||||
float roll;
|
||||
float pitch;
|
||||
float yaw;
|
||||
} control_channels_t;
|
||||
|
||||
float pid_update(pid_t* pid, float error, float gyro_rate, float dt);
|
||||
|
||||
Reference in New Issue
Block a user