Skip to content

Commit

Permalink
Fix quantization error in path widths (#7)
Browse files Browse the repository at this point in the history
  • Loading branch information
GrouchyPenguin authored Jul 9, 2021
1 parent fed8f69 commit a4a8c7f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions R/main.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,8 @@ litchi.plan = function(roi, output,
# based on angle and width/height offsets
# width offsets (between flightlines)
nLines = ceiling(width / flightLineDistance) + 1
# Then need to update flightLineDistance to avoid offset/quantization errors
flightLineDistance = width / (nLines - 1)
xWidths = (-nLines/2):(nLines/2) * flightLineDistance
xWidths = rep(xWidths, each=2)

Expand Down

0 comments on commit a4a8c7f

Please sign in to comment.