Skip to content

Commit

Permalink
Updating baseline speed (#1040)
Browse files Browse the repository at this point in the history
  • Loading branch information
devinmatte authored Feb 17, 2025
1 parent f3fcf6f commit ec6d926
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions common/constants/baselines.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ export const PEAK_SCHEDULED_SERVICE = {
};

export const PEAK_SPEED = {
'line-red': 21.2,
'line-orange': 18,
'line-blue': 20.5,
'line-green': 12.6,
'line-mattapan': 24.7,
'line-red': 24.9,
'line-orange': 20.6,
'line-blue': 22.7,
'line-green': 13.6,
'line-mattapan': 24.3,
'line-bus': 0,
};

Expand Down
5 changes: 4 additions & 1 deletion modules/landing/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ export const convertToSpeedDataset = (
};

function convertSecondsToMph(travelTimeSec: number | undefined, distanceMiles: number | undefined) {
return distanceMiles && travelTimeSec ? (3600 * distanceMiles) / travelTimeSec : undefined;
if (distanceMiles && travelTimeSec) {
return (3600 * distanceMiles) / travelTimeSec;
}
return undefined;
}

export const convertToStationSpeedDataset = (
Expand Down

0 comments on commit ec6d926

Please sign in to comment.