Skip to content

Commit

Permalink
use geoprojection
Browse files Browse the repository at this point in the history
  • Loading branch information
MishkaMN committed Sep 18, 2024
1 parent 88bdad2 commit fb47a17
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
import org.eclipse.mosaic.interactions.traffic.VehicleUpdates;
import org.eclipse.mosaic.interactions.vehicle.VehicleStop;
import org.eclipse.mosaic.lib.enums.DriveDirection;
import org.eclipse.mosaic.lib.geo.GeoPoint;
import org.eclipse.mosaic.lib.objects.road.IRoadPosition;
import org.eclipse.mosaic.lib.objects.road.SimpleRoadPosition;
import org.eclipse.mosaic.lib.objects.traffic.InductionLoopInfo;
Expand Down Expand Up @@ -417,6 +418,8 @@ public TraciSimulationStepResult simulateUntil(long time) throws InternalFederat
log.warn("{\"id\":{}, \"Latitude\":{}, \"Longitude\":{}, \"x\":{}, \"y\":{}}",vehicleData.getName(), vehicleData.getPosition().getLatitude(), vehicleData.getPosition().getLongitude(), vehicleData.getProjectedPosition().getX(), vehicleData.getProjectedPosition().getY());
log.warn(vehicleData.getPosition().toString());
log.warn("Test position to geo function: ", vehicleData.getProjectedPosition().toGeo().toString());
GeoPoint calculated_geo = GeoProjection.getInstance().cartesianToGeographic(vehicleData.getProjectedPosition());
log.warn("Using GeoProjection {}", calculated_geo.toString());

updateVehicleLists(addedVehicles, updatedVehicles, removedVehicles, vehicleData);
}
Expand Down

0 comments on commit fb47a17

Please sign in to comment.