Subversion Repositories Projects

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1465 - 1
#ifndef _MK_H_
2
#define _MK_H_
3
 
4
// Orginal H&I MK-Software 
5
typedef struct {
6
        int32_t                  Longitude;                                                                     // in 1E-7 deg
7
        int32_t                  Latitude;                                                                      // in 1E-7 deg
8
        int32_t                  Altitude;                                                                      // in mm
9
        uint8_t                  Status;                                                                                // validity of data
10
} __attribute__((packed)) GPS_Pos_t;
11
 
12
 
13
typedef struct {
14
        uint16_t                 Distance;                                                                      // distance to target in dm
15
        int16_t                  Bearing;                                                                               // course to target in deg
16
} __attribute__((packed)) GPS_PosDev_t;
17
 
18
 
19
#define FC_FLAG_MOTOR_RUN                               0x01
20
#define FC_FLAG_FLY                                                     0x02
21
#define FC_FLAG_CALIBRATE                               0x04
22
#define FC_FLAG_MOTOR_START                     0x08
23
 
24
#define NC_FLAG_GPS_OK                                  0x80
25
 
26
typedef struct {
27
        uint8_t                  Version;                                                                               // version of the data structure
28
        GPS_Pos_t                CurrentPosition;                                               // see ubx.h for details
29
        GPS_Pos_t                TargetPosition;
30
        GPS_PosDev_t TargetPositionDeviation;
31
        GPS_Pos_t                HomePosition;
32
        GPS_PosDev_t HomePositionDeviation;
33
        uint8_t                  WaypointIndex;                                                 // index of current waypoints running from 0 to WaypointNumber-1
34
        uint8_t                  WaypointNumber;                                                // number of stored waypoints
35
        uint8_t                  SatsInUse;                                                                     // number of satellites used for position solution
36
        int16_t                  Altimeter;                                                             // hight according to air pressure
37
        int16_t                  Variometer;                                                            // climb(+) and sink(-) rate
38
        uint16_t                 FlyingTime;                                                            // in seconds
39
        uint8_t                  UBat;                                                                                  // Battery Voltage in 0.1 Volts
40
        uint16_t                 GroundSpeed;                                                           // speed over ground in cm/s (2D)
41
        int16_t                  Heading;                                                                               // current flight direction in ° as angle to north
42
        int16_t                  CompassHeading;                                                // current compass value in °
43
        int8_t                   AngleNick;                                                                     // current Nick angle in 1°
44
        int8_t                   AngleRoll;                                                                     // current Rick angle in 1°
45
        uint8_t                  RC_Quality;                                                            // RC_Quality
46
        uint8_t                  FCStatusFlags;                                                 // Flags from FC
47
        uint8_t                  NCFlags;                                                                               // Flags from NC
48
        uint8_t                  Errorcode;                                                                     // 0 --> okay
49
        uint8_t                  OperatingRadius;                                               // current operation radius around the Home Position in m
50
        int16_t                  TopSpeed;                                                                      // velocity in vertical direction in cm/s
51
        uint8_t                  TargetHoldTime;                                                // time in s to stay at the given target, counts down to 0 if target has been reached
52
        uint8_t                  RC_RSSI;                                                                               // Receiver signal strength (since version 2 added)
53
        int16_t                  SetpointAltitude;                                      // setpoint for altitude
54
        uint8_t                  Gas;                                                                                           // for future use
55
        uint16_t                 Current;                                                                               // actual current in 0.1A steps
56
        uint16_t                 UsedCapacity;                                                  // used capacity in mAh
57
} __attribute__((packed)) NaviData_t;
58
 
59
#endif