Explicitly convert m/s wind to mph in imperial units
This commit is contained in:
		@@ -1,13 +1,8 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="wind">
 | 
			
		||||
    <Distance
 | 
			
		||||
      :distance="weather.wind"
 | 
			
		||||
      unitFrom="m"
 | 
			
		||||
      :digits="1"
 | 
			
		||||
      :displayUnit="false"
 | 
			
		||||
      :useImperialUnits="useImperialUnits"
 | 
			
		||||
    />
 | 
			
		||||
    {{ useImperialUnits ? 'ft' : 'm' }}/s
 | 
			
		||||
    {{ useImperialUnits ? 
 | 
			
		||||
       convert_mps_to_mph(Number(weather.wind)).toFixed(1) + ' mph' : 
 | 
			
		||||
       Number(weather.wind).toFixed(1) + " m/s" }}
 | 
			
		||||
    <div class="wind-bearing">
 | 
			
		||||
      <i
 | 
			
		||||
        v-if="weather.windBearing"
 | 
			
		||||
@@ -45,6 +40,10 @@
 | 
			
		||||
      )}`
 | 
			
		||||
    )
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  function convert_mps_to_mph(windSpeed: number): number {
 | 
			
		||||
    return windSpeed * 2.2369363
 | 
			
		||||
  }
 | 
			
		||||
</script>
 | 
			
		||||
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
 
 | 
			
		||||
@@ -94,8 +94,8 @@
 | 
			
		||||
        "SUCCESSFUL_UPDATE": "Dein Konto wurde erfolgreich aktualisiert.",
 | 
			
		||||
        "UNITS": {
 | 
			
		||||
            "LABEL": "Einheiten für die Distanz",
 | 
			
		||||
            "IMPERIAL": "Imperiales System (ft, mi, °F)",
 | 
			
		||||
            "METRIC": "Metrisches System (m, km, °C)"
 | 
			
		||||
            "IMPERIAL": "Imperiales System (ft, mi, mph, °F)",
 | 
			
		||||
            "METRIC": "Metrisches System (m, km, m/s, °C)"
 | 
			
		||||
        },
 | 
			
		||||
        "TIMEZONE": "Zeitzone"
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
@@ -94,8 +94,8 @@
 | 
			
		||||
    "SUCCESSFUL_UPDATE": "Your account has been updated successfully.",
 | 
			
		||||
    "UNITS": {
 | 
			
		||||
      "LABEL": "Units for distance",
 | 
			
		||||
      "IMPERIAL": "Imperial system (ft, mi, °F)",
 | 
			
		||||
      "METRIC": "Metric system (m, km, °C)"
 | 
			
		||||
      "IMPERIAL": "Imperial system (ft, mi, mph, °F)",
 | 
			
		||||
      "METRIC": "Metric system (m, km, m/s, °C)"
 | 
			
		||||
    },
 | 
			
		||||
    "TIMEZONE": "Timezone"
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -82,8 +82,8 @@
 | 
			
		||||
        },
 | 
			
		||||
        "UNITS": {
 | 
			
		||||
            "LABEL": "Unités pour les distances",
 | 
			
		||||
            "IMPERIAL": "Système impérial (ft, mi, °F)",
 | 
			
		||||
            "METRIC": "Système métrique (m, km, °C)"
 | 
			
		||||
            "IMPERIAL": "Système impérial (ft, mi, mph, °F)",
 | 
			
		||||
            "METRIC": "Système métrique (m, km, m/s, °C)"
 | 
			
		||||
        },
 | 
			
		||||
        "SPORT": {
 | 
			
		||||
            "ACTION": "action",
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user