7. データ型

Takami Torao #Garmin #GPS
  • このエントリーをはてなブックマークに追加

7.1 データの直列化

全てのデータ型はシリアルデータリンク上で転送するためにバイナリストリームへ直列化されなければなりません。それぞれのデータ型の直列化は下記の法則で順番にマシンのメモリ上に構築されるバイト列の転送によって行われます。

  1. データ構造のメンバーはそれらが型定義に現れるのと同じ順序でメモリに保存されます。
  2. 全てのデータ構造はパックされます。これは使用されていない "埋め" バイトがデータ構造のメンバー間に存在しないことを意味します。
  3. マルチバイトの数値型はリトルエンディアンフォーマットでメモリに保存されます。これは下位バイトがメモリの最初に現れ、続いて上位バイトへ向かう順にメモリ上に配置されることを意味します。

7.2 文字セット

特に明記しない限り全てのデバイスは ASCII 文字セットを受け入れます。文字列型を持ついくつかの項目は以下に示す ASCII 文字の特定のサブセットのみとなるかも知れません。

Table 32 – Character Sets
ユーザウェイポイント識別子: 大文字、数字
ウェイポイントコメント: 大文字、数字、空白、ハイフン
ルートコメント: 大文字、数字、空白、ハイフン
町(City): デバイスによって無視
県(State): デバイスによって無視
Facility Name: デバイスによって無視
国コード: 大文字、数字、空白
ルート識別子: 大文字、数字、空白、ハイフン
ルートウェイポイント識別子: 全ての ASCII 文字
リンク識別子: 全ての ASCII 文字
トラック識別子: 大文字、数字、空白、ハイフン

いくつかのデバイスは上記に示した文字セット以上の文字を許可しているかもしれませんが、このドキュメントではデバイス固有の追加文字セットを示すことは行いません。

7.3 基本データ型

以下はより複雑なデータ型の定義で使用される基本データ型です。

7.3.1 char

char データ型は 8 ビットサイズです。

7.3.2 文字配列

特に明記しない限り、全ての文字配列は空白でパディングされ null 終端子を必要としません。例えば以下のデータ型を考えます:

char xyz[6]; /* xyz type */

単語 "CAT" はこのデータ型に以下のように格納されるでしょう:

xyz[0] = ‘C’;
xyz[1] = ‘A’;
xyz[2] = ‘T’;
xyz[3] = ‘ ’;
xyz[4] = ‘ ’;
xyz[5] = ‘ ’;

文字配列はホストとデバイス間で文字列を転送する方法を提供します。しかし文字配列はデバイスが文字列に割り当てている文字数を超えて転送されるかもしれません。この場合、デバイスはデバイスが文字列に割り当てているサイズを超えた全ての文字を無視します。例えば "cmnt" 文字配列は 40 文字の転送を許可していますが、デバイスは "cmnt" 文字列に 16 文字だけしか持てない可能性があります。この場合、デバイスは転送された文字配列の後ろの 24 文字を無視します。

7.3.3 可変長文字列

文字配列とは対照的に、可変長文字列は、データパケットがデータパケットサイズの最大容量より大きくなる事を引き起こさないような、どのような長さともなる null 終端文字列です。可変長文字列がデータ構造のメンバーである場合、データ型は以下のように記述されています:

typedef struct
{
    sint16 abc;
    /* char xyz[] null 終端文字列 */
    sint16 def;
} example_type;

この構文は xyz と名付けられた可変長文字列がデータ構造のメンバー abcdef の間に出現する事を示しています。従って、dev メンバーの (データ構造先頭からの) アドレスオフセットは実行時になるまで (可変長文字列が配置されるまで) 不明となります。実行時でのアドレスオフセット計算の必要を最小化するため、可能な限り可変長文字列はデータ構造の最後に配置されています。

7.3.4 uint8

uint8 データ型は 8 ビット無符号整数に対して使用します。

7.3.5 uint16

uint16 データ型は 16 ビット無符号整数に対して使用します。

7.3.6 uint32

uint32 データ型は 32 ビット無符号整数に対して使用します。

7.3.7 sint16

sint16 データ型は 16 ビット有符号整数に対して使用します。

7.3.8 sint32

sint32 データ型は 32 ビット有符号整数に対して使用します。

7.3.9 float32

float32 データ型は 32 ビット IEEE フォーマット浮動小数点データ (1 符号ビット, 8 指数ビット, 23 仮数ビット) です。

7.3.10 float64

float64 データ型は 64 ビット IEEE フォーマット浮動小数点データ (1 符号ビット, 11 指数ビット, 52 仮数ビット) です。

7.3.11 bool

bool データ型は true (非ゼロ) または false (ゼロ) を示すために使う 8 ビット整数です。

7.3.12 position_type

position_type は半球上での緯度と経度を示すために使用されます。ここで半球の 231 は 180 度と同じです。北緯と東経は正の数、南緯と西経は負の数となります。

typedef struct
{
    sint32 lat; /* 半球の緯度 */
    sint32 lon; /* 半球の経度 */
} position_type;

以下の変換は度と半球の変換方法を表しています。

\[ \begin{align*} {\rm degrees} & = {\rm semicircles} \times (180 + 2^{31}) \\ {\rm semicircles} & = {\rm degrees} \times (2^{31} \div 180) \end{align*} \]

7.3.13 radian_position_type

radian_position_type は弧度法で緯度と経度を示すために使用されます。ここで \(\pi\) ラジアンは 180 度と同じです。北緯と東経は正の数、南緯と西経は負の数となります。

typedef struct
{
    float64 lat; /* 弧度法の緯度 */
    float64 lon; /* 弧度法の経度 */
} radian_position_type;

以下の変換は度とラジアンの変換方法を表しています。

\[ \begin{align*} {\rm degrees} & = {\rm radians} \times (180 \div \pi) \\ {\rm radians} & = {\rm degrees} \times (\pi \div 180) \end{align*} \]

7.3.14 time_type

time_type は絶対時刻を示すためにいくつかのデータ構造で使用されています。これは 32 ビット無符号整数であり、値は 1990/01/01 00:00:00 (UTC) からの経過秒数です。

7.3.15 symbol_type

symbol_type はウェイポイントの記号を示すために特定のデバイスで使用されています。

typedef uint16 symbol_type;

symbol_type 値を以下に列挙します。この型を使用する大部分のデバイスがここで提示した記号の非常の小さなサブセットのみに限定されている事に注意してください。それぞれのデバイスにどのようなサブセットが適用されるかについてはこのドキュメントでは記述していません。しかし、デバイスは受信した未許可の全ての記号を無視し、一般的なドット記号の値に置き換えるでしょう。従って、要求した値をデバイスが受け入れない可能性以外は、以下の表で示しているどの値を使用しても危害となることはありません。

