Loading gn/packet-gn.c +18 −18 Original line number Diff line number Diff line Loading @@ -533,7 +533,7 @@ static int tree_gn_cert_time64(tvbuff_t *tvb, proto_tree *ext_tree, int hf_gn_ty strftime(time_buf, 255, "%Y-%m-%d %H:%M:%S", time_tm); time_buf[255] = '\0'; proto_tree_add_uint64_format(ext_tree, hf_gn_type, tvb, offset, 8, FALSE, proto_tree_add_uint64_format(ext_tree, hf_gn_type, tvb, offset, 8, time64_us, "Generation Time: %19s.%06d (%lld)", time_buf, time_us, time64_us); Loading @@ -553,7 +553,7 @@ static int tree_gn_cert_time32(tvbuff_t *tvb, proto_tree *ext_tree, int hf_gn_ty time_tm = gmtime(&time_sec); strftime(time_buf, 40, "%Y-%m-%d %H:%M:%S", time_tm); proto_tree_add_uint_format(ext_tree, hf_gn_type, tvb, offset, 4, FALSE, proto_tree_add_uint_format(ext_tree, hf_gn_type, tvb, offset, 4, time32_s, "Time: %19s (%d)", time_buf, time32_s); return 4; Loading @@ -576,7 +576,7 @@ static int tree_gn_3dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -590,7 +590,7 @@ static int tree_gn_3dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -602,7 +602,7 @@ static int tree_gn_3dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 4; elevation = (guint16)(tvb_get_guint8(tvb, offset) << 8) | (guint16)tvb_get_guint8(tvb, offset + 1); proto_tree_add_uint_format_value(loc_tree, hf_gn_area_elev, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(loc_tree, hf_gn_area_elev, tvb, offset, 2, elevation, "%d meter(s)", elevation ); Loading @@ -628,7 +628,7 @@ static int tree_gn_2dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -642,7 +642,7 @@ static int tree_gn_2dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading Loading @@ -826,7 +826,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_so_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_so_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -839,7 +839,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_so_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_so_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -857,7 +857,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) if((speed & M_SPEED_SIGN) == M_SPEED_SIGN) { speed |= M_PAI; } proto_tree_add_int_format_value(tree, hf_gn_so_speed, tvb, offset, 2, FALSE, proto_tree_add_int_format_value(tree, hf_gn_so_speed, tvb, offset, 2, speed, "%.2f m/s | %.2f km/h (%d)", speed / 100.0, speed * 0.036, Loading @@ -866,7 +866,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) offset += 2; /* Heading */ proto_tree_add_uint_format_value(tree, hf_gn_so_heading, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(tree, hf_gn_so_heading, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%.1f° (%d)", (tvb_get_ntohs(tvb, offset) % 3600) / 10.0, tvb_get_ntohs(tvb, offset) Loading Loading @@ -907,7 +907,7 @@ static int tree_gn_depv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_de_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_de_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -920,7 +920,7 @@ static int tree_gn_depv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_de_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_de_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading Loading @@ -959,7 +959,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(ext_tree, hf_gn_area_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(ext_tree, hf_gn_area_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -972,7 +972,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(ext_tree, hf_gn_area_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(ext_tree, hf_gn_area_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -983,7 +983,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 4; /* Distance A */ proto_tree_add_uint_format_value(ext_tree, hf_gn_area_a, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(ext_tree, hf_gn_area_a, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%d m (%d)", tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset) Loading @@ -991,7 +991,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 2; /* Distance B */ proto_tree_add_uint_format_value(ext_tree, hf_gn_area_b, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(ext_tree, hf_gn_area_b, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%d m (%d)", tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset) Loading @@ -999,7 +999,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 2; /* Angle */ proto_tree_add_uint_format_value(ext_tree, hf_gn_area_angle, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(ext_tree, hf_gn_area_angle, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%d° (%d)", tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset) Loading Loading
gn/packet-gn.c +18 −18 Original line number Diff line number Diff line Loading @@ -533,7 +533,7 @@ static int tree_gn_cert_time64(tvbuff_t *tvb, proto_tree *ext_tree, int hf_gn_ty strftime(time_buf, 255, "%Y-%m-%d %H:%M:%S", time_tm); time_buf[255] = '\0'; proto_tree_add_uint64_format(ext_tree, hf_gn_type, tvb, offset, 8, FALSE, proto_tree_add_uint64_format(ext_tree, hf_gn_type, tvb, offset, 8, time64_us, "Generation Time: %19s.%06d (%lld)", time_buf, time_us, time64_us); Loading @@ -553,7 +553,7 @@ static int tree_gn_cert_time32(tvbuff_t *tvb, proto_tree *ext_tree, int hf_gn_ty time_tm = gmtime(&time_sec); strftime(time_buf, 40, "%Y-%m-%d %H:%M:%S", time_tm); proto_tree_add_uint_format(ext_tree, hf_gn_type, tvb, offset, 4, FALSE, proto_tree_add_uint_format(ext_tree, hf_gn_type, tvb, offset, 4, time32_s, "Time: %19s (%d)", time_buf, time32_s); return 4; Loading @@ -576,7 +576,7 @@ static int tree_gn_3dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -590,7 +590,7 @@ static int tree_gn_3dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -602,7 +602,7 @@ static int tree_gn_3dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 4; elevation = (guint16)(tvb_get_guint8(tvb, offset) << 8) | (guint16)tvb_get_guint8(tvb, offset + 1); proto_tree_add_uint_format_value(loc_tree, hf_gn_area_elev, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(loc_tree, hf_gn_area_elev, tvb, offset, 2, elevation, "%d meter(s)", elevation ); Loading @@ -628,7 +628,7 @@ static int tree_gn_2dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -642,7 +642,7 @@ static int tree_gn_2dpos(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(loc_tree, hf_gn_area_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading Loading @@ -826,7 +826,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_so_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_so_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -839,7 +839,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_so_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_so_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -857,7 +857,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) if((speed & M_SPEED_SIGN) == M_SPEED_SIGN) { speed |= M_PAI; } proto_tree_add_int_format_value(tree, hf_gn_so_speed, tvb, offset, 2, FALSE, proto_tree_add_int_format_value(tree, hf_gn_so_speed, tvb, offset, 2, speed, "%.2f m/s | %.2f km/h (%d)", speed / 100.0, speed * 0.036, Loading @@ -866,7 +866,7 @@ static int tree_gn_sopv(tvbuff_t *tvb, proto_tree *header_tree, int offset) offset += 2; /* Heading */ proto_tree_add_uint_format_value(tree, hf_gn_so_heading, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(tree, hf_gn_so_heading, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%.1f° (%d)", (tvb_get_ntohs(tvb, offset) % 3600) / 10.0, tvb_get_ntohs(tvb, offset) Loading Loading @@ -907,7 +907,7 @@ static int tree_gn_depv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_de_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_de_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -920,7 +920,7 @@ static int tree_gn_depv(tvbuff_t *tvb, proto_tree *header_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(tree, hf_gn_de_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(tree, hf_gn_de_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading Loading @@ -959,7 +959,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Latitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(ext_tree, hf_gn_area_lat, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(ext_tree, hf_gn_area_lat, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -972,7 +972,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) /* Longitude */ tmp_ll = (gint32)tvb_get_ntohl(tvb, offset); coordinate = tmp_ll / 10000000.0; proto_tree_add_int_format_value(ext_tree, hf_gn_area_long, tvb, offset, 4, FALSE, proto_tree_add_int_format_value(ext_tree, hf_gn_area_long, tvb, offset, 4, tmp_ll, "%02d°%02d'%02.2f\"%c (%d)", abs((int)coordinate), abs((int)((coordinate - (int)coordinate) * 60)), Loading @@ -983,7 +983,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 4; /* Distance A */ proto_tree_add_uint_format_value(ext_tree, hf_gn_area_a, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(ext_tree, hf_gn_area_a, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%d m (%d)", tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset) Loading @@ -991,7 +991,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 2; /* Distance B */ proto_tree_add_uint_format_value(ext_tree, hf_gn_area_b, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(ext_tree, hf_gn_area_b, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%d m (%d)", tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset) Loading @@ -999,7 +999,7 @@ static int tree_gn_ext_geoarea(tvbuff_t *tvb, proto_tree *ext_tree, int offset) offset += 2; /* Angle */ proto_tree_add_uint_format_value(ext_tree, hf_gn_area_angle, tvb, offset, 2, FALSE, proto_tree_add_uint_format_value(ext_tree, hf_gn_area_angle, tvb, offset, 2, tvb_get_ntohs(tvb, offset), "%d° (%d)", tvb_get_ntohs(tvb, offset), tvb_get_ntohs(tvb, offset) Loading