kopia lustrzana https://github.com/glidernet/ogn-python
Fixed live.glidernet.org backend
rodzic
c815b8a251
commit
76e7a9bb3f
|
@ -50,7 +50,8 @@ def lxml(session, show_offline=False, lat_max=90, lat_min=-90, lon_max=180, lon_
|
|||
between(func.ST_X(AircraftBeacon.location_wkt), lon_min, lon_max))) \
|
||||
.filter(Device.lastseen > observation_start) \
|
||||
.filter(Device.lastseen == AircraftBeacon.timestamp) \
|
||||
.filter(Device.id == AircraftBeacon.device_id)
|
||||
.filter(Device.id == AircraftBeacon.device_id) \
|
||||
.order_by(AircraftBeacon.timestamp)
|
||||
|
||||
lines = list()
|
||||
lines.append('<?xml version="1.0" encoding="UTF-8"?>')
|
||||
|
@ -90,7 +91,7 @@ def lxml(session, show_offline=False, lat_max=90, lat_min=-90, lon_max=180, lon_
|
|||
aircraft_beacon.location.longitude,
|
||||
competition,
|
||||
registration,
|
||||
aircraft_beacon.altitude,
|
||||
int(aircraft_beacon.altitude),
|
||||
utc_to_local(aircraft_beacon.timestamp).strftime("%H:%M:%S"),
|
||||
elapsed_seconds,
|
||||
int(aircraft_beacon.track),
|
||||
|
|
|
@ -100,8 +100,8 @@ class TestDB(unittest.TestCase, XmlTestMixin):
|
|||
# Check the complete document
|
||||
expected = """<?xml version="1.0" encoding="UTF-8"?>
|
||||
<markers>
|
||||
<m a="47.8258833,11.4636167,Hi,D-4711,209,10:00:02,3,123,55,-0.4,1,Koenigsdf,DD4711,xxDD4711"/>
|
||||
<m a="47.8280667,11.4726500,_15,xxDD0815,543,09:56:00,245,270,77,-1.5,8,Bene,0,xxDD0815"/>
|
||||
<m a="47.8258833,11.4636167,Hi,D-4711,209,10:00:02,3,123,55,-0.4,1,Koenigsdf,DD4711,xxDD4711"/>
|
||||
</markers>
|
||||
""".encode(encoding='utf-8')
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue