uint32_t osmo_gad_enc_lat(int32_t deg_1e6)
Encode a latitude value according to 3GPP TS 23.032.
Definition: gad.c:55
int32_t osmo_gad_dec_lon(uint32_t lon)
Decode a longitude value according to 3GPP TS 23.032.
Definition: gad.c:128
int osmo_gad_enc(union gad_raw *gad_raw, const struct osmo_gad *gad)
Write GAD values with consistent units to raw GAD PDU representation.
Definition: gad.c:376
uint32_t osmo_gad_dec_unc(uint8_t unc)
Decode an uncertainty circle value according to 3GPP TS 23.032.
Definition: gad.c:178
int osmo_gad_dec(struct osmo_gad *gad, struct osmo_gad_err **err, void *err_ctx, const union gad_raw *gad_raw)
Decode GAD raw PDU to values with consistent units.
Definition: gad.c:394
gad_type
Definition: gsm_23_032.h:32
int osmo_gad_raw_read(union gad_raw *gad_raw, struct osmo_gad_err **err, void *err_ctx, const uint8_t *data, uint8_t len)
Read a GAD PDU and validate structure.
Definition: gad.c:350
uint8_t osmo_gad_enc_unc(uint32_t mm)
Encode an uncertainty circle value according to 3GPP TS 23.032.
Definition: gad.c:190
uint32_t osmo_gad_enc_lon(int32_t deg_1e6)
Encode a longitude value according to 3GPP TS 23.032.
Definition: gad.c:102
int32_t osmo_gad_dec_lat(uint32_t lat)
Decode a latitude value according to 3GPP TS 23.032.
Definition: gad.c:81
const struct value_string osmo_gad_type_names[]
Definition: gad.c:36
int osmo_gad_raw_write(struct msgb *msg, const union gad_raw *gad_raw)
Append a GAD PDU to the msgb.
Definition: gad.c:327
char * osmo_gad_to_str_c(void *ctx, const struct osmo_gad *gad)
Return a human readable representation of GAD (location estimate) values.
Definition: gad.c:486
static const char * osmo_gad_type_name(enum gad_type val)
Definition: gad.h:172
int osmo_gad_to_str_buf(char *buf, size_t buflen, const struct osmo_gad *gad)
Return a human readable representation of GAD (location estimate) values.
Definition: gad.c:443
const char * get_value_string(const struct value_string *vs, uint32_t val)
uint8_t len
Definition: gsm_04_11.h:0
uint8_t msg[0]
Definition: gsm_08_08.h:8
uint8_t lon[3]
Definition: gsm_23_032.h:2
uint8_t lat[3]
Definition: gsm_23_032.h:1
uint32_t unc_r
Uncertainty circle radius in millimeters, 0 .
Definition: gad.h:114
uint16_t ofs_angle
Offset angle of first arc edge in degrees from North clockwise (eastwards), 0..359.
Definition: gad.h:117
uint8_t confidence
Confidence in percent, 0 = no information, 1..100%, 101..128 = no information.
Definition: gad.h:122
int32_t lat
latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:107
int32_t lon
longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:109
uint32_t inner_r
inner circle radius in mm (m * 1e3)
Definition: gad.h:111
uint16_t incl_angle
Included angle defining the angular width of the arc, in degrees clockwise, 1..360.
Definition: gad.h:120
uint8_t major_ori
Major axis orientation in degrees (DEG), 0 (N) .
Definition: gad.h:96
uint32_t unc_semi_major
Uncertainty ellipsoid radius of major axis in millimeters, 0 .
Definition: gad.h:91
int16_t alt
Altitude in meters, -32767 (depth) .
Definition: gad.h:88
int32_t lon
longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:86
int32_t lat
latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:84
uint8_t confidence
Confidence in percent, 0 = no information, 1..100%, 101..128 = no information.
Definition: gad.h:102
uint32_t unc_semi_minor
Uncertainty ellipsoid radius of minor axis in millimeters, 0 .
Definition: gad.h:94
int32_t unc_alt
Uncertainty altitude in millimeters, 0 .
Definition: gad.h:100
int32_t lat
latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:75
int16_t alt
Altitude in meters, -32767 (depth) .
Definition: gad.h:79
int32_t lon
longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:77
int32_t lon
Longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:46
uint32_t unc
Uncertainty circle radius in millimeters (m * 1e3), 0 .
Definition: gad.h:48
int32_t lat
Latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:44
int32_t lon
Longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:55
int32_t lat
Latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:53
uint32_t unc_semi_minor
Uncertainty ellipsoid radius of minor axis in millimeters, 0 .
Definition: gad.h:61
uint8_t major_ori
Major axis orientation in degrees (DEG), 0 (N) .
Definition: gad.h:63
uint32_t unc_semi_major
Uncertainty ellipsoid radius of major axis in millimeters, 0 .
Definition: gad.h:58
uint8_t confidence
Confidence in percent, 0 = no information, 1..100%, 101..128 = no information.
Definition: gad.h:65
int32_t lon
Longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:39
int32_t lat
Latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:37
int rc
Definition: gad.h:166
enum gad_type type
Definition: gad.h:167
char * logmsg
Definition: gad.h:168
int32_t lat
latitude in micro degrees (degrees * 1e6), -90'000'000 (S) .
Definition: gad.h:127
uint32_t unc_semi_major
Uncertainty ellipsoid radius of major axis in millimeters, 0 .
Definition: gad.h:135
int32_t alt
Altitude in millimeters, -500'000 (depth) .
Definition: gad.h:131
uint8_t v_confidence
Vertical confidence in percent, 0 = no information, 1..100%, 101..128 = no information.
Definition: gad.h:147
uint8_t h_confidence
Horizontal confidence in percent, 0 = no information, 1..100%, 101..128 = no information.
Definition: gad.h:143
uint8_t major_ori
Major axis orientation in degrees (DEG), 0 (N) .
Definition: gad.h:141
uint32_t unc_semi_minor
Uncertainty ellipsoid radius of minor axis in millimeters, 0 .
Definition: gad.h:139
int32_t unc_alt
High-Accuracy uncertainty altitude.
Definition: gad.h:145
int32_t lon
longitude in micro degrees (degrees * 1e6), -180'000'000 (W) .
Definition: gad.h:129
struct osmo_gad_ell_point point[15]
Definition: gad.h:70
uint8_t num_points
Definition: gad.h:69
enum gad_type type
Definition: gad.h:151
struct osmo_gad_ell_point_unc_ellipse ell_point_unc_ellipse
Definition: gad.h:155
struct osmo_gad_ell_point ell_point
Definition: gad.h:153
struct osmo_gad_ell_point_unc_ellipse ha_ell_point_unc_ellipse
Definition: gad.h:160
struct osmo_gad_ell_point_alt_unc_ell ell_point_alt_unc_ell
Definition: gad.h:158
struct osmo_gad_ell_arc ell_arc
Definition: gad.h:159
struct osmo_gad_ha_ell_point_alt_unc_ell ha_ell_point_alt_unc_ell
Definition: gad.h:161
struct osmo_gad_polygon polygon
Definition: gad.h:156
struct osmo_gad_ell_point_unc_circle ell_point_unc_circle
Definition: gad.h:154
struct osmo_gad_ell_point_alt ell_point_alt
Definition: gad.h:157
GAD PDU in network-byte-order according to 3GPP TS 23.032 GAD: Universal Geographical Area Descriptio...
Definition: gsm_23_032.h:239