from waypoints.h in NaviCtrl Code:

IMPORTANT: Make sure, that you use packed struktures in your compiler.

   1 typedef struct
   2 {
   3         GPS_Pos_t Position;// the gps position of the waypoint, see ubx.h for details
   4         s16 Heading;    // orientation, 0 no action, 1...360 fix heading, neg. = Index to POI in WP List
   5         u8  ToleranceRadius;// in meters, if the MK is within that range around the target, then the next target is triggered
   6         u8  HoldTime;   // in seconds, if the was once in the tolerance area around a WP, this time defines the delay before the next WP is triggered
   7         u8  Event_Flag; // future implementation
   8         u8  Index;      // to indentify different waypoints, workaround for bad communications PC <-> NC
   9         u8  Type;       // typeof Waypoint
  10         u8  WP_EventChannelValue;  // Will be transferred to the FC and can be used as Poti value there
  11         u8      AltitudeRate;// rate to change the setpoint in steps of 0.1m/s
  12         u8      Speed;  // rate to change the Position(0 = max) in steps of 0.1m/s
  13         u8      CamAngle;// Camera servo angle in degree (255 -> POI-Automatic)
  14         u8  Name[4];// Name of that point (ASCII)
  15         u8  AutoPhotoDistance;  // in [m]
  16     u8  reserve[1];                 // reserve
  17 } __attribute__((packed)) Point_t;

   1 // type of point
   2 #define POINT_TYPE_INVALID 255
   3 #define POINT_TYPE_WP   0
   4 #define POINT_TYPE_POI  1
   5 #define POINT_TYPE_FS   2
   6 #define POINT_TYPE_LAND 3
   7 

   1 // status 
   2 #define INVALID         0x00
   3 #define NEWDATA         0x01
   4 #define PROCESSED       0x02
   5 
   6 typedef struct
   7 {
   8         s32 Longitude;                                  // in 1E-7 deg
   9         s32 Latitude;                                   // in 1E-7 deg
  10         s32 Altitude;                                   // in dm
  11         u8 Status;                                      // validity of data
  12 } __attribute__((packed)) GPS_Pos_t;


CategoryCoding