enum
{
    /*---------------------------------------------------------------
    海洋記号
    ---------------------------------------------------------------*/
    sym_anchor = 0,             /* white anchor symbol */
    sym_bell = 1,               /* white bell symbol */
    sym_diamond_grn = 2,        /* green diamond symbol */
    sym_diamond_red = 3,        /* red diamond symbol */
    sym_dive1 = 4,              /* diver down flag 1 */
    sym_dive2 = 5,              /* diver down flag 2 */
    sym_dollar = 6,             /* white dollar symbol */
    sym_fish = 7,               /* white fish symbol */
    sym_fuel = 8,               /* white fuel symbol */
    sym_horn = 9,               /* white horn symbol */
    sym_house = 10,             /* white house symbol */
    sym_knife = 11,             /* white knife & fork symbol */
    sym_light = 12,             /* white light symbol */
    sym_mug = 13,               /* white mug symbol */
    sym_skull = 14,             /* white skull and crossbones symbol*/
    sym_square_grn = 15,        /* green square symbol */
    sym_square_red = 16,        /* red square symbol */
    sym_wbuoy = 17,             /* white buoy waypoint symbol */
    sym_wpt_dot = 18,           /* waypoint dot */
    sym_wreck = 19,             /* white wreck symbol */
    sym_null = 20,              /* null symbol (transparent) */
    sym_mob = 21,               /* man overboard symbol */
    sym_buoy_ambr = 22,         /* amber map buoy symbol */
    sym_buoy_blck = 23,         /* black map buoy symbol */
    sym_buoy_blue = 24,         /* blue map buoy symbol */
    sym_buoy_grn = 25,          /* green map buoy symbol */
    sym_buoy_grn_red = 26,      /* green/red map buoy symbol */
    sym_buoy_grn_wht = 27,      /* green/white map buoy symbol */
    sym_buoy_orng = 28,         /* orange map buoy symbol */
    sym_buoy_red = 29,          /* red map buoy symbol */
    sym_buoy_red_grn = 30,      /* red/green map buoy symbol */
    sym_buoy_red_wht = 31,      /* red/white map buoy symbol */
    sym_buoy_violet = 32,       /* violet map buoy symbol */
    sym_buoy_wht = 33,          /* white map buoy symbol */
    sym_buoy_wht_grn = 34,      /* white/green map buoy symbol */
    sym_buoy_wht_red = 35,      /* white/red map buoy symbol */
    sym_dot = 36,               /* white dot symbol */
    sym_rbcn = 37,              /* radio beacon symbol */
    sym_boat_ramp = 150,        /* boat ramp symbol */
    sym_camp = 151,             /* campground symbol */
    sym_restrooms = 152,        /* restrooms symbol */
    sym_showers = 153,          /* shower symbol */
    sym_drinking_wtr = 154,     /* drinking water symbol */
    sym_phone = 155,            /* telephone symbol */
    sym_1st_aid = 156,          /* first aid symbol */
    sym_info = 157,             /* information symbol */
    sym_parking = 158,          /* parking symbol */
    sym_park = 159,             /* park symbol */
    sym_picnic = 160,           /* picnic symbol */
    sym_scenic = 161,           /* scenic area symbol */
    sym_skiing = 162,           /* skiing symbol */
    sym_swimming = 163,         /* swimming symbol */
    sym_dam = 164,              /* dam symbol */
    sym_controlled = 165,       /* controlled area symbol */
    sym_danger = 166,           /* danger symbol */
    sym_restricted = 167,       /* restricted area symbol */
    sym_null_2 = 168,           /* null symbol */
    sym_ball = 169,             /* ball symbol */
    sym_car = 170,              /* car symbol */
    sym_deer = 171,             /* deer symbol */
    sym_shpng_cart = 172,       /* shopping cart symbol */
    sym_lodging = 173,          /* lodging symbol */
    sym_mine = 174,             /* mine symbol */
    sym_trail_head = 175,       /* trail head symbol */
    sym_truck_stop = 176,       /* truck stop symbol */
    sym_user_exit = 177,        /* user exit symbol */
    sym_flag = 178,             /* flag symbol */
    sym_circle_x = 179,         /* circle with x in the center */
    sym_open_24hr = 180,        /* open 24 hours symbol */
    sym_fhs_facility = 181,     /* U Fishing Hot Spots™ Facility */
    sym_bot_cond = 182,         /* Bottom Conditions */
    sym_tide_pred_stn = 183,    /* Tide/Current Prediction Station */
    sym_anchor_prohib = 184,    /* U anchor prohibited symbol */
    sym_beacon = 185,           /* U beacon symbol */
    sym_coast_guard = 186,      /* U coast guard symbol */
    sym_reef = 187,             /* U reef symbol */
    sym_weedbed = 188,          /* U weedbed symbol */
    sym_dropoff = 189,          /* U dropoff symbol */
    sym_dock = 190,             /* U dock symbol */
    sym_marina = 191,           /* U marina symbol */
    sym_bait_tackle = 192,      /* U bait and tackle symbol */
    sym_stump = 193,            /* U stump symbol */
    /*---------------------------------------------------------------
    ユーザ定義記号
    sym_begin_custom から sym_end_custom までの値 (包含) はユーザ定義
    記号を識別するために予約されています.
    ---------------------------------------------------------------*/
    sym_begin_custom = 7680,    /* first user customizable symbol */
    sym_end_custom = 8191,      /* last user customizable symbol */
    /*---------------------------------------------------------------
    陸上記号
    ---------------------------------------------------------------*/
    sym_is_hwy = 8192,          /* interstate hwy symbol */
    sym_us_hwy = 8193,          /* us hwy symbol */
    sym_st_hwy = 8194,          /* state hwy symbol */
    sym_mi_mrkr = 8195,         /* mile marker symbol */
    sym_trcbck = 8196,          /* TracBack (feet) symbol */
    sym_golf = 8197,            /* golf symbol */
    sym_sml_cty = 8198,         /* small city symbol */
    sym_med_cty = 8199,         /* medium city symbol */
    sym_lrg_cty = 8200,         /* large city symbol */
    sym_freeway = 8201,         /* intl freeway hwy symbol */
    sym_ntl_hwy = 8202,         /* intl national hwy symbol */
    sym_cap_cty = 8203,         /* capitol city symbol (star) */
    sym_amuse_pk = 8204,        /* amusement park symbol */
    sym_bowling = 8205,         /* bowling symbol */
    sym_car_rental = 8206,      /* car rental symbol */
    sym_car_repair = 8207,      /* car repair symbol */
    sym_fastfood = 8208,        /* fast food symbol */
    sym_fitness = 8209,         /* fitness symbol */
    sym_movie = 8210,           /* movie symbol */
    sym_museum = 8211,          /* museum symbol */
    sym_pharmacy = 8212,        /* pharmacy symbol */
    sym_pizza = 8213,           /* pizza symbol */
    sym_post_ofc = 8214,        /* post office symbol */
    sym_rv_park = 8215,         /* RV park symbol */
    sym_school = 8216,          /* school symbol */
    sym_stadium = 8217,         /* stadium symbol */
    sym_store = 8218,           /* dept. store symbol */
    sym_zoo = 8219,             /* zoo symbol */
    sym_gas_plus = 8220,        /* convenience store symbol */
    sym_faces = 8221,           /* live theater symbol */
    sym_ramp_int = 8222,        /* ramp intersection symbol */
    sym_st_int = 8223,          /* street intersection symbol */
    sym_weigh_sttn = 8226,      /* inspection/weigh station symbol */
    sym_toll_booth = 8227,      /* toll booth symbol */
    sym_elev_pt = 8228,         /* elevation point symbol */
    sym_ex_no_srvc = 8229,      /* exit without services symbol */
    sym_geo_place_mm = 8230,    /* Geographic place name, man-made */
    sym_geo_place_wtr = 8231,   /* Geographic place name, water */
    sym_geo_place_lnd = 8232,   /* Geographic place name, land */
    sym_bridge = 8233,          /* bridge symbol */
    sym_building = 8234,        /* building symbol */
    sym_cemetery = 8235,        /* cemetery symbol */
    sym_church = 8236,          /* church symbol */
    sym_civil = 8237,           /* civil location symbol */
    sym_crossing = 8238,        /* crossing symbol */
    sym_hist_town = 8239,       /* historical town symbol */
    sym_levee = 8240,           /* levee symbol */
    sym_military = 8241,        /* military location symbol */
    sym_oil_field = 8242,       /* oil field symbol */
    sym_tunnel = 8243,          /* tunnel symbol */
    sym_beach = 8244,           /* beach symbol */
    sym_forest = 8245,          /* forest symbol */
    sym_summit = 8246,          /* summit symbol */
    sym_lrg_ramp_int = 8247,    /* large ramp intersection symbol */
    sym_lrg_ex_no_srvc = 8248,  /* large exit without services smbl */
    sym_badge = 8249,           /* police/official badge symbol */
    sym_cards = 8250,           /* gambling/casino symbol */
    sym_snowski = 8251,         /* snow skiing symbol */
    sym_iceskate = 8252,        /* ice skating symbol */
    sym_wrecker = 8253,         /* tow truck (wrecker) symbol */
    sym_border = 8254,          /* border crossing (port of entry) */
    sym_geocache = 8255,        /* geocache location */
    sym_geocache_fnd = 8256,    /* found geocache */
    sym_cntct_smiley = 8257,    /* Rino contact symbol, "smiley" */
    sym_cntct_ball_cap = 8258,  /* Rino contact symbol, "ball cap" */
    sym_cntct_big_ears = 8259,  /* Rino contact symbol, "big ear" */
    sym_cntct_spike = 8260,     /* Rino contact symbol, "spike" */
    sym_cntct_goatee = 8261,    /* Rino contact symbol, "goatee" */
    sym_cntct_afro = 8262,      /* Rino contact symbol, "afro" */
    sym_cntct_dreads = 8263,    /* Rino contact symbol, "dreads" */
    sym_cntct_female1 = 8264,   /* Rino contact symbol, "female 1" */
    sym_cntct_female2 = 8265,   /* Rino contact symbol, "female 2" */
    sym_cntct_female3 = 8266,   /* Rino contact symbol, "female 3" */
    sym_cntct_ranger = 8267,    /* Rino contact symbol, "ranger" */
    sym_cntct_kung_fu = 8268,   /* Rino contact symbol, "kung fu" */
    sym_cntct_sumo = 8269,      /* Rino contact symbol, "sumo" */
    sym_cntct_pirate = 8270,    /* Rino contact symbol, "pirate" */
    sym_cntct_biker = 8271,     /* Rino contact symbol, "biker" */
    sym_cntct_alien = 8272,     /* Rino contact symbol, "alien" */
    sym_cntct_bug = 8273,       /* Rino contact symbol, "bug" */
    sym_cntct_cat = 8274,       /* Rino contact symbol, "cat" */
    sym_cntct_dog = 8275,       /* Rino contact symbol, "dog" */
    sym_cntct_pig = 8276,       /* Rino contact symbol, "pig" */
    sym_hydrant = 8282,         /* water hydrant symbol */
    sym_flag_blue = 8284,       /* blue flag symbol */
    sym_flag_green = 8285,      /* green flag symbol */
    sym_flag_red = 8286,        /* red flag symbol */
    sym_pin_blue = 8287,        /* blue pin symbol */
    sym_pin_green = 8288,       /* green pin symbol */
    sym_pin_red = 8289,         /* red pin symbol */
    sym_block_blue = 8290,      /* blue block symbol */
    sym_block_green = 8291,     /* green block symbol */
    sym_block_red = 8292,       /* red block symbol */
    sym_bike_trail = 8293,      /* bike trail symbol */
    sym_circle_red = 8294,      /* red circle symbol */
    sym_circle_green = 8295,    /* green circle symbol */
    sym_circle_blue = 8296,     /* blue circle symbol */
    sym_diamond_blue = 8299,    /* blue diamond symbol */
    sym_oval_red = 8300,        /* red oval symbol */
    sym_oval_green = 8301,      /* green oval symbol */
    sym_oval_blue = 8302,       /* blue oval symbol */
    sym_rect_red = 8303,        /* red rectangle symbol */
    sym_rect_green = 8304,      /* green rectangle symbol */
    sym_rect_blue = 8305,       /* blue rectangle symbol */
    sym_square_blue = 8308,     /* blue square symbol */
    sym_letter_a_red = 8309,    /* red letter 'A' symbol */
    sym_letter_b_red = 8310,    /* red letter 'B' symbol */
    sym_letter_c_red = 8311,    /* red letter 'C' symbol */
    sym_letter_d_red = 8312,    /* red letter 'D' symbol */
    sym_letter_a_green = 8313,  /* green letter 'A' symbol */
    sym_letter_c_green = 8314,  /* green letter 'C' symbol */
    sym_letter_b_green = 8315,  /* green letter 'B' symbol */
    sym_letter_d_green = 8316,  /* green letter 'D' symbol */
    sym_letter_a_blue = 8317,   /* blue letter 'A' symbol */
    sym_letter_b_blue = 8318,   /* blue letter 'B' symbol */
    sym_letter_c_blue = 8319,   /* blue letter 'C' symbol */
    sym_letter_d_blue = 8320,   /* blue letter 'D' symbol */
    sym_number_0_red = 8321,    /* red number '0' symbol */
    sym_number_1_red = 8322,    /* red number '1' symbol */
    sym_number_2_red = 8323,    /* red number '2' symbol */
    sym_number_3_red = 8324,    /* red number '3' symbol */
    sym_number_4_red = 8325,    /* red number '4' symbol */
    sym_number_5_red = 8326,    /* red number '5' symbol */
    sym_number_6_red = 8327,    /* red number '6' symbol */
    sym_number_7_red = 8328,    /* red number '7' symbol */
    sym_number_8_red = 8329,    /* red number '8' symbol */
    sym_number_9_red = 8330,    /* red number '9' symbol */
    sym_number_0_green = 8331,  /* green number '0' symbol */
    sym_number_1_green = 8332,  /* green number '1' symbol */
    sym_number_2_green = 8333,  /* green number '2' symbol */
    sym_number_3_green = 8334,  /* green number '3' symbol */
    sym_number_4_green = 8335,  /* green number '4' symbol */
    sym_number_5_green = 8336,  /* green number '5' symbol */
    sym_number_6_green = 8337,  /* green number '6' symbol */
    sym_number_7_green = 8338,  /* green number '7' symbol */
    sym_number_8_green = 8339,  /* green number '8' symbol */
    sym_number_9_green = 8340,  /* green number '9' symbol */
    sym_number_0_blue = 8341,   /* blue number '0' symbol */
    sym_number_1_blue = 8342,   /* blue number '1' symbol */
    sym_number_2_blue = 8343,   /* blue number '2' symbol */
    sym_number_3_blue = 8344,   /* blue number '3' symbol */
    sym_number_4_blue = 8345,   /* blue number '4' symbol */
    sym_number_5_blue = 8346,   /* blue number '5' symbol */
    sym_number_6_blue = 8347,   /* blue number '6' symbol */
    sym_number_7_blue = 8348,   /* blue number '7' symbol */
    sym_number_8_blue = 8349,   /* blue number '8' symbol */
    sym_number_9_blue = 8350,   /* blue number '9' symbol */
    sym_triangle_blue = 8351,   /* blue triangle symbol */
    sym_triangle_green = 8352,  /* green triangle symbol */
    sym_triangle_red = 8353,    /* red triangle symbol */
    sym_food_asian = 8359,      /* asian food symbol */
    sym_food_deli = 8360,       /* deli symbol */
    sym_food_italian = 8361,    /* italian food symbol */
    sym_food_seafood = 8362,    /* seafood symbol */
    sym_food_steak = 8363,      /* steak symbol */
    /*---------------------------------------------------------------
    航空記号
    ---------------------------------------------------------------*/
    sym_airport = 16384,        /* airport symbol */
    sym_int = 16385,            /* intersection symbol */
    sym_ndb = 16386,            /* non-directional beacon symbol */
    sym_vor = 16387,            /* VHF omni-range symbol */
    sym_heliport = 16388,       /* heliport symbol */
    sym_private = 16389,        /* private field symbol */
    sym_soft_fld = 16390,       /* soft field symbol */
    sym_tall_tower = 16391,     /* tall tower symbol */
    sym_short_tower = 16392,    /* short tower symbol */
    sym_glider = 16393,         /* glider symbol */
    sym_ultralight = 16394,     /* ultralight symbol */
    sym_parachute = 16395,      /* parachute symbol */
    sym_vortac = 16396,         /* VOR/TACAN symbol */
    sym_vordme = 16397,         /* VOR-DME symbol */
    sym_faf = 16398,            /* first approach fix */
    sym_lom = 16399,            /* localizer outer marker */
    sym_map = 16400,            /* missed approach point */
    sym_tacan = 16401,          /* TACAN symbol */
    sym_seaplane = 16402,       /* Seaplane Base */
};

