+#endif
+
+ return sprintf ((char *) tncBuffer, "/%02u%02u%02uh%02u%02u.%02u%c/%03u%02u.%02u%c'/A=%06u\015",
+ ao_gps_data.hour,
+ ao_gps_data.minute,
+ ao_gps_data.second,
+ lat_deg, lat_min, lat_frac, lat_sign,
+ lon_deg, lon_min, lon_frac, lon_sign,
+ altitude);
+#endif
+ buf = tncBuffer;
+#if APRS_TIME
+ sprintf ((char *) buf, "/%02u%02u%02uh",
+ ao_gps_data.hour,
+ ao_gps_data.minute,
+ ao_gps_data.second);
+ buf += 8;
+#else
+ *buf++ = '!';
+#endif
+
+ /* Symbol table ID */
+ *buf++ = '/';
+
+ latitude = ((uint64_t) 380926 * (900000000 - latitude)) / 10000000;
+ longitude = ((uint64_t) 190463 * (1800000000 + longitude)) / 10000000;
+
+#define ALTITUDE_LOG_BASE 0.001998002662673f /* log(1.002) */
+
+ altitude = logf((float) altitude) * (1/ALTITUDE_LOG_BASE);
+
+ tncCompressInt(buf, latitude, 4);
+ buf += 4;
+ tncCompressInt(buf, longitude, 4);
+ buf += 4;
+
+ /* Symbol code */
+ *buf++ = '\'';
+
+ tncCompressInt(buf, altitude, 2);
+ buf += 2;
+
+ *buf++ = 33 + ((1 << 5) | (2 << 3));
+ *buf++ = '\0';
+ return buf - tncBuffer;