File tree Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Expand file tree Collapse file tree 2 files changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4,4 +4,6 @@ import .messages
4
4
import .services
5
5
import .util.docs
6
6
7
+ import coordinate show Coordinate
8
+
7
9
export *
Original file line number Diff line number Diff line change @@ -233,6 +233,13 @@ class Data:
233
233
l .add [ LITTLE-ENDIAN .int32 data i , LITTLE-ENDIAN .int32 data ( i + 4 ) ]
234
234
return l
235
235
236
+ get-data-coordinate dataType / int -> Coordinate :
237
+ data := get-data dataType
238
+ if data .size != 8 :
239
+ log .error "Data size not 8 for datatype $( dataType ) "
240
+ return Coordinate 0.0 0.0 // TOOD consider all getts returning null on error, not a 0 value...
241
+ return Coordinate ( ( LITTLE-ENDIAN .int32 data 0 ) / 1e7 ) ( ( LITTLE-ENDIAN .int32 data 4 ) / 1e7 )
242
+
236
243
get-data-list-coordinates dataType / int -> List :
237
244
data := get-data dataType
238
245
if data .size % 8 != 0 :
You can’t perform that action at this time.
0 commit comments