kopia lustrzana https://github.com/OpenDroneMap/ODM
Proper endianess format
rodzic
a80de54e92
commit
4ce3560c61
|
@ -157,11 +157,12 @@ class ODMGeoreferencingCell(ecto.Cell):
|
||||||
if line.startswith("end_header"):
|
if line.startswith("end_header"):
|
||||||
break
|
break
|
||||||
|
|
||||||
|
fmt = '{}dddBBB'.format(endianess)
|
||||||
while True:
|
while True:
|
||||||
chunk = f.read(27) # 3 doubles, 3 uints
|
chunk = f.read(27) # 3 doubles, 3 uints
|
||||||
if len(chunk) < 27:
|
if len(chunk) < 27:
|
||||||
break
|
break
|
||||||
tokens = struct.unpack('<dddBBB', chunk)
|
tokens = struct.unpack(fmt, chunk)
|
||||||
csv_line = [float(tokens[0]),
|
csv_line = [float(tokens[0]),
|
||||||
float(tokens[1]),
|
float(tokens[1]),
|
||||||
tokens[2]]
|
tokens[2]]
|
||||||
|
|
Ładowanie…
Reference in New Issue