mirror of
https://github.com/Spythere/srjp-td2.git
synced 2026-05-03 05:28:12 +00:00
chore: limiting speed in VP and VL columns to the Vmax column
This commit is contained in:
@@ -73,10 +73,10 @@ const computedTimetableRows = computed(() => {
|
|||||||
abbrevs = [] as string[];
|
abbrevs = [] as string[];
|
||||||
|
|
||||||
if (currentPath.departureLineData) {
|
if (currentPath.departureLineData) {
|
||||||
departureSpeed = currentPath.departureLineData.routeSpeed;
|
departureSpeed = Math.min(currentPath.departureLineData.routeSpeed, stockVmax);
|
||||||
departureTracks = currentPath.departureLineData.routeTracks;
|
departureTracks = currentPath.departureLineData.routeTracks;
|
||||||
|
|
||||||
arrivalSpeed = currentPath.departureLineData.routeSpeed;
|
arrivalSpeed = Math.min(currentPath.departureLineData.routeSpeed, stockVmax);
|
||||||
arrivalTracks = currentPath.departureLineData.routeTracks;
|
arrivalTracks = currentPath.departureLineData.routeTracks;
|
||||||
|
|
||||||
realLineNo = currentPath.departureLineData?.realLineNo ?? 0;
|
realLineNo = currentPath.departureLineData?.realLineNo ?? 0;
|
||||||
@@ -95,7 +95,7 @@ const computedTimetableRows = computed(() => {
|
|||||||
if (arrivalKm >= stop.stopDistance) arrivalKm = (Number(stopRows[stopRows.length - 1].departureKm ?? '0') + stop.stopDistance) / 2;
|
if (arrivalKm >= stop.stopDistance) arrivalKm = (Number(stopRows[stopRows.length - 1].departureKm ?? '0') + stop.stopDistance) / 2;
|
||||||
|
|
||||||
if (currentPath.arrivalLineData) {
|
if (currentPath.arrivalLineData) {
|
||||||
arrivalSpeed = currentPath.arrivalLineData.routeSpeed;
|
arrivalSpeed = Math.min(currentPath.arrivalLineData.routeSpeed, stockVmax);
|
||||||
arrivalTracks = currentPath.arrivalLineData.routeTracks;
|
arrivalTracks = currentPath.arrivalLineData.routeTracks;
|
||||||
realLineNo = currentPath.arrivalLineData.realLineNo ?? 0;
|
realLineNo = currentPath.arrivalLineData.realLineNo ?? 0;
|
||||||
abbrevs = getAbbrevs(currentPath.arrivalLineData);
|
abbrevs = getAbbrevs(currentPath.arrivalLineData);
|
||||||
@@ -114,8 +114,8 @@ const computedTimetableRows = computed(() => {
|
|||||||
: undefined;
|
: undefined;
|
||||||
|
|
||||||
if (internalRouteInfo) {
|
if (internalRouteInfo) {
|
||||||
correctedDepartureSpeed = internalRouteInfo.routeSpeed;
|
correctedDepartureSpeed = Math.min(internalRouteInfo.routeSpeed, stockVmax);
|
||||||
departureSpeed = internalRouteInfo.routeSpeed;
|
departureSpeed = Math.min(internalRouteInfo.routeSpeed, stockVmax);
|
||||||
realLineNo = internalRouteInfo.realLineNo ?? realLineNo;
|
realLineNo = internalRouteInfo.realLineNo ?? realLineNo;
|
||||||
abbrevs = getAbbrevs(internalRouteInfo);
|
abbrevs = getAbbrevs(internalRouteInfo);
|
||||||
|
|
||||||
@@ -184,11 +184,11 @@ const computedTimetableRows = computed(() => {
|
|||||||
|
|
||||||
for (let i = stopRows.length - 1; i >= 0; i--) {
|
for (let i = stopRows.length - 1; i >= 0; i--) {
|
||||||
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
||||||
stopRows[i].departureSpeed = currentPath.departureLineData.routeSpeed;
|
stopRows[i].departureSpeed = Math.min(currentPath.departureLineData.routeSpeed, stockVmax);
|
||||||
stopRows[i].realLine = currentPath.departureLineData.realLineNo?.toString() ?? '';
|
stopRows[i].realLine = currentPath.departureLineData.realLineNo?.toString() ?? '';
|
||||||
|
|
||||||
if (stopRows[i].isMain || stopRows[i].pointName.endsWith(', podg')) {
|
if (stopRows[i].isMain || stopRows[i].pointName.endsWith(', podg')) {
|
||||||
stopRows[i].departureSpeed = currentPath.departureLineData.routeSpeed;
|
stopRows[i].departureSpeed = Math.min(currentPath.departureLineData.routeSpeed, stockVmax);
|
||||||
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
stopRows[i].departureTracks = currentPath.departureLineData.routeTracks;
|
||||||
|
|
||||||
// console.log(
|
// console.log(
|
||||||
@@ -209,7 +209,7 @@ const computedTimetableRows = computed(() => {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
stopRows[i].arrivalSpeed = currentPath.departureLineData.routeSpeed;
|
stopRows[i].arrivalSpeed = Math.min(currentPath.departureLineData.routeSpeed, stockVmax);
|
||||||
stopRows[i].arrivalTracks = currentPath.departureLineData.routeTracks;
|
stopRows[i].arrivalTracks = currentPath.departureLineData.routeTracks;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user