我正在使用openweathermap.org獲取城市的天氣。如何計算openweathermap.org JSON中返回的攝氏溫度?
的JSONP調用工作,一切都很好,但由此產生的對象包含一個未知的裝置溫度:
{
//...
"main": {
"temp": 290.38, // What unit of measurement is this?
"pressure": 1005,
"humidity": 72,
"temp_min": 289.25,
"temp_max": 291.85
},
//...
}
這裏是一個演示是console.log
的完整的對象。
我不認爲產生的溫度是華氏溫度,因爲將290.38
華氏度轉換爲攝氏溫度是143.544
。
有誰知道什麼溫度單位openweathermap返回?
@TJCrowder這不是一個有點奇怪的默認設置嗎? – hitautodestruct
@hitautodestruct:這是*我*,但是,我不是科學家。 :-) –
Kelvin(http://en.wikipedia.org/wiki/Kelvin)是「國際單位制」的溫度單位。這是絕對的,基於物理學。零是「絕對零」。它看起來是一個相當自然的選擇,對我來說,「默認」... – MarcoS