MikroKopter

from uart1.h in NaviCtrl code (please take a look at SVN for latest version of header files)

Navigation Data

The MikroKopter will send these data after getting the abbo command 'O' with interval and max bytes per second.

Interval

This value [10ms] is used when starting the abbo.

10 => send the data every 100ms

Max Bytes per second

This value [bytes per second] is used when starting the abbo.

It is used to keep the used bandwith to a specified (max) level according to the maximum data throughput of the communication interface.

A useful value could be 1024 for a good wireless transmission and 200 for a slow transmission like GSM-Modems etc.

Index

The MK will send differnt data sets automatically.

Data that did not change will be sent more seldom than sets that with changed data content.

The different data sets can be identified by the index.

Implementations of the data structure

OSD flags definitions

// xxx.OSDStatusFlags   (multiple data sets)    -> this is the definition in the OSD data structure 
#define OSD_FLAG_CAREFREE               0x01
#define OSD_FLAG_ALTITUDE_CONTROL       0x02
#define OSD_FLAG_CALIBRATE              0x04
#define OSD_FLAG_OUT1_ACTIVE            0x08
#define OSD_FLAG_OUT2_ACTIVE            0x10
#define OSD_FLAG_LOWBAT                 0x20
#define OSD_FLAG_VARIO_TRIM_UP          0x40
#define OSD_FLAG_VARIO_TRIM_DOWN        0x80

// NaviData_Flags.OSDStatusFlags2 (Index:11)    -> this is the definition in the OSD data structure 
#define OSD2_FLAG_MOTOR_RUN             0x01
#define OSD2_FLAG_FLY                   0x02
#define OSD2_FLAG_RC_FAILSAVE_ACTIVE    0x04
#define OSD2_FLAG_START                 0x08
#define OSD2_FLAG_EMERGENCY_LANDING     0x10
#define OSD2_FLAG_WAIT_FOR_TAKEOFF      0x20   // Motor Running, but still on the ground
#define OSD2_FLAG_AUTO_STARTING         0x40
#define OSD2_FLAG_AUTO_LANDING          0x80

// NaviData_Flags.OSDStatusFlags3 (Index:13 Home-Position) -> use only for flags that change slowly 
// Note: since NC V2.18
#define OSD3_FLAG_FIXBIT0               0x01 // type of GPS-Fix (see above)
#define OSD3_FLAG_FIXBIT1               0x02
#define OSD3_FLAG_FIXBIT2               0x04
#define OSD3_FLAG_HOTSHOE               0x08 // HotShoe connector attached
#define OSD3_FLAG_BOAT_MODE             0x10 // MK is calibrated in Boat-Mode
#define OSD3_FLAG_MK_IS_READY           0x20 // ready & calibrated

-> for Bits OSD3_FLAG_FIXBIT0-2 there are the followig Satfix States possible:
#define OSD_FIX_NONE                    0
#define OSD_FIX_2D                      1
#define OSD_FIX_3D                      2
#define OSD_FIX_DGPS                    3
#define OSD_FIX_RTK_FLOAT               4
#define OSD_FIX_RTK_FIX                 5

GPS_ModeCharacter

' ' = GPS off
'/' = Free
'D' = Dynamic Position Hold
'M' = Manuell control
'H' = Coming Home -> Target is Home
'm' = Manuell controlled in CH mode
'P' = Position Hold (old mode)
'W' = Waypoint flight
'w' = Waypoint flight, but manual controlled by sticks
'F' = Failsafe-Pos is the target
'-' = no fix


MikroKopter: en/SerialCommands/NaviDataStruct_V2 (zuletzt geändert am 06.10.2017 10:04 durch HolgerB)