Skip to content

Commit 3134fde

Browse files
committed
Add a scale to the x axis of a measurement
1 parent 7219234 commit 3134fde

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

src/main/java/com/easternedgerobotics/rov/math/DistanceCalculator.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public DistanceCalculator(
4545
public Optional<List<PointValue>> calculate(
4646
final AxisValue axis,
4747
final List<PointValue> points,
48-
final String cameraName
48+
final String cameraName,
49+
final float scalar
4950
) {
5051
return store.get(cameraName).map(calibration -> {
5152
/**
@@ -242,7 +243,7 @@ public Optional<List<PointValue>> calculate(
242243

243244
final DoubleIndexer objectPointIndexer = objectPoint.createIndexer();
244245

245-
return new PointValue(objectPointIndexer.get(0, 0), objectPointIndexer.get(1, 0));
246+
return new PointValue(objectPointIndexer.get(0, 0) * scalar, objectPointIndexer.get(1, 0) * scalar);
246247
}).collect(Collectors.toList());
247248
});
248249
}

0 commit comments

Comments
 (0)