Commit 5f9bb1f0 authored by Björn Richerzhagen's avatar Björn Richerzhagen
Browse files

Removed SCALING and 25px PAINT_OFFSET causing headaches ;)

parent 2d56973c
......@@ -157,7 +157,7 @@ public class RSUMovementModel implements MovementModel, FutureLocationSensor {
if (_currentIndex < _intersections.size()) {
// Initial placement
Position intersection = _intersections.get(_currentIndex);
actuator.updateCurrentLocation(new PositionVector(intersection.getX() / VehicleMovementModel.SCALING_FACTOR, intersection.getY() / VehicleMovementModel.SCALING_FACTOR));
actuator.updateCurrentLocation(new PositionVector(intersection.getX(), intersection.getY()));
hostIntersectionMatching.put(actuator.getHost().getId(), _currentIndex);
......
......@@ -61,10 +61,6 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
private static VehicleMovementModel MOVEMENT;
public static final double SCALING_FACTOR = 1.0;
private static final double PAINT_OFFSET = 25;
private long timeBetweenMoveOperations;
private final List<SimLocationActuator> components;
......@@ -300,13 +296,13 @@ public class VehicleMovementModel implements MovementModel, EventHandler, Future
SimLocationActuator component = requestSimActuator(vehicle);
if (scenarioHeight != -1) {
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR + PAINT_OFFSET, Math.min(scenarioHeight, height) - position.getY() / SCALING_FACTOR + PAINT_OFFSET));
component.updateCurrentLocation(new PositionVector(position.getX(), Math.min(scenarioHeight, height) - position.getY()));
} else {
// This would be vertically mirrored
component.updateCurrentLocation(new PositionVector(position.getX() / SCALING_FACTOR + PAINT_OFFSET, position.getY() / SCALING_FACTOR + PAINT_OFFSET));
component.updateCurrentLocation(new PositionVector(position.getX(), position.getY()));
}
component.setMovementSpeed(position.getSpeed() / SCALING_FACTOR);
component.setMovementSpeed(position.getSpeed());
try {
RoutedNetLayer routedNetLayer = component.getHost().getComponent(RoutedNetLayer.class);
......
......@@ -109,7 +109,7 @@ public class RSUPlacement implements PlacementModel {
if (_currentIndex < _intersections.size()) {
Position intersection = _intersections.get(_currentIndex);
_currentIndex++;
return new PositionVector(intersection.getX() / VehicleMovementModel.SCALING_FACTOR, intersection.getY() / VehicleMovementModel.SCALING_FACTOR);
return new PositionVector(intersection.getX(), intersection.getY());
} else {
return new PositionVector(Double.NaN, Double.NaN);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment