mirror of
https://github.com/richonguzman/LoRa_APRS_iGate.git
synced 2026-03-18 11:14:51 +01:00
ecuator latitud error fix
This commit is contained in:
parent
8941196863
commit
023abfb330
|
|
@ -5,6 +5,7 @@
|
|||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_SSD1306.h>
|
||||
#include <Wire.h>
|
||||
#include <SPIFFS.h>
|
||||
|
||||
#include "pins_config.h"
|
||||
#include "igate_config.h"
|
||||
|
|
@ -164,6 +165,9 @@ String create_lat_aprs(double lat) {
|
|||
north_south = "N";
|
||||
latitude = degrees.substring(0,degrees.indexOf("."));
|
||||
}
|
||||
if (latitude.length() == 1) {
|
||||
latitude = "0" + latitude;
|
||||
}
|
||||
convDeg = abs(degrees.toFloat()) - abs(int(degrees.toFloat()));
|
||||
convDeg2 = (convDeg * 60)/100;
|
||||
convDeg3 = String(convDeg2,6);
|
||||
|
|
@ -187,6 +191,9 @@ 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 a new issue