routingalternatives: consider transit options
This commit is contained in:
@@ -44,10 +44,12 @@ public class RouteDTO {
|
||||
private List<StepDTO> steps;
|
||||
@Schema(description = "Amount of CO2e savings in gramm compared to a car trip for the same route.")
|
||||
private double co2Savings;
|
||||
@Schema(description = "CO2e emission of this route.")
|
||||
private double co2Emissions;
|
||||
@Schema(description = "The temporal difference in minutes compared to the original route the user requested alternatives for.")
|
||||
private double timeDifferenceSeconds;
|
||||
|
||||
public RouteDTO(AddressDTO startAddress, @Nullable String firstStopName, double startLat, double startLon, AddressDTO endAddress, @Nullable String lastStopName, double endLat, double endLon, Instant startDateTime, Instant endDateTime, List<StepDTO> steps, double co2Savings, double timeDifferenceSeconds) {
|
||||
public RouteDTO(AddressDTO startAddress, @Nullable String firstStopName, double startLat, double startLon, AddressDTO endAddress, @Nullable String lastStopName, double endLat, double endLon, Instant startDateTime, Instant endDateTime, List<StepDTO> steps, double co2Savings, double timeDifferenceSeconds, double co2Emissions) {
|
||||
this.startAddress = startAddress;
|
||||
this.firstStopName = firstStopName;
|
||||
this.startLat = startLat;
|
||||
@@ -60,6 +62,7 @@ public class RouteDTO {
|
||||
this.endDateTime = endDateTime;
|
||||
this.steps = steps;
|
||||
this.co2Savings = co2Savings;
|
||||
this.co2Emissions = co2Emissions;
|
||||
this.timeDifferenceSeconds = timeDifferenceSeconds;
|
||||
}
|
||||
|
||||
@@ -106,7 +109,8 @@ public class RouteDTO {
|
||||
Instant.now(),
|
||||
new ArrayList<StepDTO>(),
|
||||
120.5f,
|
||||
+16.3f
|
||||
+16.3f,
|
||||
20
|
||||
);
|
||||
dto.steps.add(new StepDTO(
|
||||
Modality.WALKING,
|
||||
|
||||
Reference in New Issue
Block a user