7.4 製品仕様データ型

全ての位置は WGS-84 である事に注意してください。全ての高度は WGS-84 ジオイドです。

7.4.1 D100_Wpt_Type

typedef struct
{
    char ident[6]; /* identifier */
    position_type posn; /* position */
    uint32 unused; /* should be set to zero */
    char cmnt[40]; /* comment */
} D100_Wpt_Type;

7.4.2 D101_Wpt_Type

typedef struct
{
    char ident[6]; /* identifier */
    position_type posn; /* position */
    uint32 unused; /* should be set to zero */
    char cmnt[40]; /* comment */
    float32 dst; /* proximity distance (meters) */
    uint8 smbl; /* symbol id */
} D101_Wpt_Type;

D101_Wpt_Type のメンバー "smbl" に対する列挙値は symbol_type (7.3.15章参照) と同じです。ただし、D101_Wpt_Type の "smbl" メンバーが (16 bitではなく) 8bit のみである事から、上位バイトが非ゼロの symbol_type 値は D101_Wpt_Type では利用できません。

"dst" メンバーは隣接ウェイポイント転送プロトコルでのみ有効な値をとります。

7.4.3 D102_Wpt_Type

typedef struct
{
    char ident[6]; /* identifier */
    position_type posn; /* position */
    uint32 unused; /* should be set to zero */
    char cmnt[40]; /* comment */
    float32 dst; /* proximity distance (meters) */
    symbol_type smbl; /* symbol id */
} D102_Wpt_Type;

"dst" メンバーは隣接ウェイポイント転送プロトコルでのみ有効な値をとります。

7.4.4 D103_Wpt_Type

typedef struct
{
    char ident[6]; /* identifier */
    position_type posn; /* position */
    uint32 unused; /* should be set to zero */
    char cmnt[40]; /* comment */
    uint8 smbl; /* symbol id */
    uint8 dspl; /* display option */
} D103_Wpt_Type;

D103_Wpt_Type の "smbl" メンバーに対する列挙値は以下の通り:

enum
{
    smbl_dot = 0, /* dot symbol */
    smbl_house = 1, /* house symbol */
    smbl_gas = 2, /* gas symbol */
    smbl_car = 3, /* car symbol */
    smbl_fish = 4, /* fish symbol */
    smbl_boat = 5, /* boat symbol */
    smbl_anchor = 6, /* anchor symbol */
    smbl_wreck = 7, /* wreck symbol */
    smbl_exit = 8, /* exit symbol */
    smbl_skull = 9, /* skull symbol */
    smbl_flag = 10, /* flag symbol */
    smbl_camp = 11, /* camp symbol */
    smbl_circle_x = 12, /* circle with x symbol */
    smbl_deer = 13, /* deer symbol */
    smbl_1st_aid = 14, /* first aid symbol */
    smbl_back_track = 15 /* back track symbol */
};

D103_Wpt_Type の "dspl" メンバーに対する列挙値は以下の通り:

enum
{
    dspl_name = 0, /* Display symbol with waypoint name */
    dspl_none = 1, /* Display symbol by itself */
    dspl_cmnt = 2 /* Display symbol with comment */
};

7.4.5 D104_Wpt_Type

typedef struct
{
    char ident[6]; /* identifier */
    position_type posn; /* position */
    uint32 unused; /* should be set to zero */
    char cmnt[40]; /* comment */
    float32 dst; /* proximity distance (meters) */
    symbol_type smbl; /* symbol id */
    uint8 dspl; /* display option */
} D104_Wpt_Type;

D104_Wpt_Type の "dspl" メンバーに対する列挙値は以下の通り:

enum
{
    dspl_smbl_none = 0, /* Display symbol by itself */
    dspl_smbl_only = 1, /* Display symbol by itself */
    dspl_smbl_name = 3, /* Display symbol with waypoint name */
    dspl_smbl_cmnt = 5, /* Display symbol with comment */
};

"dst" メンバーは隣接ウェイポイント転送プロトコルでのみ有効な値を取ります。

7.4.6 D105_Wpt_Type

typedef struct
{
    position_type posn; /* position */
    symbol_type smbl; /* symbol id */
    /* char wpt_ident[]; null-terminated string */
} D105_Wpt_Type;

7.4.7 D106_Wpt_Type

typedef struct
{
    uint8 wpt_class; /* class */
    uint8 subclass[13]; /* subclass */
    position_type posn; /* position */
    symbol_type smbl; /* symbol id */
    /* char wpt_ident[]; null-terminated string */
    /* char lnk_ident[]; null-terminated string */
} D106_Wpt_Type;

W106_Wpt_Type の "wpt_class" メンバーに対する列挙値は以下の通り:

ゼロ: ユーザウェイポイントを示す (“subclass” は無視されます). 非ゼロ: 非ユーザウェイポイントを示す (“subclass” が有効でなければならない).

(デバイスマップデータベースの町のような) 非ユーザウェイポイントに対してデバイスは "wpt_class" メンバーに非ゼロ値を提供し、"subclass" メンバーは非ユーザウェイポイントをより詳しく識別するための有効なデータを含んでいます。もしホストが (ルートの一部のように) このウェイポイントをデバイスから転送して戻す場合、ホストは "wpt_class" と "subclass" メンバーを無修正のままにしなければいけません。ユーザウェイポイントに対してはホストは "wpt_class" を確実にゼロにしなければいけません。このとき "subclass" メンバーは無視されますがゼロに設定すべきです。

"lnk_ident" メンバーはルート中の前ウェイポイントからこのウェイポイントまでの経路の名前を示す文字列です。"HIGHWAY 101" は直前のウェイポイントからこのウェイポイントまでの経路がハイウェイ 101 沿いである事を示すために "lnk_ident" に設定されるでしょう。"lnk_ident" 文字列は空にする事ができます (null 終端子のみ)。これはパスに関して特記する事がない事を示します。

