# HG changeset patch # User Ethan Zonca # Date 2017-01-03 14:53:00 # Node ID a675e30661bdf0d9adf9a8937679270b660be097 # Parent 7ff1c5a5957104dcdfa0099a6329cff84f061a2e Actual GPS now correctly passed though diff --git a/Libraries/aprs/aprs.c b/Libraries/aprs/aprs.c --- a/Libraries/aprs/aprs.c +++ b/Libraries/aprs/aprs.c @@ -61,36 +61,33 @@ void aprs_send(void) tmpBuffer[0] = ','; tmpBuffer[1] = '\0'; - //ax25_send_string(get_latitude()); - snprintf(tmpBuffer, 128, "%g,", gps_getdata()->latitude / 10000000.0); - //ax25_send_string("42.153749"); + // Latitude + snprintf(tmpBuffer, 128, "%ld,", gps_getdata()->latitude); ax25_send_string(tmpBuffer); - ax25_send_byte(','); - //ax25_send_string(get_longitude()); - ax25_send_string("53.234823"); - ax25_send_byte(','); - - //ax25_send_string(get_speedKnots()); - ax25_send_string("33"); - ax25_send_byte(','); - //ax25_send_string(get_gpsaltitude()); - ax25_send_string("3847"); - ax25_send_byte(','); + // Longitude + snprintf(tmpBuffer, 128, "%ld,", gps_getdata()->longitude); + ax25_send_string(tmpBuffer); + + // Speed + snprintf(tmpBuffer, 128, "%d,", gps_getdata()->speed); + ax25_send_string(tmpBuffer); - //ax25_send_string(get_pressure()); - ax25_send_string("8383.00"); - ax25_send_byte(','); + // Altitude + snprintf(tmpBuffer, 128, "%d,", gps_getdata()->altitude); + ax25_send_string(tmpBuffer); - //ax25_send_string(get_temperature()); - ax25_send_string("25.3"); - ax25_send_byte(','); + // Pressure + snprintf(tmpBuffer, 128, "%d,", 23); + ax25_send_string(tmpBuffer); - //ax25_send_string(get_temperature()); + // Temperature + snprintf(tmpBuffer, 128, "%d,", 77); + ax25_send_string(tmpBuffer); + + // HDOP snprintf(tmpBuffer, 128, "%u,", gps_getdata()->pdop); ax25_send_string(tmpBuffer); - //ax25_send_string(get_hdop()); - //ax25_send_byte(','); ax25_send_footer();