Is there a way to set EDDI up to convert temperature from Kelvin to Celsius?
I've searched, but couldn't find the solution.
I've searched, but couldn't find the solution.
{_ Preferences _}
{set reportAtmoPressure to 0} {_ Set to 1 if you want to hear about the atmospheric pressure. _}
{set reportAtmoTempScale to 0} {_ Set to 0 if you want to hear about temperatures in Kelvin _}
{_ Set to 1 if you want to hear about temperatures in Celsius _}
{_ Set to 2 if you want to hear about temperatures in Fahrenheit _}
{_ Set to 3 if you don't want to hear about the temperature of the body _}
{_ Define functions for converting temperature scales _}
{set ToCelsius(kelvin) to: {round(kelvin - 273)}}
{set ToFahrenheit(kelvin) to: {round((kelvin-273)*9/5 + 32)}}
{set TempCalc(kelvin) to:
{if reportAtmoTempScale = 0: {round(kelvin)}}
{if reportAtmoTempScale = 1: {ToCelsius(kelvin)}}
{if reportAtmoTempScale = 2: {ToFahrenheit(kelvin)}}
}
{_ Name our temperature scale _}
{if reportAtmoTempScale = 0: {set tempscale to: Kelvin}}
{if reportAtmoTempScale = 1: {set tempscale to: degrees Celsius}}
{if reportAtmoTempScale = 2: {set tempscale to: degrees Fahrenheit}}
{_ Fetch from context _}
{set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)}
{if !reportbody:
{set reportbody to BodyDetails(state.eddi_context_body_name)}
}
{if !reportbody.name || reportbody.name = "":
I'm not sure which body you are asking about.
Thank you, this worked perfectly.Please look into the "Body atmosphere report" script.
There you will find a setting option and the calculation.
Code:{_ Preferences _} {set reportAtmoPressure to 0} {_ Set to 1 if you want to hear about the atmospheric pressure. _} {set reportAtmoTempScale to 0} {_ Set to 0 if you want to hear about temperatures in Kelvin _} {_ Set to 1 if you want to hear about temperatures in Celsius _} {_ Set to 2 if you want to hear about temperatures in Fahrenheit _} {_ Set to 3 if you don't want to hear about the temperature of the body _} {_ Define functions for converting temperature scales _} {set ToCelsius(kelvin) to: {round(kelvin - 273)}} {set ToFahrenheit(kelvin) to: {round((kelvin-273)*9/5 + 32)}} {set TempCalc(kelvin) to: {if reportAtmoTempScale = 0: {round(kelvin)}} {if reportAtmoTempScale = 1: {ToCelsius(kelvin)}} {if reportAtmoTempScale = 2: {ToFahrenheit(kelvin)}} } {_ Name our temperature scale _} {if reportAtmoTempScale = 0: {set tempscale to: Kelvin}} {if reportAtmoTempScale = 1: {set tempscale to: degrees Celsius}} {if reportAtmoTempScale = 2: {set tempscale to: degrees Fahrenheit}} {_ Fetch from context _} {set reportbody to BodyDetails(state.eddi_context_body_name, state.eddi_context_body_system)} {if !reportbody: {set reportbody to BodyDetails(state.eddi_context_body_name)} } {if !reportbody.name || reportbody.name = "": I'm not sure which body you are asking about.