7.4.8 D107_Wpt_Type

typedef struct
{
    char ident[6]; /* identifier */
    position_type posn; /* position */
    uint32 unused; /* should be set to zero */
    char cmnt[40]; /* comment */
    uint8 smbl; /* symbol id */
    uint8 dspl; /* display option */
    float32 dst; /* proximity distance (meters) */
    uint8 color; /* waypoint color */
} D107_Wpt_Type;

D107_Wpt_Type の "smbl" に対する列挙値は D103_Wpt_Type の "smbl" メンバーと同じです。

D107_Wpt_Type の "dspl" メンバーに対する列挙値は D103_Wpt_Type の "dspl" メンバーと同じです。

D107_Wpt_Type の "color" メンバーに対する列挙値は以下の通り:

enum
{
    clr_default = 0, /* Default waypoint color */
    clr_red = 1, /* Red */
    clr_green = 2, /* Green */
    clr_blue = 3 /* Blue */
};

7.4.9 D108_Wpt_Type

typedef struct
{
    uint8 wpt_class; /* class (see below) */
    uint8 color; /* color (see below) */
    uint8 dspl; /* display options (see below) */
    uint8 attr; /* attributes (see below) */
    symbol_type smbl; /* waypoint symbol */
    uint8 subclass[18]; /* subclass */
    position_type posn; /* position */
    float32 alt; /* altitude in meters */
    float32 dpth; /* depth in meters */
    float32 dist; /* proximity distance in meters */
    char state[2]; /* state */
    char cc[2]; /* country code */
    /* char ident[]; variable length string */
    /* char comment[]; waypoint user comment */
    /* char facility[]; facility name */
    /* char city[]; city name */
    /* char addr[]; address number */
    /* char cross_road[]; intersecting road label */
} D108_Wpt_Type;

D108_Wpt_Type の "wpt_class" メンバーに対する列挙値は以下のように定義されます:

enum
{
    user_wpt = 0x00, /* user waypoint */
    avtn_apt_wpt = 0x40, /* aviation airport waypoint */
    avtn_int_wpt = 0x41, /* aviation intersection waypoint */
    avtn_ndb_wpt = 0x42, /* aviation NDB waypoint */
    avtn_vor_wpt = 0x43, /* aviation VOR waypoint */
    avtn_arwy_wpt = 0x44, /* aviation airport runway waypoint */
    avtn_aint_wpt = 0x45, /* aviation airport intersection */
    avtn_andb_wpt = 0x46, /* aviation airport ndb waypoint */
    map_pnt_wpt = 0x80, /* map point waypoint */
    map_area_wpt = 0x81, /* map area waypoint */
    map_int_wpt = 0x82, /* map intersection waypoint */
    map_adrs_wpt = 0x83, /* map address waypoint */
    map_line_wpt = 0x84, /* map line waypoint */
};

"color" メンバーは以下の値の一つを取ります:

enum
{
    clr_black = 0,
    clr_dark_red = 1,
    clr_dark_green = 2,
    clr_dark_yellow = 3,
    clr_dark_blue = 4,
    clr_dark_magenta = 5,
    clr_dark_cyan = 6,
    clr_light_gray = 7,
    clr_dark_gray = 8,
    clr_red = 9,
    clr_green = 10,
    clr_yellow = 11,
    clr_blue = 12,
    clr_magenta = 13,
    clr_cyan = 14,
    clr_white = 15,
    clr_default_color = 255
};

D108_Wpt_Type の "dspl" メンバーに対する列挙値は D103_Wpt_Type の "dspl" メンバーと同じです。

"attr" メンバーは 0x60 の値が設定されていなければいけません。

D108_Wpt_Type の "subclass" メンバーはマップウェイポイントでのみ使用され、ウェイポイントのそれ以外のクラスでは 0x0000 0x00000000 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF に設定されなければいけません。

"alt" と "dpth" メンバーはデバイスによってサポートされているかが不定です。これらのフィールドにおいて 1.0E25 の値はそのパラメータがサポートされていないか、このウェイポイントに対して不明であることを示しています。

"dist" メンバーは隣接ウェイポイント転送プロトコルでのみ使用されており、それ以外の場合は 1.0E25 に設定されなければいけません。

D108_Wpt_Type はユーザウェイポイントでのみ使用され、それ以外では長さ 0 の文字列でなければいけません。

"facility" と "city" メンバーは航空ウェイポイントでのみ使用され、それ以外のウェイポイントクラスでは長さ 0 の文字列でなければいけません。

"addr" メンバーは MAP_ADRS_WPT クラスウェイポイントでのみ有効でありそれ以外では長さ 0 の文字列でなければいけません。

"cross_road" メンバーは MAP_INT_WPT クラスウェイポイントでのみ有効でありそれ以外では長さ 0 の文字列でなければいけません。

7.4.10 D109_Wpt_Type

typedef struct
{
    uint8 dtyp; /* data packet type (0x01 for D109) */
    uint8 wpt_class; /* class */
    uint8 dspl_color; /* display & color (see below) */
    uint8 attr; /* attributes (0x70 for D109) */
    symbol_type smbl; /* waypoint symbol */
    uint8 subclass[18]; /* subclass */
    position_type posn; /* position */
    float32 alt; /* altitude in meters */
    float32 dpth; /* depth in meters */
    float32 dist; /* proximity distance in meters */
    char state[2]; /* state */
    char cc[2]; /* country code */
    uint32 ete; /* outbound link ete in seconds */
    /* char ident[]; variable length string */
    /* char comment[]; waypoint user comment */
    /* char facility[]; facility name */
    /* char city[]; city name */
    /* char addr[]; address number */
    /* char cross_road[]; intersecting road label */
} D109_Wpt_Type;

全てのフィールドは下記の注意を除いて D108_Wpt_Type と同じ定義です。

dtyp - D109_Wpt_Type では 0x01 でなければならないデータパケットタイプ。

dspl_color - 'dspl_color' メンバーは 3 つのフィールドを含んでいます; 0-4bit は色を示し、5-6bit はウェイポイント表示属性、7bit は未使用で 0 に設定する必要があります。色の値はデフォルト値が 0x1F である事を除いて D108_Wpt_Type で示されている物と同じです。表示属性値は D108_Wpt_Type で示されます。

attr - 属性。D109_Wpt_Type では 0x70 でなければならない。

ete - 次のウェイポイントまでの見積もり時間 [秒]。デフォルト値は 0xFFFFFFFF です。

7.4.11 D110_Wpt_Type

typedef struct
{
uint8 dtyp; /* data packet type (0x01 for D110) */
uint8 wpt_class; /* class */
uint8 dspl_color; /* display & color (see below) */
uint8 attr; /* attributes (0x80 for D110) */
symbol_type smbl; /* waypoint symbol */
uint8 subclass[18]; /* subclass */
position_type posn; /* position */
float32 alt; /* altitude in meters */
float32 dpth; /* depth in meters */
float32 dist; /* proximity distance in meters */
char state[2]; /* state */
char cc[2]; /* country code */
uint32 ete; /* outbound link ete in seconds */
float32 temp; /* temperature */
time_type time; /* timestamp */
uint16 wpt_cat; /* category membership */
/* char ident[]; variable length string */
/* char comment[]; waypoint user comment */
/* char facility[]; facility name */
/* char city[]; city name */
/* char addr[]; address number */
/* char cross_road[]; intersecting road label */
} D110_Wpt_Type;

All fields are defined the same as D109_Wpt_Type except as noted below.

The valid values for the "wpt_class" member of the D110_Wpt_Type are defined as follows. If an invalid value is received, the value shall be user_wpt.

enum
{
user_wpt = 0x00, /* user waypoint */
avtn_apt_wpt = 0x40, /* aviation airport waypoint */
avtn_int_wpt = 0x41, /* aviation intersection waypoint */
avtn_ndb_wpt = 0x42, /* aviation NDB waypoint */
avtn_vor_wpt = 0x43, /* aviation VOR waypoint */
avtn_arwy_wpt = 0x44, /* aviation airport runway waypoint */
avtn_aint_wpt = 0x45, /* aviation airport intersection */
avtn_andb_wpt = 0x46, /* aviation airport ndb waypoint */
map_pnt_wpt = 0x80, /* map point waypoint */
map_area_wpt = 0x81, /* map area waypoint */
map_int_wpt = 0x82, /* map intersection waypoint */
map_adrs_wpt = 0x83, /* map address waypoint */
map_line_wpt = 0x84, /* map line waypoint */
};

wpt_cat - Waypoint Category. May not be supported by all devices. Default value is 0x0000. This is a bit field that provides category membership information for the waypoint. The waypoint may be a member of up to 16 categories. If a bit is set then the waypoint is a member of the corresponding category. For example, if bits 0 and 4 are set then the waypoint is a member of categories 1 and 5. For more information see section 6.5 on page 13.

temp - Temperature. May not be supported by all devices. A value of 1.0e25 in this field indicates that this parameter is not supported or is unknown for this waypoint.

time - Time. May not be supported by all devices. A value of 0xFFFFFFFF in this field indicates that this parameter is not supported or is unknown for this waypoint.

attr - Attribute. Must be 0x80 for D110_Wpt_Type.

dspl_color - The 'dspl_color' member contains three fields; bits 0-4 specify the color, bits 5-6 specify the waypoint display attribute and bit 7 is unused and must be 0. Valid color values are specified below. If an invalid color value is received, the value shall be Black. Valid display attribute values are as shown below. If an invalid display attribute value is received, the value shall be Name.

enum
{
clr_Black = 0,
clr_Dark_Red = 1,
clr_Dark_Green = 2,
clr_Dark_Yellow = 3,
clr_Dark_Blue = 4,
clr_Dark_Magenta = 5,
clr_Dark_Cyan = 6,
clr_Light_Gray = 7,
clr_Dark_Gray = 8,
clr_Red = 9,
clr_Green = 10,
clr_Yellow = 11,
clr_Blue = 12,
clr_Magenta = 13,
clr_Cyan = 14,
clr_White = 15,
clr_Transparent = 16
};
enum
{
dspl_Smbl_Name = 0, /* Display symbol with waypoint name */
dspl_Smbl_Only = 1, /* Display symbol by itself */
dspl_Smbl_Comment = 2 /* Display symbol with comment */
};

