cockpit icon indicating copy to clipboard operation
cockpit copied to clipboard

Temperature data should have its unit configurable

Open rafaellehmkuhl opened this issue 1 year ago • 2 comments

The main use-case is the water temperature VGI. It should be easy to change between Celsius and Fahrenheit.

rafaellehmkuhl avatar Sep 06 '24 13:09 rafaellehmkuhl

Raised again and discussed somewhat in this forum thread.

@dgudiel has also mentioned it's likely important for some of our US-based users, and a non-arcane process for it is a high priority for when (or ideally before) Cockpit becomes the officially recommended GCS for BR ROVs.

ES-Alexander avatar Aug 20 '25 22:08 ES-Alexander

I feel like a decent way of approaching this would be to:

  1. #2073
  2. Create a (built in) string compound variable called UNITS/temperature = {{ UNITS/displayPreference }} == "metric" ? "℃" : "℉"
  3. Create the following numerical compound variables:
    • Temperature Celsius = {{ SCALED_PRESSURE2/temperature }} / 100
    • Temperature Fahrenheit = {{ temperature-celsius }} * 1.8 + 32
    • Temperature = {{ UNITS/displayPreference }} == "metric" ? {{ temperature-celsius }} : {{ temperature-fahrenheit }}
  4. Allow using string data-lake values in the units of VeryGenericIndicator widgets
  5. Re-implement the water temperature preset as using {{ temperature }} and {{ UNITS/temperature }}

ES-Alexander avatar Aug 20 '25 22:08 ES-Alexander