mirror of
https://github.com/Schrolli91/BOSWatch.git
synced 2025-12-06 07:42:03 +01:00
Dedicated on/off switch for location coordinate finding functionality
This commit is contained in:
parent
1fc2980f6d
commit
a76e54211f
|
|
@ -291,6 +291,7 @@ try:
|
|||
# Load location RegEx
|
||||
#
|
||||
try:
|
||||
if globalVars.config.getboolean("LocationCoordinates", "locationCoordinates"):
|
||||
from includes import locationCoordinates
|
||||
locationCoordinates.loadFilters()
|
||||
except:
|
||||
|
|
|
|||
|
|
@ -127,22 +127,29 @@ geo_enable = 0
|
|||
geo_format = #C(\d{2})(\d{5}),(\d{2})(\d{5})#
|
||||
geo_order = LON, lon, LAT, lat
|
||||
|
||||
#[LocationCoordinates]
|
||||
[LocationCoordinates]
|
||||
# Regex Coordinate replacement (only for POC)
|
||||
# All fields in data structure can be used, also dynamically added fields that have been evaluated in "schemaPOCMsg".
|
||||
# Multiple search criteria can be given, then all of them must be hit (AND-condition).
|
||||
# Coordinates must be the last field, consisting of latitude and longitude (order is important), split by comma.
|
||||
# First match has priority; search will not proceed as soon as one hit is found.
|
||||
# Important: Semicolon and comma must not be part of a field or regex, as they are used internally for splitting up the config value correctly.
|
||||
|
||||
# Do you want to enable this feature? (0 - off | 1 - on)
|
||||
locationCoordinates = 0
|
||||
|
||||
# LocationName = field1;regex1;...;lat, lon
|
||||
|
||||
# Examples:
|
||||
|
||||
# msg starting with "BOSWatch-Test"
|
||||
Location1 = msg;^BOSWatch-Test;49.344394413024084, 8.167496841047555
|
||||
#Location1 = msg;^BOSWatch-Test;49.344394413024084, 8.167496841047555
|
||||
|
||||
# Objekt containing "VS Wachtenburg"
|
||||
Location2 = Objekt;VS Wachtenburg;49.437673, 8.173793
|
||||
#Location2 = Objekt;VS Wachtenburg;49.437673, 8.173793
|
||||
|
||||
# Ort starting with "B9 ", Ortsteil starting with "16 AK "
|
||||
B9_16 = Ort;^B9 .*$;Ortsteil;^16 AK .*$;49.428685, 8.408548
|
||||
#B9_16 = Ort;^B9 .*$;Ortsteil;^16 AK .*$;49.428685, 8.408548
|
||||
|
||||
|
||||
[multicastAlarm]
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ def decode(freq, decoded):
|
|||
data["lon"] = lon
|
||||
data["lat"] = lat
|
||||
else:
|
||||
if globalVars.config.getboolean("LocationCoordinates", "locationCoordinates"):
|
||||
locationCoordinates.findCoordinates(data)
|
||||
|
||||
# Add function as character a-d to dataset
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@ filterList = []
|
|||
|
||||
def loadFilters():
|
||||
try:
|
||||
if globalVars.config.has_section("LocationCoordinates"):
|
||||
logging.debug("Loading location coordinates")
|
||||
|
||||
for key,val in globalVars.config.items("LocationCoordinates"):
|
||||
|
|
|
|||
Loading…
Reference in a new issue