From 42c6b8a016967e8bc01286a80b33cf80f1fc4fe2 Mon Sep 17 00:00:00 2001 From: Applevangelist Date: Sat, 26 Mar 2022 14:47:10 +0100 Subject: [PATCH] And don't forget Fahrenheit --- Moose Development/Moose/Core/Point.lua | 4 ++-- Moose Development/Moose/Functional/PseudoATC.lua | 2 +- Moose Development/Moose/Functional/Range.lua | 2 +- Moose Development/Moose/Ops/ATIS.lua | 4 ++-- Moose Development/Moose/Utilities/Utils.lua | 6 +++--- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Moose Development/Moose/Core/Point.lua b/Moose Development/Moose/Core/Point.lua index 878fe93e2..2826969bb 100644 --- a/Moose Development/Moose/Core/Point.lua +++ b/Moose Development/Moose/Core/Point.lua @@ -912,7 +912,7 @@ do -- COORDINATE -- The text will reflect the temperature like this: -- -- - For Russian and European aircraft using the metric system - Degrees Celcius (°C) - -- - For American aircraft we link to the imperial system - Degrees Farenheit (°F) + -- - For American aircraft we link to the imperial system - Degrees Fahrenheit (°F) -- -- A text containing a pressure will look like this: -- @@ -932,7 +932,7 @@ do -- COORDINATE if Settings:IsMetric() then return string.format( " %-2.2f °C", DegreesCelcius ) else - return string.format( " %-2.2f °F", UTILS.CelsiusToFarenheit( DegreesCelcius ) ) + return string.format( " %-2.2f °F", UTILS.CelsiusToFahrenheit( DegreesCelcius ) ) end else return " no temperature" diff --git a/Moose Development/Moose/Functional/PseudoATC.lua b/Moose Development/Moose/Functional/PseudoATC.lua index fdfcfb312..7358dda2c 100644 --- a/Moose Development/Moose/Functional/PseudoATC.lua +++ b/Moose Development/Moose/Functional/PseudoATC.lua @@ -742,7 +742,7 @@ function PSEUDOATC:ReportWeather(GID, UID, position, location) local T=position:GetTemperature() -- Correct unit system. - local _T=string.format('%d°F', UTILS.CelsiusToFarenheit(T)) + local _T=string.format('%d°F', UTILS.CelsiusToFahrenheit(T)) if settings:IsMetric() then _T=string.format('%d°C', T) end diff --git a/Moose Development/Moose/Functional/Range.lua b/Moose Development/Moose/Functional/Range.lua index 961439e05..255672be1 100644 --- a/Moose Development/Moose/Functional/Range.lua +++ b/Moose Development/Moose/Functional/Range.lua @@ -2762,7 +2762,7 @@ function RANGE:_DisplayRangeWeather(_unitname) local tW=string.format("%.1f m/s", Ws) local tP=string.format("%.1f mmHg", P*hPa2mmHg) if settings:IsImperial() then - --tT=string.format("%d°F", UTILS.CelsiusToFarenheit(T)) + --tT=string.format("%d°F", UTILS.CelsiusToFahrenheit(T)) tW=string.format("%.1f knots", UTILS.MpsToKnots(Ws)) tP=string.format("%.2f inHg", P*hPa2inHg) end diff --git a/Moose Development/Moose/Ops/ATIS.lua b/Moose Development/Moose/Ops/ATIS.lua index c922cd9ee..113359cf0 100644 --- a/Moose Development/Moose/Ops/ATIS.lua +++ b/Moose Development/Moose/Ops/ATIS.lua @@ -1459,8 +1459,8 @@ function ATIS:onafterBroadcast(From, Event, To) -- Convert to °F. if self.TDegF then - temperature=UTILS.CelsiusToFarenheit(temperature) - dewpoint=UTILS.CelsiusToFarenheit(dewpoint) + temperature=UTILS.CelsiusToFahrenheit(temperature) + dewpoint=UTILS.CelsiusToFahrenheit(dewpoint) end local TEMPERATURE=string.format("%d", math.abs(temperature)) diff --git a/Moose Development/Moose/Utilities/Utils.lua b/Moose Development/Moose/Utilities/Utils.lua index e059a353e..12f8e7515 100644 --- a/Moose Development/Moose/Utilities/Utils.lua +++ b/Moose Development/Moose/Utilities/Utils.lua @@ -473,10 +473,10 @@ UTILS.KnotsToMps = function( knots ) end end ---- Convert temperature from Celsius to Farenheit. +--- Convert temperature from Celsius to Fahrenheit. -- @param #number Celcius Temperature in degrees Celsius. --- @return #number Temperature in degrees Farenheit. -UTILS.CelsiusToFarenheit = function( Celcius ) +-- @return #number Temperature in degrees Fahrenheit. +UTILS.CelsiusToFahrenheit = function( Celcius ) return Celcius * 9/5 + 32 end