check
This commit is contained in:
parent
023abfb330
commit
05748754b3
|
|
@ -5,7 +5,7 @@
|
|||
"wifi": {
|
||||
"AP": [
|
||||
{ "SSID": "WiFi_AP_1",
|
||||
"Password": "password_WiFi_1",
|
||||
"Password": "password_WiFi_2",
|
||||
"Latitude": 0.0000000,
|
||||
"Longitude": 0.0000000
|
||||
},
|
||||
|
|
@ -17,7 +17,7 @@
|
|||
]
|
||||
},
|
||||
"aprs_is": {
|
||||
"passcode": "",
|
||||
"passcode": "23201",
|
||||
"server": "soam.aprs2.net",
|
||||
"port": 14580,
|
||||
"software_name" : "ESP32_LoRa_iGate",
|
||||
|
|
|
|||
|
|
@ -158,15 +158,16 @@ String create_lat_aprs(double lat) {
|
|||
String north_south, latitude, convDeg3;
|
||||
float convDeg, convDeg2;
|
||||
|
||||
if (abs(degrees.toFloat()) < 10) {
|
||||
latitude += "0";
|
||||
}
|
||||
Serial.println(latitude);
|
||||
if (degrees.indexOf("-") == 0) {
|
||||
north_south = "S";
|
||||
latitude = degrees.substring(1,degrees.indexOf("."));
|
||||
latitude += degrees.substring(1,degrees.indexOf("."));
|
||||
} else {
|
||||
north_south = "N";
|
||||
latitude = degrees.substring(0,degrees.indexOf("."));
|
||||
}
|
||||
if (latitude.length() == 1) {
|
||||
latitude = "0" + latitude;
|
||||
latitude += degrees.substring(0,degrees.indexOf("."));
|
||||
}
|
||||
convDeg = abs(degrees.toFloat()) - abs(int(degrees.toFloat()));
|
||||
convDeg2 = (convDeg * 60)/100;
|
||||
|
|
@ -184,6 +185,9 @@ String create_lng_aprs(double lng) {
|
|||
if (abs(degrees.toFloat()) < 100) {
|
||||
longitude += "0";
|
||||
}
|
||||
if (abs(degrees.toFloat()) < 10) {
|
||||
longitude += "0";
|
||||
}
|
||||
if (degrees.indexOf("-") == 0) {
|
||||
east_west = "W";
|
||||
longitude += degrees.substring(1,degrees.indexOf("."));
|
||||
|
|
@ -191,9 +195,6 @@ String create_lng_aprs(double lng) {
|
|||
east_west = "E";
|
||||
longitude += degrees.substring(0,degrees.indexOf("."));
|
||||
}
|
||||
if (longitude.length() == 1) {
|
||||
longitude = "0" + longitude;
|
||||
}
|
||||
convDeg = abs(degrees.toFloat()) - abs(int(degrees.toFloat()));
|
||||
convDeg2 = (convDeg * 60)/100;
|
||||
convDeg3 = String(convDeg2,6);
|
||||
|
|
|
|||
Loading…
Reference in New Issue