posn - Position. If a D110 waypoint is received that contains a value in the lat field of the posn field that is greater than 2^30 or less than -2^30, then that waypoint shall be rejected.

7.4.12 D120_Wpt_Cat_Type

typedef struct
{
char name[17]; /* category name */
} D120_Wpt_Cat_Type;

The name field contains a null-terminated string with a maximum length of 16 consecutive non-null characters. If a D120 waypoint category is received that contains a string with more than 16 consecutive non-null characters then that name should be truncated to the first 16 characters and then null terminated. If a D120 waypoint category is received with a null in the first character of the name field then that packet should not be processed.

7.4.13 D150_Wpt_Type

typedef struct
{
char ident[6]; /* identifier */
char cc[2]; /* country code */
uint8 wpt_class; /* class */
position_type posn; /* position */
sint16 alt; /* altitude (meters) */
char city[24]; /* city */
char state[2]; /* state */
char name[30]; /* facility name */
char cmnt[40]; /* comment */
} D150_Wpt_Type;

The enumerated values for the “wpt_class” member of the D150_Wpt_Type are shown below:

enum
{
apt_wpt_class = 0, /* airport waypoint class */
int_wpt_class = 1, /* intersection waypoint class */
ndb_wpt_class = 2, /* NDB waypoint class */
vor_wpt_class = 3, /* VOR waypoint class */
usr_wpt_class = 4, /* user defined waypoint class */
rwy_wpt_class = 5, /* airport runway threshold waypoint class */
aint_wpt_class = 6, /* airport intersection waypoint class */
locked_wpt_class = 7 /* locked waypoint class */
};

The “locked_wpt_class” code indicates that a route within a device contains an aviation database waypoint that the device could not find in its aviation database (presumably because the aviation database was updated to a newer version). The host should never send the “locked_wpt_class” code to the device.

The “city,” “state,” “name,” and “cc” members are invalid when the “wpt_class” member is equal to usr_wpt_class. The “alt” member is valid only when the “wpt_class” member is equal to apt_wpt_class.

7.4.14 D151_Wpt_Type

typedef struct
{
char ident[6]; /* identifier */
position_type posn; /* position */
uint32 unused; /* should be set to zero */
char cmnt[40]; /* comment */
float32 dst; /* proximity distance (meters) */
char name[30]; /* facility name */
char city[24]; /* city */
char state[2]; /* state */
sint16 alt; /* altitude (meters) */
char cc[2]; /* country code */
char unused2; /* should be set to zero */
uint8 wpt_class; /* class */
} D151_Wpt_Type;

The enumerated values for the “wpt_class” member of the D151_Wpt_Type are shown below:

enum
{
apt_wpt_class = 0, /* airport waypoint class */
vor_wpt_class = 1, /* VOR waypoint class */
usr_wpt_class = 2, /* user defined waypoint class */
locked_wpt_class = 3 /* locked waypoint class */
};

The “locked_wpt_class” code indicates that a route within a device contains an aviation database waypoint that the device could not find in its aviation database (presumably because the aviation database was updated to a newer version). The host should never send the “locked_wpt_class” code to the device.

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

The “city,” “state,” “name,” and “cc” members are invalid when the “wpt_class” member is equal to usr_wpt_class. The “alt” member is valid only when the “wpt_class” member is equal to apt_wpt_class.

7.4.15 D152_Wpt_Type

typedef struct
{
char ident[6]; /* identifier */
position_type posn; /* position */
uint32 unused; /* should be set to zero */
char cmnt[40]; /* comment */
float32 dst; /* proximity distance (meters) */
char name[30]; /* facility name */
char city[24]; /* city */
char state[2]; /* state */
sint16 alt; /* altitude (meters) */
char cc[2]; /* country code */
uint8 unused2; /* should be set to zero */
uint8 wpt_class; /* class */
} D152_Wpt_Type;

The enumerated values for the “wpt_class” member of the D152_Wpt_Type are shown below:

enum
{
apt_wpt_class = 0, /* airport waypoint class */
int_wpt_class = 1, /* intersection waypoint class */
ndb_wpt_class = 2, /* NDB waypoint class */
vor_wpt_class = 3, /* VOR waypoint class */
usr_wpt_class = 4, /* user defined waypoint class */
locked_wpt_class = 5 /* locked waypoint class */
};

The “locked_wpt_class” code indicates that a route within a device contains an aviation database waypoint that the device could not find in its aviation database (presumably because the aviation database was updated to a newer version). The host should never send the “locked_wpt_class” code to the device.

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

The “city,” “state,” “name,” and “cc” members are invalid when the “wpt_class” member is equal to usr_wpt_class. The “alt” member is valid only when the “wpt_class” member is equal to apt_wpt_class.

7.4.16 D154_Wpt_Type

typedef struct
{
char ident[6]; /* identifier */
position_type posn; /* position */
uint32 unused; /* should be set to zero */
char cmnt[40]; /* comment */
float32 dst; /* proximity distance (meters) */
char name[30]; /* facility name */
char city[24]; /* city */
char state[2]; /* state */
sint16 alt; /* altitude (meters) */
char cc[2]; /* country code */
uint8 unused2; /* should be set to zero */
uint8 wpt_class; /* class */
symbol_type smbl; /* symbol id */
} D154_Wpt_Type;

The enumerated values for the “wpt_class” member of the D154_Wpt_Type are shown below:

enum
{
apt_wpt_class = 0, /* airport waypoint class */
int_wpt_class = 1, /* intersection waypoint class */
ndb_wpt_class = 2, /* NDB waypoint class */
vor_wpt_class = 3, /* VOR waypoint class */
usr_wpt_class = 4, /* user defined waypoint class */
rwy_wpt_class = 5, /* airport runway threshold waypoint class */
aint_wpt_class = 6, /* airport intersection waypoint class */
andb_wpt_class = 7, /* airport NDB waypoint class */
sym_wpt_class = 8, /* user defined symbol-only waypoint class */
locked_wpt_class = 9 /* locked waypoint class */
};

The “locked_wpt_class” code indicates that a route within a device contains an aviation database waypoint that the device could not find in its aviation database (presumably because the aviation database was updated to a newer version). The host should never send the “locked_wpt_class” code to the device.

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

The “city,” “state,” “name,” and “cc” members are invalid when the “wpt_class” member is equal to usr_wpt_class or sym_wpt_class. The “alt” member is valid only when the “wpt_class” member is equal to apt_wpt_class.

7.4.17 D155_Wpt_Type

typedef struct
{
char ident[6]; /* identifier */
position_type posn; /* position */
uint32 unused; /* should be set to zero */
char cmnt[40]; /* comment */
float32 dst; /* proximity distance (meters) */
char name[30]; /* facility name */
char city[24]; /* city */
char state[2]; /* state */
sint16 alt; /* altitude (meters) */
char cc[2]; /* country code */
uint8 unused2; /* should be set to zero */
uint8 wpt_class; /* class */
symbol_type smbl; /* symbol id */
uint8 dspl; /* display option */
} D155_Wpt_Type;

The enumerated values for the “dspl” member of the D155_Wpt_Type are shown below:

enum
{
dspl_smbl_only = 1, /* Display symbol by itself */
dspl_smbl_name = 3, /* Display symbol with waypoint name */
dspl_smbl_cmnt = 5, /* Display symbol with comment */
};

The enumerated values for the “wpt_class” member of the D155_Wpt_Type are shown below:

enum
{
apt_wpt_class = 0, /* airport waypoint class */
int_wpt_class = 1, /* intersection waypoint class */
ndb_wpt_class = 2, /* NDB waypoint class */
vor_wpt_class = 3, /* VOR waypoint class */
usr_wpt_class = 4, /* user defined waypoint class */
locked_wpt_class = 5 /* locked waypoint class */
};

The “locked_wpt_class” code indicates that a route within a device contains an aviation database waypoint that the device could not find in its aviation database (presumably because the aviation database was updated to a newer version). The host should never send the “locked_wpt_class” code to the device.

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

The “city,” “state,” “name,” and “cc” members are invalid when the “wpt_class” member is equal to usr_wpt_class. The “alt” member is valid only when the “wpt_class” member is equal to apt_wpt_class.

7.4.18 D200_Rte_Hdr_Type

typedef uint8 D200_Rte_Hdr_Type; /* route number */

The route number contained in the D200_Rte_Hdr_Type must be unique for each route.

7.4.19 D201_Rte_Hdr_Type

typedef struct
{
uint8 nmbr; /* route number */
char cmnt[20]; /* comment */
} D201_Rte_Hdr_Type;

The “nmbr” member must be unique for each route. Some devices require a unique “cmnt” for each route, and other devices do not. There is no mechanism available for the host to determine whether a device requires a unique “cmnt”, and the host must be prepared to receive unique or non-unique “cmnt” from the device.

7.4.20 D202_Rte_Hdr_Type

typedef struct
{
/* char rte_ident[]; variable length string */
} D202_Rte_Hdr_Type;

7.4.21 D210_Rte_Link_Type

typedef struct
{
uint16 class; /* link class; see below */
uint8 subclass[18]; /* subclass */
/* char ident[]; variable length string */
};

The “class” member can be one of the following values:

enum
{
line = 0,
link = 1,
net = 2,
direct = 3,
snap = 0xFF
};

The “ident” member has a maximum length of 51 characters, including the terminating NULL.

If “class” is set to “direct” or “snap”, subclass should be set to its default value of 0x0000 0x00000000 0xFFFFFFFF 0xFFFFFFFF 0xFFFFFFFF.

