Skip to content

Commit a4a8c7f

Browse files
Fix quantization error in path widths (#7)
1 parent fed8f69 commit a4a8c7f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

R/main.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ litchi.plan = function(roi, output,
9696
# based on angle and width/height offsets
9797
# width offsets (between flightlines)
9898
nLines = ceiling(width / flightLineDistance) + 1
99+
# Then need to update flightLineDistance to avoid offset/quantization errors
100+
flightLineDistance = width / (nLines - 1)
99101
xWidths = (-nLines/2):(nLines/2) * flightLineDistance
100102
xWidths = rep(xWidths, each=2)
101103

0 commit comments

Comments
 (0)