libosmogsm  1.4.0.160-7619
Osmocom GSM library
gsm_23_032.h
Go to the documentation of this file.
1 
5 /*
6  * (C) 2020 by sysmocom - s.f.m.c. GmbH <info@sysmocom.de>
7  *
8  * All Rights Reserved
9  *
10  * Author: Neels Hofmeyr <neels@hofmeyr.de>
11  *
12  * This program is free software; you can redistribute it and/or modify
13  * it under the terms of the GNU Affero General Public License as published by
14  * the Free Software Foundation; either version 3 of the License, or
15  * (at your option) any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU Affero General Public License for more details.
21  *
22  * You should have received a copy of the GNU Affero General Public License
23  * along with this program. If not, see <http://www.gnu.org/licenses/>.
24  *
25  */
26 
27 #pragma once
28 
29 #include <stdint.h>
30 #include <osmocom/core/endian.h>
31 
32 enum gad_type {
50 };
51 
52 struct gad_raw_head {
53  uint8_t spare:4,
54  type:4;
55 } __attribute__ ((packed));
56 
58  struct gad_raw_head h;
59  uint8_t lat[3];
60  uint8_t lon[3];
61 } __attribute__ ((packed));
62 
64  struct gad_raw_head h;
65  uint8_t lat[3];
66  uint8_t lon[3];
67  uint8_t unc:7,
68  spare2:1;
69 } __attribute__ ((packed));
70 
72  struct gad_raw_head h;
73  uint8_t lat[3];
74  uint8_t lon[3];
75  uint8_t unc_semi_major:7,
76  spare1:1;
77  uint8_t unc_semi_minor:7,
78  spare2:1;
79  uint8_t major_ori;
80  uint8_t confidence:7,
81  spare3:1;
82 } __attribute__ ((packed));
83 
85  struct {
86  uint8_t num_points:4;
87  uint8_t type:4;
88  } h;
89  struct {
90  uint8_t lat[3];
91  uint8_t lon[3];
92  } point[15];
93 } __attribute__ ((packed));
94 
96  struct gad_raw_head h;
97  uint8_t lat[3];
98  uint8_t lon[3];
99  uint8_t alt[2];
100 } __attribute__ ((packed));
101 
103  struct gad_raw_head h;
104  uint8_t lat[3];
105  uint8_t lon[3];
106  uint8_t alt[2];
107  uint8_t unc_semi_major:7,
109  uint8_t unc_semi_minor:7,
111  uint8_t major_ori;
112  uint8_t unc_alt:7,
114  uint8_t confidence:7,
116 } __attribute__ ((packed));
117 
119  struct gad_raw_head h;
120  uint8_t lat[3];
121  uint8_t lon[3];
122  uint8_t inner_r[2];
123  uint8_t unc_r:7,
125  uint8_t ofs_angle;
126  uint8_t incl_angle;
127  uint8_t confidence:7,
129 } __attribute__ ((packed));
130 
132  struct gad_raw_head h;
133  uint8_t lat[4];
134  uint8_t lon[4];
135  uint8_t alt[3];
136  uint8_t unc_semi_major;
137  uint8_t unc_semi_minor;
138  uint8_t major_ori;
139  uint8_t confidence:7,
141 } __attribute__ ((packed));
142 
144  struct gad_raw_head h;
145  uint8_t lat[4];
146  uint8_t lon[4];
147  uint8_t alt[3];
148  uint8_t unc_semi_major;
149  uint8_t unc_semi_minor;
150  uint8_t major_ori;
151  uint8_t h_confidence:7,
153  uint8_t unc_alt;
154  uint8_t v_confidence:7,
156 } __attribute__ ((packed));
157 
159 union gad_raw {
160  struct gad_raw_head h;
164  struct gad_raw_polygon polygon;
167  struct gad_raw_ell_arc ell_arc;
170 } __attribute__ ((packed));
171 
gad_type
Definition: gsm_23_032.h:32
struct gad_raw_head __attribute__((packed))
@ GAD_TYPE_POLYGON
Definition: gsm_23_032.h:39
@ GAD_TYPE_ELL_POINT_ALT
Ellipsoid point with altitude.
Definition: gsm_23_032.h:41
@ GAD_TYPE_HA_ELL_POINT_UNC_ELLIPSE
High accuracy ellipsoid point with uncertainty ellipse.
Definition: gsm_23_032.h:47
@ GAD_TYPE_ELL_POINT
Ellipsoid point.
Definition: gsm_23_032.h:34
@ GAD_TYPE_ELL_POINT_ALT_UNC_ELL
Ellipsoid point with altitude and uncertainty ellipsoid.
Definition: gsm_23_032.h:43
@ GAD_TYPE_ELL_POINT_UNC_CIRCLE
Ellipsoid point with uncertainty circle.
Definition: gsm_23_032.h:36
@ GAD_TYPE_HA_ELL_POINT_ALT_UNC_ELL
High accuracy ellipsoid point with altitude and uncertainty ellipsoid.
Definition: gsm_23_032.h:49
@ GAD_TYPE_ELL_POINT_UNC_ELLIPSE
Ellipsoid point with uncertainty ellipse.
Definition: gsm_23_032.h:38
@ GAD_TYPE_ELL_ARC
Ellipsoid arc.
Definition: gsm_23_032.h:45
Definition: gsm_23_032.h:118
uint8_t incl_angle
Definition: gsm_23_032.h:126
uint8_t ofs_angle
Definition: gsm_23_032.h:125
uint8_t lat[3]
Definition: gsm_23_032.h:120
uint8_t inner_r[2]
Definition: gsm_23_032.h:122
struct gad_raw_head h
type = GAD_TYPE_ELL_ARC
Definition: gsm_23_032.h:119
uint8_t confidence
Definition: gsm_23_032.h:127
uint8_t unc_r
Definition: gsm_23_032.h:123
uint8_t lon[3]
Definition: gsm_23_032.h:121
uint8_t spare1
Definition: gsm_23_032.h:124
uint8_t spare2
Definition: gsm_23_032.h:128
Definition: gsm_23_032.h:102
uint8_t unc_alt
Definition: gsm_23_032.h:112
uint8_t unc_semi_major
Definition: gsm_23_032.h:107
uint8_t spare4
Definition: gsm_23_032.h:115
uint8_t spare3
Definition: gsm_23_032.h:113
uint8_t unc_semi_minor
Definition: gsm_23_032.h:109
uint8_t major_ori
Definition: gsm_23_032.h:111
uint8_t lat[3]
Definition: gsm_23_032.h:104
uint8_t alt[2]
Definition: gsm_23_032.h:106
struct gad_raw_head h
type = GAD_TYPE_ELL_POINT_ALT_UNC_ELL
Definition: gsm_23_032.h:103
uint8_t confidence
Definition: gsm_23_032.h:114
uint8_t lon[3]
Definition: gsm_23_032.h:105
uint8_t spare2
Definition: gsm_23_032.h:110
uint8_t spare1
Definition: gsm_23_032.h:108
Definition: gsm_23_032.h:95
uint8_t lon[3]
Definition: gsm_23_032.h:98
uint8_t alt[2]
Definition: gsm_23_032.h:99
uint8_t lat[3]
Definition: gsm_23_032.h:97
struct gad_raw_head h
type = GAD_TYPE_ELL_POINT_ALT
Definition: gsm_23_032.h:96
Definition: gsm_23_032.h:63
uint8_t lat[3]
Definition: gsm_23_032.h:65
struct gad_raw_head h
type = GAD_TYPE_ELL_POINT_UNC_CIRCLE
Definition: gsm_23_032.h:64
uint8_t lon[3]
Definition: gsm_23_032.h:66
uint8_t unc
Definition: gsm_23_032.h:67
uint8_t spare2
Definition: gsm_23_032.h:68
Definition: gsm_23_032.h:71
uint8_t confidence
Definition: gsm_23_032.h:80
uint8_t unc_semi_major
Definition: gsm_23_032.h:75
uint8_t spare3
Definition: gsm_23_032.h:81
uint8_t spare1
Definition: gsm_23_032.h:76
uint8_t spare2
Definition: gsm_23_032.h:78
uint8_t lon[3]
Definition: gsm_23_032.h:74
struct gad_raw_head h
type = GAD_TYPE_ELL_POINT_UNC_ELLIPSE
Definition: gsm_23_032.h:72
uint8_t major_ori
Definition: gsm_23_032.h:79
uint8_t lat[3]
Definition: gsm_23_032.h:73
uint8_t unc_semi_minor
Definition: gsm_23_032.h:77
Definition: gsm_23_032.h:57
uint8_t lat[3]
Definition: gsm_23_032.h:59
struct gad_raw_head h
type = GAD_TYPE_ELL_POINT
Definition: gsm_23_032.h:58
uint8_t lon[3]
Definition: gsm_23_032.h:60
Definition: gsm_23_032.h:143
struct gad_raw_head h
type = GAD_TYPE_HA_ELL_POINT_ALT_UNC_ELL
Definition: gsm_23_032.h:144
uint8_t lat[4]
Definition: gsm_23_032.h:145
uint8_t spare2
Definition: gsm_23_032.h:155
uint8_t major_ori
Definition: gsm_23_032.h:150
uint8_t v_confidence
Definition: gsm_23_032.h:154
uint8_t unc_semi_major
Definition: gsm_23_032.h:148
uint8_t h_confidence
Definition: gsm_23_032.h:151
uint8_t unc_alt
Definition: gsm_23_032.h:153
uint8_t spare1
Definition: gsm_23_032.h:152
uint8_t alt[3]
Definition: gsm_23_032.h:147
uint8_t lon[4]
Definition: gsm_23_032.h:146
uint8_t unc_semi_minor
Definition: gsm_23_032.h:149
Definition: gsm_23_032.h:131
uint8_t confidence
Definition: gsm_23_032.h:139
uint8_t unc_semi_major
Definition: gsm_23_032.h:136
uint8_t lon[4]
Definition: gsm_23_032.h:134
uint8_t spare1
Definition: gsm_23_032.h:140
uint8_t unc_semi_minor
Definition: gsm_23_032.h:137
uint8_t alt[3]
Definition: gsm_23_032.h:135
uint8_t lat[4]
Definition: gsm_23_032.h:133
uint8_t major_ori
Definition: gsm_23_032.h:138
struct gad_raw_head h
type = GAD_TYPE_HA_ELL_POINT_UNC_ELLIPSE
Definition: gsm_23_032.h:132
Definition: gsm_23_032.h:52
uint8_t spare
Definition: gsm_23_032.h:53
uint8_t type
Definition: gsm_23_032.h:54
Definition: gsm_23_032.h:84
uint8_t num_points
Definition: gsm_23_032.h:86
struct gad_raw_polygon::@71 point[15]
struct gad_raw_polygon::@70 h
uint8_t lat[3]
Definition: gsm_23_032.h:90
uint8_t type
type = GAD_TYPE_POLYGON
Definition: gsm_23_032.h:87
uint8_t lon[3]
Definition: gsm_23_032.h:91
GAD PDU in network-byte-order according to 3GPP TS 23.032 GAD: Universal Geographical Area Descriptio...
Definition: gsm_23_032.h:159
struct gad_raw_ha_ell_point_unc_ell ha_ell_point_unc_ell
Definition: gsm_23_032.h:168
struct gad_raw_ell_point_alt_unc_ell ell_point_alt_unc_ell
Definition: gsm_23_032.h:166
struct gad_raw_ell_point_unc_ellipse ell_point_unc_ellipse
Definition: gsm_23_032.h:163
struct gad_raw_polygon polygon
Definition: gsm_23_032.h:164
struct gad_raw_ell_point ell_point
Definition: gsm_23_032.h:161
struct gad_raw_ell_arc ell_arc
Definition: gsm_23_032.h:167
struct gad_raw_ell_point_unc_circle ell_point_unc_circle
Definition: gsm_23_032.h:162
struct gad_raw_ell_point_alt ell_point_alt
Definition: gsm_23_032.h:165
struct gad_raw_head h
Definition: gsm_23_032.h:160
struct gad_raw_ha_ell_point_alt_unc_ell ha_ell_point_alt_unc_ell
Definition: gsm_23_032.h:169