diff --git a/BluetoothGPS/BluetoothGPS.ino b/BluetoothGPS/BluetoothGPS.ino index 611b427..63a5aea 100644 --- a/BluetoothGPS/BluetoothGPS.ino +++ b/BluetoothGPS/BluetoothGPS.ino @@ -251,25 +251,25 @@ void loop() { break; case 't': // Telemetry split(nmea); - SerialBT.print("{"); - SerialBT.print("lattitude:"); + SerialBT.print("{\"geolocation\":{"); + SerialBT.print("\"lat\":"); if(strings[lattIndex+1]=="S") { SerialBT.print("-"); } SerialBT.print(ShiftLeft2(strings[lattIndex])); SerialBT.print(","); - SerialBT.print("longitude:"); + SerialBT.print("\"lon\":"); if(strings[longIndex+1]=="W") { SerialBT.print("-"); } SerialBT.print(ShiftLeft2(strings[longIndex])); SerialBT.print(","); - SerialBT.print("elevation:"); + SerialBT.print("\"alt\":"); SerialBT.print(strings[heightIndex]); SerialBT.print(strings[heightIndex+1]); - SerialBT.println("}"); + SerialBT.println("}}"); break; default: break; diff --git a/LocationGPS/LocationGPS.ino b/LocationGPS/LocationGPS.ino index b76199a..8a3a264 100644 --- a/LocationGPS/LocationGPS.ino +++ b/LocationGPS/LocationGPS.ino @@ -243,25 +243,25 @@ void loop() { break; case 't': // Telemetry split(nmea); - Serial.print("{"); - Serial.print("lattitude:"); + Serial.print("{\"geolocation\":{"); + Serial.print("\"lat\":"); if(strings[lattIndex+1]=="S") { Serial.print("-"); } Serial.print(ShiftLeft2(strings[lattIndex])); Serial.print(","); - Serial.print("longitude:"); + Serial.print("\"long\":"); if(strings[longIndex+1]=="W") { Serial.print("-"); } Serial.print(ShiftLeft2(strings[longIndex])); Serial.print(","); - Serial.print("elevation:"); + Serial.print("\"alt\":"); Serial.print(strings[heightIndex]); Serial.print(strings[heightIndex+1]); - Serial.println("}"); + Serial.println("}}"); break; default: break;