kopia lustrzana https://github.com/glidernet/ogn-python
Fix RaisedAttributeError
point.location.latitude and point.location.longitude were not present in the objectpull/129/head
rodzic
140a48d3cb
commit
a240ed387b
|
@ -179,4 +179,12 @@ def igc(address, date):
|
|||
)
|
||||
|
||||
for point in points:
|
||||
|
||||
sql = f"""SELECT st_x('{point.location}'::geometry), st_y('{point.location}'::geometry)"""
|
||||
result = db.session.execute(sql)
|
||||
|
||||
for row in result:
|
||||
point.location.latitude = row[1]
|
||||
point.location.longitude = row[0]
|
||||
|
||||
writer.write_fix(point.timestamp.time(), latitude=point.location.latitude, longitude=point.location.longitude, valid=True, pressure_alt=point.altitude, gps_alt=point.altitude)
|
||||
|
|
Ładowanie…
Reference in New Issue