7.4.22 D300_Trk_Point_Type

typedef struct
{
position_type posn; /* position */
time_type time; /* time */
bool new_trk; /* new track segment? */
} D300_Trk_Point_Type;

The “time” member indicates the time at which the track log point was recorded.

When true, the “new_trk” member indicates that the track log point marks the beginning of a new track log segment.

7.4.23 D301_Trk_Point_Type

typedef struct
{
position_type posn; /* position */
time_type time; /* time */
float32 alt; /* altitude in meters */
float32 dpth; /* depth in meters */
bool new_trk; /* new track segment? */
} D301_Trk_Point_Type;

The “time” member indicates the time at which the track log point was recorded.

The ‘alt’ and ‘dpth’ members may or may not be supported on a given device. A value of 1.0e25 in either of these fields indicates that this parameter is not supported or is unknown for this track point.

When true, the “new_trk” member indicates that the track log point marks the beginning of a new track log segment.

7.4.24 D302_Trk_Point_Type

typedef struct
{
position_type posn; /* position */
time_type time; /* time */
float32 alt; /* altitude in meters */
float32 dpth; /* depth in meters */
float32 temp; /* temp in degrees C */
bool new_trk; /* new track segment? */
} D302_Trk_Point_Type;

All fields are defined the same as D301_Trk_Point_Type except as noted below.

temp - Temperature. May not be supported by all devices. A value of 1.0e25 in this field indicates that this parameter is not supported or is unknown for this track point.

7.4.25 D303_Trk_Point_Type

typedef struct
{
position_type posn; /* position */
time_type time; /* time */
float32 alt; /* altitude in meters */
uint8 heart_rate; /* heart rate in beats per minute */
} D303_Trk_Point_Type;

All fields are defined the same as D301_Trk_Point_Type except as noted below.

The “posn” member is invalid if both lat and lon are equal to 0x7FFFFFFF.

The “heart_rate” member is invalid if its value is equal to 0.

Two consecutive track points with invalid position, invalid altitude, and invalid heart rate indicate a pause in track point recording during the time between the two points.

7.4.26 D304_Trk_Point_Type

typedef struct
{
position_type posn; /* position */
time_type time; /* time */
float32 alt; /* altitude in meters */
float32 distance; /* distance traveled in meters. See below. */
uint8 heart_rate; /* heart rate in beats per minute */
uint8 cadence; /* in revolutions per minute */
bool sensor; /* is a wheel sensor present? */
} D304_Trk_Point_Type;

All fields are defined the same as D303_Track_Point_Type except as noted below.

The “distance” member is the cumulative distance traveled in the track up to this point in meters as determined by the wheel sensor or from the position, whichever is more accurate. If the distance cannot be obtained, the “distance” member has a value of 1.0e25, indicating that it is invalid.

A value of 0xFF for the “cadence” member indicates that it is invalid.

Two consecutive track points with invalid position, invalid altitude, invalid heart rate, invalid distance and invalid cadence indicate a pause in track point recording during the time between the two points.

7.4.27 D310_Trk_Hdr_Type

typedef struct
{
bool dspl; /* display on the map? */
uint8 color; /* color (same as D108) */
/* char trk_ident[]; null-terminated string */
} D310_Trk_Hdr_Type;

The ‘trk_ident’ member has a maximum length of 51 characters including the terminating NULL.

7.4.28 D311_Trk_Hdr_Type

typedef struct
{
uint16 index; /* unique among all tracks received from device
*/
} D311_Trk_Hdr_Type;

7.4.29 D312_Trk_Hdr_Type

typedef struct
{
bool dspl; /* display on the map? */
uint8 color; /* color (see below) */
/* char trk_ident[]; null-terminated string */
} D312_Trk_Hdr_Type;

The 'trk_ident' member has a maximum length of 51 characters including the terminating NULL.

The “color” member can be one of the following values:

enum
{
clr_Black = 0,
clr_Dark_Red = 1,
clr_Dark_Green = 2,
clr_Dark_Yellow = 3,
clr_Dark_Blue = 4,
clr_Dark_Magenta = 5,
clr_Dark_Cyan = 6,
clr_Light_Gray = 7,
clr_Dark_Gray = 8,
clr_Red = 9,
clr_Green = 10,
clr_Yellow = 11,
clr_Blue = 12,
clr_Magenta = 13,
clr_Cyan = 14,
clr_White = 15,
clr_Transparent = 16,
clr_DefaultColor = 255
};

7.4.30 D400_Prx_Wpt_Type

typedef struct
{
D100_Wpt_Type wpt; /* waypoint */
float32 dst; /* proximity distance (meters) */
} D400_Prx_Wpt_Type;

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

7.4.31 D403_Prx_Wpt_Type

typedef struct
{
D103_Wpt_Type wpt; /* waypoint */
float32 dst; /* proximity distance (meters) */
} D403_Prx_Wpt_Type;

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

7.4.32 D450_Prx_Wpt_Type

typedef struct
{
int idx; /* proximity index */
D150_Wpt_Type wpt; /* waypoint */
float32 dst; /* proximity distance (meters) */
} D450_Prx_Wpt_Type;

The “dst” member is valid only during the Proximity Waypoint Transfer Protocol.

7.4.33 D500_Almanac_Type

typedef struct
{
uint16 wn; /* week number (weeks) */
float32 toa; /* almanac data reference time (s) */
float32 af0; /* clock correction coefficient (s) */
float32 af1; /* clock correction coefficient (s/s) */
float32 e; /* eccentricity (-) */
float32 sqrta; /* square root of semi-major axis (a)(m**1/2) */
float32 m0; /* mean anomaly at reference time (r) */
float32 w; /* argument of perigee (r) */
float32 omg0; /* right ascension (r) */
float32 odot; /* rate of right ascension (r/s) */
float32 i; /* inclination angle (r) */
} D500_Almanac_Type;

7.4.34 D501_Almanac_Type

typedef struct
{
uint16 wn; /* week number (weeks) */
float32 toa; /* almanac data reference time (s) */
float32 af0; /* clock correction coefficient (s) */
float32 af1; /* clock correction coefficient (s/s) */
float32 e; /* eccentricity (-) */
float32 sqrta; /* square root of semi-major axis (a)(m**1/2) */
float32 m0; /* mean anomaly at reference time (r) */
float32 w; /* argument of perigee (r) */
float32 omg0; /* right ascension (r) */
float32 odot; /* rate of right ascension (r/s) */
float32 i; /* inclination angle (r) */
uint8 hlth; /* almanac health */
} D501_Almanac_Type;

7.4.35 D550_Almanac_Type

typedef struct
{
uint8 svid; /* satellite id */
uint16 wn; /* week number (weeks) */
float32 toa; /* almanac data reference time (s) */
float32 af0; /* clock correction coefficient (s) */
float32 af1; /* clock correction coefficient (s/s) */
float32 e; /* eccentricity (-) */
float32 sqrta; /* square root of semi-major axis (a)(m**1/2) */
float32 m0; /* mean anomaly at reference time (r) */
float32 w; /* argument of perigee (r) */
float32 omg0; /* right ascension (r) */
float32 odot; /* rate of right ascension (r/s) */
float32 i; /* inclination angle (r) */
} D550_Almanac_Type;

The “svid” member identifies a satellite in the GPS constellation as follows: PRN-01 through PRN-32 are indicated by “svid” equal to 0 through 31, respectively.

7.4.36 D551_Almanac_Type

typedef struct
{
uint8 svid; /* satellite id */
uint16 wn; /* week number (weeks) */
float32 toa; /* almanac data reference time (s) */
float32 af0; /* clock correction coefficient (s) */
float32 af1; /* clock correction coefficient (s/s) */
float32 e; /* eccentricity (-) */
float32 sqrta; /* square root of semi-major axis (a)(m**1/2) */
float32 m0; /* mean anomaly at reference time (r) */
float32 w; /* argument of perigee (r) */
float32 omg0; /* right ascension (r) */
float32 odot; /* rate of right ascension (r/s) */
float32 i; /* inclination angle (r) */
uint8 hlth; /* almanac health bits 17:24 (coded) */
} D551_Almanac_Type;

The “svid” member identifies a satellite in the GPS constellation as follows: PRN-01 through PRN-32 are indicated by “svid” equal to 0 through 31, respectively.

7.4.37 D600_Date_Time_Type

typedef struct
{
    uint8 month; /* 月 (1-12) */
    uint8 day; /* 日 (1-31) */
    uint16 year; /* 年 (1990 means 1990) */
    uint16 hour; /* 時 (0-23) */
    uint8 minute; /* 分 (0-59) */
    uint8 second; /* 秒 (0-59) */
} D600_Date_Time_Type;

D600_Date_Time_Type は UTC 日付と UTC 時刻を保持します。

7.4.38 D650_FlightBook_Record_Type

typedef struct
{
time_type takeoff_time; /* Time flight started */
time_type landing_time; /* Time flight ended */
position_type takeoff_posn; /* Takeoff lat/lon */
position_type landing_posn; /* Takeoff lat/lon */
uint32 night_time; /* Seconds flown in night time conditions */
uint32 num_landings; /* Number of landings during the flight */
float32 max_speed; /* Max velocity during flight (meters/sec) */
float32 max_alt; /* Max altitude above WGS84 ellipsoid (meters)*/
float32 distance; /* Distance of flight (meters) */
bool cross_country_flag; /* Flight met cross country criteria */
/* char departure_name[]; Name of airport <= 31 bytes */
/* char departure_ident[]; ID of airport <= 11 bytes */
/* char arrival_name[]; Name of airport <= 31 bytes */
/* char arrival_ident[];ID of airport <= 11 bytes */
/* char ac_id[]; N Number of airplane <= 11 bytes */
} D650_Flight_Book_Record_Type;

7.4.39 D700_Position_Type

typedef radian_position_type D700_Position_Type;

7.4.40 D800_Pvt_Data_Type

typedef struct
{
float32 alt; /* altitude above WGS 84 ellipsoid (meters) */
float32 epe; /* estimated position error, 2 sigma (meters) */
float32 eph; /* epe, but horizontal only (meters) */
float32 epv; /* epe, but vertical only (meters) */
uint16 fix; /* type of position fix */
float64 tow; /* time of week (seconds) */
radian_position_type posn; /* latitude and longitude (radians) */
float32 east; /* velocity east (meters/second) */
float32 north; /* velocity north (meters/second) */
float32 up; /* velocity up (meters/second) */
float32 msl_hght; /* height of WGS84 ellipsoid above MSL(meters)*/
sint16 leap_scnds; /* difference between GPS and UTC (seconds) */
uint32 wn_days; /* week number days */
} D800_Pvt_Data_Type;

The “alt” parameter provides the altitude above the WGS 84 ellipsoid. To find the altitude above mean sea level, add “msl_hght” to “alt” (“msl_hght” gives the height of the WGS 84 ellipsoid above mean sea level at the current position).

The “tow” parameter provides the number of seconds (excluding leap seconds) since the beginning of the current week, which begins on Sunday at 12:00 AM (i.e., midnight Saturday night-Sunday morning). The “tow” parameter is based on Universal Coordinated Time (UTC), except UTC is periodically corrected for leap seconds while “tow” is not corrected for leap seconds. To find UTC, subtract “leap_scnds” from “tow.” Since this may cause a negative result for the first few seconds of the week (i.e., when “tow” is less than “leap_scnds”), care must be taken to properly translate this negative result to a positive time value in the previous day. Also, since “tow” is a floating point number and may contain fractional seconds, care must be taken to properly round off when using “tow” in integer conversions and calculations.

The “wn_days” parameter provides the number of days that have occurred from UTC December 31st, 1989 to the beginning of the current week (thus, “wn_days” always represents a Sunday). To find the total number of days that have occurred from UTC December 31st, 1989 to the current day, add “wn_days” to the number of days that have occurred in the current week (as calculated from the “tow” parameter).

The default enumerated values for the “fix” member of the D800_Pvt_Data_Type are shown below. It is important for the host to inspect this value to ensure that other data members in the D800_Pvt_Data_Type are valid. No indication is given as to whether the device is in simulator mode versus having an actual position fix.

enum
{
unusable = 0, /* failed integrity check */
invalid = 1, /* invalid or unavailable */
2D = 2, /* two dimensional */
3D = 3, /* three dimensional */
2D_diff = 4, /* two dimensional differential */
3D_diff = 5 /* three dimensional differential */
};

Older software versions in certain devices use slightly different enumerated values for fix. The list of devices and the last version of software in which these different values are used is: Device Last SW Version eMap 2.64 GPSMAP 162 2.62 GPSMAP 295 2.19 eTrex 2.10 eTrex Summit 2.07 StreetPilot III 2.10 eTrex Japanese 2.10 eTrex Venture/Mariner 2.20 eTrex Europe 2.03 GPS 152 2.01 eTrex Chinese 2.01 eTrex Vista 2.12 eTrex Summit Japanese 2.01 eTrex Summit 2.24 eTrex GolfLogix 2.49 The enumerated values for these device software versions is one more than the default:

enum
{
unusable = 1, /* failed integrity check */
invalid = 2, /* invalid or unavailable */
2D = 3, /* two dimensional */
3D = 4, /* three dimensional */
2D_diff = 5, /* two dimensional differential */
3D_diff = 6 /* three dimensional differential */
};

7.4.41 D906_Lap_Type

typedef struct
{
time_type start_time;
uint32 total_time; /* In hundredths of a second */
float32 total_distance; /* In meters */
position_type begin; /* Invalid if both lat and lon are 0x7FFFFFFF */
position_type end; /* Invalid if both lat and lon are 0x7FFFFFFF */
uint16 calories;
uint8 track_index; /* See below */
uint8 unused; /* Unused. Set to 0. */
} D906_Lap_Type;

Possible values for the track_index member are as follows:

Value Meaning 0 - 252 The lap is the last in its run. The track index is valid and can be used to lookup the track and associate it with the run. 253 - 254 The lap is the last in its run; however, the run has no associated track. 255 The lap is not the last in its run. Or, if this is the last lap received, then it must be the last lap in its run. In this case, the track for the run is any track not already associated with a run.

Use the A302 Track Transfer Protocol to receive the tracks associated with these laps (see section 6.7.4 on page 16).

7.4.42 D1000_Run_Type

typedef struct
{
uint32 track_index; /* Index of associated track */
uint32 first_lap_index; /* Index of first associated lap */
uint32 last_lap_index; /* Index of last associated lap */
uint8 sport_type; /* See below */
uint8 program_type; /* See below */
uint16 unused; /* Unused. Set to 0. */
struct
{
uint32 time; /* Time result of virtual partner */
float32 distance; /* Distance result of virtual partner */
} virtual_partner;
D1002_Workout_Type workout; /* Workout */
} D1000_Run_Type;

The value of the “track_index” member must be 0xFFFFFFFF if there is no associated track.

All laps between “first_lap_index” and “last_lap_index” are also contained in the run.

The “sport_type” member can be one of the following values:

enum
{
running = 0,
biking = 1,
other = 2
};

The “program_type” member can be one of the following values:

enum
{
none = 0,
virtual_partner = 1, /* Completed with Virtual Partner */
workout = 2 /* Completed as part of a workout */
};

The values in the “virtual_partner” struct is considered valid only if “program_type” is equal to “virtual_partner”.

The value of the “workout” member is considered valid only if “program_type” is equal to “workout”.

7.4.43 D1001_Lap_Type

typedef struct
{
uint32 index; /* Unique among all laps received from device */
time_type start_time; /* Start of lap time */
uint32 total_time; /* Duration of lap, in hundredths of a second */
float32 total_dist; /* Distance in meters */
float32 max_speed; /* In meters per second */
position_type begin; /* Invalid if both lat and lon are 0x7FFFFFFF */
position_type end; /* Invalid if both lat and lon are 0x7FFFFFFF */
uint16 calories; /* Calories burned this lap */
uint8 avg_heart_rate; /* In beats-per-minute, 0 if invalid */
uint8 max_heart_rate; /* In beats-per-minute, 0 if invalid */
uint8 intensity; /* See below */
} D1001_Lap_Type;

The “intensity” member can be one of the following values:

enum
{
active = 0, /* This is a standard, active lap */
rest = 1 /* This is a rest lap in a workout */
};

7.4.44 D1002_Workout_Type

typedef struct
{
uint32 num_valid_steps; /* Number of valid steps (1-20) */
struct
{
char custom_name[16]; /* Null-terminated step name */
float32 target_custom_zone_low; /* See below */
float32 target_custom_zone_high; /* See below */
uint16 duration_value; /* See below */
uint8 intensity; /* Same as D1001 */
uint8 duration_type; /* See below */
uint8 target_type; /* See below */
uint8 target_value; /* See below */
uint16 unused; /* Unused. Set to 0. */
} steps[20];
char name[16]; /* Null-terminated workout name */
uint8 sport_type; /* Same as D1000 */
} D1002_Workout_Type;

All valid steps appear in order at the beginning of the “steps” array.

The values of “duration_type” and “duration_value” in the “steps” struct are defined as follows:

Table 33 – D1002 Workout Step Duration duration_type duration_value 0 = Time In seconds 1 = Distance In meters 2 = Heart Rate Less Than A value from 0 – 100 indicates a percentage of max heart rate. A value above 100 indicates beats-per-minute (255 max) plus 100. 3 = Heart Rate Greater Than A value from 0 – 100 indicates a percentage of max heart rate. A value above 100 indicates beats-per-minute (255 max) plus 100. 4 = Calories Burned In calories 5 = Open Undefined 6 = Repeat Number of the step to loop back to. Steps are assumed to be in the order in which they are received, and are numbered starting at one. The “custom_name” and “intensity” members are undefined for this duration type.

The values of “target_type”, “target_value”, “target_custom_zone_low”, and “target_custom_zone_high” in the “steps” struct are defined as follows:

Table 34 – D1002 Workout Step Targets target_type target_value target_custom_zone_low target_custom_zone_high 0 = Speed Speed zone (1 – 10). A value of 0 indicates a custom zone. Speed in meters per second. Undefined if not a custom zone. Speed in meters per second. Undefined for a non-custom zone. 1 = Heart Rate Heart rate zone (1 – 5). A value of 0 indicates a custom zone. A value of 0 – 100 indicated the percentage of max heart rate. A value above 100 indicates beats-per-minute (max of 255) plus 100. Undefined if not a custom zone. A value of 0 – 100 indicated the percentage of max heart rate. A value above 100 indicates beats-per-minute (max of 255) plus 100. Undefined if not a custom zone. 2 = Open Undefined Undefined Undefined Any value if the duration type is “Repeat” Number of repetitions Undefined Undefined

7.4.45 D1003_Workout_Occurrence_Type

typedef struct
{
char workout_name[16]; /* Null-terminated workout name */
time_type day; /* Day on which the workout falls */
} D1003_Workout_Occurrence_Type;

The “workout_name” field associates this workout occurrence with a particular workout.

7.4.46 D1004_Fitness_User_Profile_Type

typedef struct
{
struct
{
struct
{
uint8 low_heart_rate; /* In beats-per-minute, must be > 0 */
uint8 high_heart_rate; /* In beats-per-minute, must be > 0 */
uint16 unused; /* Unused. Set to 0. */
} heart_rate_zones[5];
struct
{
float32 low_speed; /* In meters-per-second */
float32 high_speed; /* In meters-per-second */
char name[16]; /* Null-terminated speed-zone name */
} speed_zones[10];
float32 gear_weight; /* Weight of equipment in kilograms */
uint8 max_heart_rate; /* In beats-per-minute, must be > 0 */
uint8 unused1; /* Unused. Set to 0. */
uint16 unused2; /* Unused. Set to 0. */
} activities[3];
float32 weight; /* User’s weight, in kilograms */
uint16 birth_year; /* No base value (i.e. 1990 means 1990) */
uint8 birth_month; /* 1 = January, etc. */
uint8 birth_day; /* 1 = first day of month, etc. */
uint8 gender; /* See below */
} D1004_Fitness_User_Profile_Type;

