kopia lustrzana https://github.com/lightaprs/LightAPRS-W-1.0
Added new countries for NO AIRBORNE APRS
rodzic
fc6e8623d8
commit
85976c5ef6
|
@ -101,10 +101,11 @@ int32_t pointInPolygonF(int32_t polyCorners, float * polygon, float latitude, fl
|
|||
Indonesia 144.390
|
||||
Malaysia 144.390
|
||||
|
||||
NO AIRBORNE APRS:
|
||||
France
|
||||
NO AIRBORNE APRS:
|
||||
Latvia
|
||||
North Korea
|
||||
United Kingdom
|
||||
Yemen
|
||||
|
||||
Expected input FLOAT for latitude and longitude as in GPS_UBX_latitude_Float and GPS_UBX_longitude_Float.
|
||||
*/
|
||||
|
@ -120,6 +121,7 @@ void GEOFENCE_position(float latitude, float longitude)
|
|||
{
|
||||
if(pointInPolygonF(9, UKF, latitude, longitude) == 1) {GEOFENCE_no_tx = 1;GEOFENCE_APRS_frequency = 144800000;}
|
||||
else if(pointInPolygonF(10, LatviaF, latitude, longitude) == 1) {GEOFENCE_no_tx = 1;GEOFENCE_APRS_frequency = 144800000;}
|
||||
else if(pointInPolygonF(5, YemenF, latitude, longitude) == 1) {GEOFENCE_no_tx = 1;GEOFENCE_APRS_frequency = 144800000;}
|
||||
else {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144800000;}
|
||||
}
|
||||
|
||||
|
@ -158,9 +160,10 @@ void GEOFENCE_position(float latitude, float longitude)
|
|||
|
||||
// S 1/2
|
||||
if(latitude > 19.2)
|
||||
{
|
||||
if(pointInPolygonF(12, ChinaF, latitude, longitude) == 1) {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144640000;}
|
||||
else if(pointInPolygonF(7, JapanF, latitude, longitude) == 1) {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144660000;}
|
||||
{
|
||||
if(pointInPolygonF(6, North_KoreaF, latitude, longitude) == 1) {GEOFENCE_no_tx = 1; GEOFENCE_APRS_frequency = 144620000;}
|
||||
else if(pointInPolygonF(12, ChinaF, latitude, longitude) == 1) {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144640000;}
|
||||
else if(pointInPolygonF(7, JapanF, latitude, longitude) == 1) {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144660000;}
|
||||
else if(pointInPolygonF(5, South_KoreaF, latitude, longitude) == 1) {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144620000;}
|
||||
else if(pointInPolygonF(5, ThailandF, latitude, longitude) == 1) {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 145525000;}
|
||||
else {GEOFENCE_no_tx = 0; GEOFENCE_APRS_frequency = 144800000;}
|
||||
|
|
|
@ -114,6 +114,15 @@ static float RomaniaF[] = {
|
|||
27.12520, 47.95310
|
||||
};
|
||||
|
||||
static float North_KoreaF[] = {
|
||||
130.14189, 4321627,
|
||||
124.03574, 39.8949,
|
||||
125.18292, 37.39202,
|
||||
128.47240, 38.66888,
|
||||
130.69478, 42.3274,
|
||||
130.14189, 43.21627
|
||||
};
|
||||
|
||||
static float South_KoreaF[] = {
|
||||
132.17653, 41.01310,
|
||||
124.61794, 36.70367,
|
||||
|
@ -152,6 +161,13 @@ static float VenezuelaF[] = {
|
|||
-66.65410, 0.18680
|
||||
};
|
||||
|
||||
static float YemenF[] = {
|
||||
52.20302, 19.48287,
|
||||
41.92009, 17.42198,
|
||||
43.59620, 12.27820,
|
||||
53.68201, 15.80024,
|
||||
52.20302, 19.48287
|
||||
};
|
||||
|
||||
// VARIABLES
|
||||
extern uint32_t GEOFENCE_APRS_frequency;
|
||||
|
|
Ładowanie…
Reference in New Issue