您当前的位置:五五电子网电子知识电子学习基础知识电脑-单片机-自动控制四轴飞行器姿态控制算法注释分析 正文
四轴飞行器姿态控制算法注释分析

四轴飞行器姿态控制算法注释分析

点击数:7899 次   录入时间:03-04 11:54:00   整理:http://www.55dianzi.com   电脑-单片机-自动控制

    pd_ergebnis = DiffRoll + Ki * SummeRoll; // PI-Regler f黵 Roll

    tmp_int = (long)((long)Parameter_DynamicStability * (long)(GasMischanteil + abs

    (GierMischanteil)/2)) / 64;

    if(pd_ergebnis > tmp_int) pd_ergebnis = tmp_int;

    if(pd_ergebnis < -tmp_int) pd_ergebnis = -tmp_int;

    // Motor Links

    motorwert = GasMischanteil + pd_ergebnis - GierMischanteil;

    #define GRENZE Poti1

    if ((motorwert < 0)) motorwert = 0;

    else if(motorwert > MAX_GAS) motorwert = MAX_GAS;

    if (motorwert < MIN_GAS) motorwert = MIN_GAS;

    Motor_Links = motorwert;

    // Motor Rechts

    motorwert = GasMischanteil - pd_ergebnis - GierMischanteil;

    if ((motorwert < 0)) motorwert = 0;

    else if(motorwert > MAX_GAS) motorwert = MAX_GAS;

    if (motorwert < MIN_GAS) motorwert = MIN_GAS;

    Motor_Rechts = motorwert;

    // +++++++++++++++++++++++++++++++++++++++++++++++

    }



上一页  [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] 


本文关键字:飞行器  电脑-单片机-自动控制电子学习 - 基础知识 - 电脑-单片机-自动控制