If I use:
http://myip/cgi-bin/template.cgi?templa ... p+Delta+30+[th0temp-delta30=C]C%0dTemp+Delta+1H+[th0temp-delta1h=C]C%0dTemp+Delta+30+[th0temp-delta30=F]F%0dTemp+Delta+1H+[th0temp-delta1h=F]F&contenttype=text/plain;charset=iso-8859-1
I get
05.03.22 07:19PM
Temp Delta 30 -0.3C
Temp Delta 1H -1.3C
Temp Delta 30 31.5F --- should be -.5F
Temp Delta 1H 29.7F --- should be -2.34F
Why does the =F temperature conversion when applied to a delta temperature convert it is if it was an absolute temp? It seems that the =F conversion is applied without context, Is this intentional? Working on some scripts that rely on deltas from all the sensors in both imperial and metric, so trying to figure out what I need to do to make them work.
Note, this is also for the dew deltas, haven't checked windchill deltas
[th0temp-delta1h=F] Conversion Question. **solved**
Moderator: Mattk
Re: [th0temp-delta1h=F] Conversion Question
The way I read this =F is a converter (as such) and by definition is converting the resultant temp based on the sensor data defaults (Deg C) and would appear the converter is not interested in previous components of the equation. The =F Converter is converting the resultant delta temp from Deg C to Deg F, as the sensor data by default is Deg C then =C is really not required and =C is not listed in the list of converters?
The Converter section of the Template index page https://www.meteobridge.com/wiki/index.php/Templates there is some comment at the end of the Converters section in regard multipliers and offsets. If you include an offset of 32 the result in F would match as expected.
The Converter section of the Template index page https://www.meteobridge.com/wiki/index.php/Templates there is some comment at the end of the Converters section in regard multipliers and offsets. If you include an offset of 32 the result in F would match as expected.
Re: [th0temp-delta1h=F] Conversion Question
Thanks Mattk for this to the point explanation. I will have a look at the code if I can make converters more smart and taking into account delta situations. However, you can always add some math by your own as explained in the Templates-Converter section of the wiki:
Converters "F", "psi", "mmHg", "inHg", "kmh", "mph", "kn", "bft", "in", "ft" can be followed by a multiplier. For example: Converter "F10" tells that temp data of sensor will be converted to degrees of Fahrenheit and multiplied by 10 or to say it the other way round the data will be represented in 1/10 degrees of Fahrenheit. As a special case a converter can also just be a multiplier. In that case the multiplier is applied without conversion of units. Multipliers with decimals like "1.5" need to be represented as "1,5" as the dot will be interpreted as the start of the "decimal" section of the variable. Beside multipliers you can also specify offsets, which have to be positioned after the multiplier and start with a "+" or "-". Example: "inhg-0,3-2,3" will convert data from hPa to inHg, will multiply the result with -0.3 and will subtract 2.3 after that.
Re: [th0temp-delta1h=F] Conversion Question. **solved**
Thanks.
If you can't make the computation smarter, a note in the documentation might benefit others.
If you can't make the computation smarter, a note in the documentation might benefit others.