+#ifndef HAS_WIDE_GPS
+#define HAS_WIDE_GPS 1
+#endif
+
+#ifdef HAS_TELEMETRY
+#ifndef HAS_RDF
+#define HAS_RDF 1
+#endif
+#endif
+
+#if HAS_WIDE_GPS
+typedef int32_t gps_alt_t;
+#define AO_TELEMETRY_LOCATION_ALTITUDE(l) (((gps_alt_t) (l)->altitude_high << 16) | ((l)->altitude_low))
+#define AO_TELEMETRY_LOCATION_SET_ALTITUDE(l,a) (((l)->mode |= AO_GPS_MODE_ALTITUDE_24), \
+ ((l)->altitude_high = (a) >> 16), \
+ ((l)->altitude_low = (a)))
+#else
+typedef int16_t gps_alt_t;
+#define AO_TELEMETRY_LOCATION_ALTITUDE(l) ((gps_alt_t) (l)->altitude_low)
+#define AO_TELEMETRY_LOCATION_SET_ALTITUDE(l,a) (((l)->mode = 0, \
+ (l)->altitude_low = (a)))
+#endif /* HAS_WIDE_GPS */
+