Each element in the “activities” array represents a different sport: “activities[0]” is running, “activities[1]” is biking, and “activities[2]” is other.

The “gender” member can be one of the following values:

enum
{
female = 0,
male = 1
};

7.4.47 D1005_Workout_Limits

typedef struct
{
uint32 max_workouts; /* Maximum workouts */
uint32 max_unscheduled_workouts; /* Maximum unscheduled workouts */
uint32 max_occurrences; /* Maximum workout occurrences */
} D1005_Workout_Limits;

The “max_workouts” member represents the total number of workouts that the device can hold. The “max_unscheduled_workouts” member represents the number of workouts the device can hold which do not have any occurrences (i.e. they are “unscheduled”). The “max_occurrences” member represents the number of workout occurrences that the device can hold.

As an example, suppose a device can hold 200 total workouts, 25 unscheduled workouts, and 200 occurrences. Under these circumstances, it would be appropriate to send 175 scheduled workouts, up to 200 combined occurrences of those scheduled workouts, and 25 workouts that have not been scheduled. Alternately, the device could accept a full 200 scheduled workouts; that would simply leave no room for unscheduled workouts (since the maximum number of workouts would be reached).

7.4.48 D1006_Course_Type

typedef struct
{
uint16 index; /* Unique among courses on device */
uint16 unused; /* Unused. Set to 0. */
char course_name[16]; /* Null-terminated, unique course name */
uint16 track_index; /* Index of the associated track */
} D1006_Course_Type;

The value of the “track_index” member must be 0xFFFFFFFF if there is no associated track.

7.4.49 D1007_Course_Lap_Type

typedef struct
{
uint16 course_index; /* Index of associated course */
uint16 lap_index; /* This lap’s index in the course */
uint32 total_time; /* In hundredths of a second */
float32 total_dist; /* In meters */
position_type begin; /* Starting position of the lap */
position_type end; /* Final position of the lap */
uint8 avg_heart_rate; /* In beats-per-minute */
uint8 max_heart_rate; /* In beats-per-minute */
uint8 intensity; /* Same as D1001 */
uint8 avg_cadence; /* In revolutions-per-minute */
} D1007_Course_Lap_Type;

The “begin” and “end” members are invalid if their lat and lon values are 0x7FFFFFFF.

The “avg_heart_rate” and “max_heart_rate” members are invalid if their values are 0.

The “avg_cadence” is invalid if its value is 0xFF.

7.4.50 D1008_Workout_Type

typedef struct
{
uint32 num_valid_steps; /* Number of valid steps (1-20) */
struct
{
char custom_name[16]; /* Null-terminated step name */
float32 target_custom_zone_low; /* See below */
float32 target_custom_zone_high; /* See below */
uint16 duration_value; /* Same as D1002 */
uint8 intensity; /* Same as D1001 */
uint8 duration_type; /* Same as D1002 */
uint8 target_type; /* See below */
uint8 target_value; /* See below */
uint16 unused; /* Unused. Set to 0. */
} steps[20];
char name[16]; /* Null-terminated workout name */
uint8 sport_type; /* Same as D1000 */
} D1008_Workout_Type;

All valid steps appear in order at the beginning of the “steps” array.

The values of “target_type”, “target_value”, “target_custom_zone_low”, and “target_custom_zone_high” in the “steps” struct are defined as follows:

Table 35 – D1008 Workout Step Targets target_type target_value target_custom_zone_low target_custom_zone_high 0 = Speed Speed zone (1 – 10). A value of 0 indicates a custom zone. Speed in meters per second. Undefined if not a custom zone. Speed in meters per second. Undefined for a non-custom zone. 1 = Heart Rate Heart rate zone (1 – 5). A value of 0 indicates a custom zone. A value of 0 – 100 indicated the percentage of max heart rate. A value above 100 indicates beats-per-minute (max of 255) plus 100. Undefined if not a custom zone. A value of 0 – 100 indicated the percentage of max heart rate. A value above 100 indicates beats-per-minute (max of 255) plus 100. Undefined if not a custom zone. 2 = Open Undefined Undefined Undefined 3 = Cadence 0 Cadence in revolutions-per-minute Cadence in revolutions-per-minute Any value if the duration type is “Repeat” Number of repetitions Undefined Undefined

7.4.51 D1009_Run_Type

typedef struct
{
uint16 track_index; /* Index of associated track */
uint16 first_lap_index; /* Index of first associated lap */
uint16 last_lap_index; /* Index of last associated lap */
uint8 sport_type; /* Same as D1000 */
uint8 program_type; /* See below */
uint8 multisport; /* See below */
uint8 unused1; /* Unused. Set to 0. */
uint16 unused2; /* Unused. Set to 0. */
struct
{
uint32 time; /* Time result of quick workout */
float32 distance; /* Distance result of quick workout */
} quick_workout;
D1008_Workout_Type workout; /* Workout */
} D1009_Run_Type;

The value of the “track_index” member must be 0xFFFF if there is no associated track. The “program_type” member is a bit field that indicates the type of run this is. The following table describes the meaning of each bit:

Table 36 – Bit Field: program_type Bit Interpretation 0 (least significant bit) This is a virtual partner run 1 This is associated with a workout 2 This is a quick workout 3 This is associated with a course 4 This is an interval workout 5 This is part of an auto-MultiSport session 6-7 (most significant bits) Undefined. Set to 0.

If the “program_type” member indicates that this run is associated with a course, then the “workout” member contains the name of the associated course in its “name” field.

The “multisport” member can be one of the following values:

enum
{
no = 0, /* Not a MultiSport run */
yes = 1, /* Part of a MultiSport session */
yesAndLastInGroup = 2 /* The last of a MultiSport session */
};

If the “auto MultiSport” bit is set in the “program_type” member, and if the last lap in the run is a rest lap, then that last lap’s time represents the time during which the user was transitioning to the next sport.

7.4.52 D1010_Run_Type

typedef struct
{
uint32 track_index; /* Index of associated track */
uint32 first_lap_index; /* Index of first associated lap */
uint32 last_lap_index; /* Index of last associated lap */
uint8 sport_type; /* Sport type (same as D1000) */
uint8 program_type; /* See below */
uint8 multisport; /* Same as D1009 */
uint8 unused; /* Unused. Set to 0. */
struct
{
uint32 time; /* Time result of virtual partner */
float32 distance; /* Distance result of virtual partner */
} virtual_partner;
D1002_Workout_Type workout; /* Workout */
} D1010_Run_Type;

The value of the “track_index” member must be 0xFFFFFFFF if there is no associated track.

All laps between “first_lap_index” and “last_lap_index” are also contained in the run.

The “program_type” member can be one of the following values:

enum
{
none = 0,
virtual_partner = 1, /* Completed with Virtual Partner */
workout = 2, /* Completed as part of a workout */
auto_multisport = 3 /* Completed as part of an auto MultiSport */
};

The values in the “virtual_partner” struct is considered valid only if “program_type” is equal to “virtual_partner”.

The value of the “workout” member is considered valid only if “program_type” is equal to “workout”.

If “program_type” is equal to “auto_multisport” and if the last lap in the run is a rest lap, then that last lap’s time represents the time during which the user was transitioning to the next sport.

7.4.53 D1011_Lap_Type

typedef struct
{
uint16 index; /* Unique among all laps received from device */
uint16 unused; /* Unused. Set to 0. */
time_type start_time; /* Start of lap time */
uint32 total_time; /* Duration of lap, in hundredths of a second */
float32 total_dist; /* Distance in meters */
float32 max_speed; /* In meters per second */
position_type begin; /* Invalid if both lat and lon are 0x7FFFFFFF */
position_type end; /* Invalid if both lat and lon are 0x7FFFFFFF */
uint16 calories; /* Calories burned this lap */
uint8 avg_heart_rate; /* In beats-per-minute, 0 if invalid */
uint8 max_heart_rate; /* In beats-per-minute, 0 if invalid */
uint8 intensity; /* Same as D1001 */
uint8 avg_cadence; /* In revolutions-per-minute, 0xFF if invalid */
uint8 trigger_method; /* See below */
} D1011_Lap_Type;

The “trigger_method” member represents the way in which this lap was started. It can be one of the following values:

enum
{
manual = 0,
distance = 1,
location = 2,
time = 3,
heart_rate = 4
};

7.4.54 D1012_Course_Point_Type

typedef struct
{
char name[11]; /* Null-terminated name */
uint8 unused1; /* Unused. Set to 0. */
uint16 course_index; /* Index of associated course */
uint16 unused2; /* Unused. Set to 0. */
time_type track_point_time; /* Time */
uint8 point_type; /* See below */
} D1012_Course_Point_Type;

All course points must be unique based on the combination of their course_index and track_point_time.

The “point_type” member can be one of the following values:

enum
{
generic = 0,
summit = 1,
valley = 2,
water = 3,
food = 4,
danger = 5,
left = 6,
right = 7,
straight = 8,
first_aid = 9,
fourth_category = 10,
third_category = 11,
second_category = 12,
first_category = 13,
hors_category = 14,
sprint = 15
};

7.4.55 D1013_Course_Limits_Type

typedef struct
{
uint32 max_courses; /* Maximum courses */
uint32 max_course_laps; /* Maximum course laps */
uint32 max_course_pnt; /* Maximum course points */
uint32 max_course_trk_pnt; /* Maximum course track points */
} D1013_Course_Limits_Type;