Q-rover-Kai用計算ライブラリ 使用非推奨 動作未確認 あんまり意味なかった

Qcal.h

Committer:
KOTAROYamamoto
Date:
2017-12-07
Revision:
0:5ed58f4ef4fb

File content as of revision 0:5ed58f4ef4fb:

/***********
*絶対にQ-rover-Kaiを50行以内で動かすという強い気持ち
***********/
#include "mbed.h"
#include <math.h>
#ifndef QCAL_H
#define QCAL_H


class QCal{
    public:
        QCal(float gn,float ge,float lat1,float lon1);
        
        float QCalculate(float X,float Y,float mx,float my);
        float QCalculateRed(float X,float Y,float X2,float Y2);
        
        float an;//理想回転角
        
        float lat1;//緯度一度あたりの距離(m)
        float lon1;//経度一度あたりの距離(m)
  
        float X;//現在地−ゴール間の経度方向距離(m)
        float Y;//現在地−ゴール間の緯度方向距離(m)
  
        float X2;//現在地−ゴール間の経度方向距離(m)
        float Y2;//現在地−ゴール間の緯度方向距離(m)
        
    private:
        float pan;
        float dan;
        
};

float QCalculate(float X,float Y,float mx,float my);
float QCalculateRed(float X,float Y,float X2,float Y2);

#endif