aboutsummaryrefslogtreecommitdiffstats
path: root/asn1/gsmmap/packet-gsm_map-template.c
diff options
context:
space:
mode:
authorAnders Broman <anders.broman@ericsson.com>2006-06-02 05:02:54 +0000
committerAnders Broman <anders.broman@ericsson.com>2006-06-02 05:02:54 +0000
commit2143fccee359e0ed19599296f1f8ed28bc72e966 (patch)
treeddc03582adac4256a1fa72cd286b3d890be71efa /asn1/gsmmap/packet-gsm_map-template.c
parent6dbebe8f8655c7aa7dbb1a032078293054ebf20e (diff)
Correct dissect_geographical_description.
svn path=/trunk/; revision=18307
Diffstat (limited to 'asn1/gsmmap/packet-gsm_map-template.c')
-rw-r--r--asn1/gsmmap/packet-gsm_map-template.c54
1 files changed, 38 insertions, 16 deletions
diff --git a/asn1/gsmmap/packet-gsm_map-template.c b/asn1/gsmmap/packet-gsm_map-template.c
index 6f62cd1d24..0239faaeeb 100644
--- a/asn1/gsmmap/packet-gsm_map-template.c
+++ b/asn1/gsmmap/packet-gsm_map-template.c
@@ -121,6 +121,7 @@ static int hf_geo_loc_uncertainty_code = -1;
static int hf_geo_loc_uncertainty_semi_major = -1;
static int hf_geo_loc_uncertainty_semi_minor = -1;
static int hf_geo_loc_orientation_of_major_axis = -1;
+static int hf_geo_loc_uncertainty_altitude = -1;
static int hf_geo_loc_confidence = -1;
static int hf_geo_loc_no_of_points = -1;
static int hf_geo_loc_D = -1;
@@ -450,29 +451,45 @@ dissect_geographical_description(tvbuff_t *tvb, packet_info *pinfo, proto_tree *
proto_tree_add_item(tree, hf_geo_loc_confidence, tvb, offset, 1, FALSE);
}else if(type_of_shape==8){
/* Ellipsoid Point with Altitude */
- offset++;
/*D: Direction of Altitude */
proto_tree_add_item(tree, hf_geo_loc_D, tvb, offset, 1, FALSE);
/* Altitude */
proto_tree_add_item(tree, hf_geo_loc_altitude, tvb, offset, 2, FALSE);
}else if(type_of_shape==9){
/* Ellipsoid Point with altitude and uncertainty ellipsoid */
- offset++;
- /*D: Direction of Altitude */
+ /*D: Direction of Altitude octet 8,9 */
proto_tree_add_item(tree, hf_geo_loc_D, tvb, offset, 1, FALSE);
- /* Altitude */
+ /* Altitude Octet 8,9*/
proto_tree_add_item(tree, hf_geo_loc_altitude, tvb, offset, 2, FALSE);
- offset++;
- /* Uncertainty semi-major */
+ offset = offset +2;
+ /* Uncertainty semi-major octet 10
+ * To convert to metres 10*(((1.1)^X)-1)
+ *
+ * value = tvb_get_guint8(tvb,offset)
+ *
+ * value = 10*(pow(1.1,tvb_get_guint8(tvb,offset))-1);
+ * proto_tree_add_uint(tree, hf_geo_loc_uncertainty_semi_major, tvb, offset, 1, value);
+ */
proto_tree_add_item(tree, hf_geo_loc_uncertainty_semi_major, tvb, offset, 1, FALSE);
offset++;
- /* Uncertainty semi-minor */
+ /* Uncertainty semi-minor Octet 11
+ * To convert to metres 10*(((1.1)^X)-1)
+ */
proto_tree_add_item(tree, hf_geo_loc_uncertainty_semi_minor, tvb, offset, 1, FALSE);
offset++;
- /* Orientation of major axis */
+ /* Orientation of major axis octet 12
+ * allowed value from 0-179 to convert
+ * to actual degrees multiply by 2.
+ */
proto_tree_add_item(tree, hf_geo_loc_orientation_of_major_axis, tvb, offset, 1, FALSE);
offset++;
- /* Confidence */
+ /* Uncertainty Altitude 13
+ * to convert to metres 45*(((1.025)^X)-1)
+ */
+ proto_tree_add_item(tree, hf_geo_loc_uncertainty_altitude, tvb, offset, 1, FALSE);
+ offset++;
+ /* Confidence octet 14
+ */
proto_tree_add_item(tree, hf_geo_loc_confidence, tvb, offset, 1, FALSE);
}else if(type_of_shape==10){
/* Ellipsoid Arc */
@@ -2080,12 +2097,12 @@ void proto_register_gsm_map(void) {
},
{ &hf_geo_loc_deg_of_lat,
{ "Degrees of latitude","gad.sign_of_latitude",
- FT_UINT32,BASE_DEC, NULL, 0x3fffff,
+ FT_UINT24,BASE_DEC, NULL, 0x7fffff,
"Degrees of latitude", HFILL }
},
{ &hf_geo_loc_deg_of_long,
{ "Degrees of longitude","gad.sign_of_longitude",
- FT_UINT32,BASE_DEC, NULL, 0xffffff,
+ FT_UINT24,BASE_DEC, NULL, 0xffffff,
"Degrees of longitude", HFILL }
},
{ &hf_geo_loc_uncertainty_code,
@@ -2096,7 +2113,7 @@ void proto_register_gsm_map(void) {
{ &hf_geo_loc_uncertainty_semi_major,
{ "Uncertainty semi-major","gad.uncertainty_semi_major",
FT_UINT8,BASE_DEC, NULL, 0x7f,
- "Uncertainty semi-majore", HFILL }
+ "Uncertainty semi-major", HFILL }
},
{ &hf_geo_loc_uncertainty_semi_minor,
{ "Uncertainty semi-minor","gad.uncertainty_semi_minor",
@@ -2108,10 +2125,15 @@ void proto_register_gsm_map(void) {
FT_UINT8,BASE_DEC, NULL, 0x0,
"Orientation of major axis", HFILL }
},
+ { &hf_geo_loc_uncertainty_altitude,
+ { "Uncertainty Altitude","gad.uncertainty_altitude",
+ FT_UINT8,BASE_DEC, NULL, 0x7f,
+ "Uncertainty Altitude", HFILL }
+ },
{ &hf_geo_loc_confidence,
- { "Confidence","gad.confidence",
+ { "Confidence(%)","gad.confidence",
FT_UINT8,BASE_DEC, NULL, 0x7f,
- "Confidence", HFILL }
+ "Confidence(%)", HFILL }
},
{ &hf_geo_loc_no_of_points,
{ "Number of points","gad.no_of_points",
@@ -2120,11 +2142,11 @@ void proto_register_gsm_map(void) {
},
{ &hf_geo_loc_D,
{ "D: Direction of Altitude","gad.D",
- FT_UINT8,BASE_DEC, VALS(dir_of_alt_vals), 0x8000,
+ FT_UINT16,BASE_DEC, VALS(dir_of_alt_vals), 0x8000,
"D: Direction of Altitude", HFILL }
},
{ &hf_geo_loc_altitude,
- { "Altitude","gad.altitude",
+ { "Altitude in meters","gad.altitude",
FT_UINT16,BASE_DEC, NULL, 0x7fff,
"Altitude", HFILL }
},