-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathgeofence.ino
More file actions
28 lines (25 loc) · 1.17 KB
/
geofence.ino
File metadata and controls
28 lines (25 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//============================================================================
// This file contains some functions to allow transmissions in specific
// parts of the world.
// It needs still a lot of work, but it is a beginning
//============================================================================
//============================================================================
// Check if we are in Poland (approximately)
// Used to transmit LoRa-APRS on the Polish frequency
//============================================================================
bool inPoland() {
if (UGPS.validPosition && UGPS.Longitude >= 14.11 && UGPS.Longitude <= 24.15 && UGPS.Latitude >= 49.0 && UGPS.Latitude <= 54.83)
return true;
else
return false;
}
//============================================================================
// Check if we are in the UK (approximately)
// Used to transmit LoRa-APRS on the UK frequency
//============================================================================
bool inUK() {
if (UGPS.validPosition && UGPS.Longitude >= -6.2 && UGPS.Longitude <= 1.76 && UGPS.Latitude >= 49.96 && UGPS.Latitude <= 58.64)
return true;
else
return false;
}