Subversion Repositories Projects

Rev

Rev 391 | Rev 442 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

#ifndef COPTER_H
#define COPTER_H
#include <string>

using namespace std;

/**
 * This file contains informations and configurations from the Mikrokopter
 */


// version information for the serial connection
static const int VERSION_SERIAL_MAJOR = 10;
static const int VERSION_SERIAL_MINOR = 0;

// Basis-Adresses for different Hardware components
static const int ADDRESS_ALL    = 0;
static const int ADDRESS_FC     = 1;
static const int ADDRESS_NC     = 2;
static const int ADDRESS_MK3MAG = 3;

// settings ID
static const int SETTINGS_ID = 2;

static const string HardwareType[] = {"Default", "FlightCtrl", "NaviCtrl", "MK3Mag"};

static const int MaxTickerEvents = 5;

static const int MaxAnalog    = 32;
static const int MaxPlot      = 50000;

static const int MaxNaviPos   = 2000;

struct sMotor
{
    int Speed[12];
};

struct MotorData
{
    int motor[16][4];
    string mixerName;
    int mixerVersion;
};

struct sMode
{
    int ID;
    int VERSION_MAJOR;
    int VERSION_MINOR;
    int VERSION_PATCH;
    int VERSION_SERIAL_MAJOR;
    int VERSION_SERIAL_MINOR;
    string Hardware;
    string Version;
};

struct sGPS_Pos
{
    long Longitude;
    long Latitude;
    long Altitude;
};

struct sNaviData
{
    sGPS_Pos Current;
    sGPS_Pos Target;
    sGPS_Pos Home;

    long Longitude;
    long Latitude;
    long Altitude;
};

struct sWayPoint
{
    double Longitude;
    double Latitude;
    double Altitude;
    int Time;
};

/**
 * The KopterData class represents the current state of the MikroKopter.
 * It containes all data that was sent from the Mikrokopter
 */

class KopterData {
    public:
        sMode mode;
        sNaviData navi;
        sMotor motor;
        int analogData[MaxAnalog];
        // current LCD page
        int lcd_cur;
        //max count of LCD pages
        int lcd_max;
};

#endif