fix: align hong kong compact hko stat
This commit is contained in:
@@ -845,9 +845,14 @@ function getObservationDisplayMetrics(
|
||||
null;
|
||||
}
|
||||
|
||||
const currentMetarTemp =
|
||||
latestSettlement ??
|
||||
latestMetar ??
|
||||
airportCurrentTemp ??
|
||||
null;
|
||||
const observedHighMetar = airportHigh ?? highSettlement ?? highMetar ?? rowMetarHigh ?? null;
|
||||
|
||||
return { currentRunwayTemp, observedHighMetar, observedHighRunway };
|
||||
return { currentMetarTemp, currentRunwayTemp, observedHighMetar, observedHighRunway };
|
||||
}
|
||||
|
||||
function selectDisplayRunwayTemp(
|
||||
@@ -859,6 +864,23 @@ function selectDisplayRunwayTemp(
|
||||
return liveTemp;
|
||||
}
|
||||
|
||||
function selectCompactSecondaryTemp({
|
||||
isHKO,
|
||||
isShenzhen,
|
||||
displayMetarTemp,
|
||||
observedHighMetar,
|
||||
}: {
|
||||
isHKO: boolean;
|
||||
isShenzhen: boolean;
|
||||
displayMetarTemp: number | null;
|
||||
observedHighMetar: number | null;
|
||||
}) {
|
||||
if (isHKO && !isShenzhen && displayMetarTemp !== null) {
|
||||
return displayMetarTemp;
|
||||
}
|
||||
return observedHighMetar;
|
||||
}
|
||||
|
||||
function isSettlementRunway(row: ScanOpportunityRow | null, rwy: string) {
|
||||
const cityKey = normalizeCityKey(row?.city);
|
||||
const settlementPairs = SETTLEMENT_RUNWAY_PAIRS[cityKey] || [];
|
||||
@@ -2485,6 +2507,7 @@ export {
|
||||
normalizeCityKey,
|
||||
prefersHighFrequencyRunwayResolution,
|
||||
readSessionCache,
|
||||
selectCompactSecondaryTemp,
|
||||
selectDisplayRunwayTemp,
|
||||
seedHourlyForecastFromRow,
|
||||
seriesStats,
|
||||
|
||||
Reference in New Issue
Block a user