Temperature Conversion
-
Converting temperatures between Fahrenheit and Celsius - or vice versa - was likely one of your first programming exercises. Bernie's team need not support Fahrenheit fortunately (there are no American customers yet), but Celsius and Kelvin. That's even more complicated, isn't it?
A sensor provides the temperatures in Kelvin. E.g. here it is 293 K, there 294 K. Makes a difference of 1 K.
"That's fine. But our customer wants to see it in °C."
"Um, wait.
293 K ... that's 20°C.
294 K ..., ... 21°C.
1 K, ..., oh that's complicated, ... oh yes: -272°C."Uhm, yes, you're so right, Johnny.
-
@BernieTheBernie I recommand a forceful application of a clue-bat. To be repeated until it works.
-
@BernieTheBernie I died inside a little.
-
It's interesting, isn't it? Degrees Celsius doesn't really work like a unit in this sense because it's not based at 0.
Like, you can say "1 inch = 25.4 mm" no problem, but how many degrees Celcius is a Kelvin? 1? 274.15?
-
@Gąska said in Temperature Conversion:
@BernieTheBernie I died inside a little.
Why? Because of over-cooling or because of over-heating?
When I went to work this morning on bicycle, I felt that it was very hard to keep my body temperature some 315 K warmer than the air temperature. But I am a strong and healthy man, I coped with that.
-
@kazitor said in Temperature Conversion:
"1 inch = 25.4 mm" no problem, but how many degrees Celcius is a Kelvin? 1? 274.15?
You see... there's a concept behind the things where Johnny failed: does the value mean an absolute value or a relative value (i.e. a difference)?
By the way, isn't there a difference betweenDateTime
andTimeSpan
(that's how they are called in C#, there Java names might slightly differ)?
-
@kazitor said in Temperature Conversion:
It's interesting, isn't it? Degrees Celsius doesn't really work like a unit in this sense because it's not based at 0.
There's a reason it's called DEGREES Celsius, and not "celsiuses". Compare to kelvins, which are called just that - kelvins.
Like, you can say "1 inch = 25.4 mm" no problem, but how many degrees Celcius is a Kelvin? 1? 274.15?
A difference of one kelvin, or a temperature of one kelvin? And stop needlessly capitalizing random words like some kind of german, please.
-
@BernieTheBernie said in Temperature Conversion:
By the way, isn't there a difference between DateTime and TimeSpan?
Well, you can subtract two DateTimes to obtain a TimeSpan, but I don't think there's anything you can add to a DateTime to obtain a TimeSpan. So I don't think there is such a thing as a difference between DateTime and TimeSpan.
On the other hand you can add a TimeSpan to a DateTime to obtain a new DateTime, so the difference between a TimeSpan and a DateTime is a DateTime.
-
@BernieTheBernie said in Temperature Conversion:
Um, wait.
293 K ... that's 20°C.
294 K ..., ... 21°C.
1 K, ..., oh that's complicated, ... oh yes: -272°C."What's the problem here? The calculation looks right. What am I missing?
-
@BernieTheBernie I had to read that a few times to realize what's wrong. Do you actually display temperature differences to the customer?
E: Obligatory 0K = -273.15 °C.
-
@stillwater a difference of one kelvin is not a difference of -272 degrees Celsius
more precisely in this case, 20°C and 21°C are not -272°C apart
-
@Gąska said in Temperature Conversion:
And stop needlessly capitalizing random words like some kind of german, please.
Unit names which are derived from proper names have capital letters as abbreviations and are capitalised when written out.
-
-
@PleegWat said in Temperature Conversion:
@Gąska said in Temperature Conversion:
And stop needlessly capitalizing random words like some kind of german, please.
Unit names which are derived from proper names have capital letters as abbreviations and are capitalised when written out.
No they're not. It's ampere, not Ampere; it's pascal, not Pascal; it's newton, not Newton; it's bel, not Bel.
-
@Gąska TIL my whole life has been a lie :/
-
@kazitor said in Temperature Conversion:
It's interesting, isn't it? Degrees Celsius doesn't really work like a unit in this sense because it's not based at 0.
Like, you can say "1 inch = 25.4 mm" no problem, but how many degrees Celcius is a Kelvin? 1? 274.15?
Irregardless of the unit used, temperature is an intensive property, so yeah, it does not behave like most other common properties (like mass, volume...) that are extensive.
-
@remi Interesting, but it's not the relevant issue here. If I start measuring pressures (also intensive) in different units, there are no problems with differences versus whole amounts.
I think it all stems from the fact that the Celsius scale has negative values and does not place zero on what is known to be the "zero" temperature. Similar problems would arise if I defined a unit of mass where "0" was equivalent to 1 kg.
-
@kazitor or 10−12 W/m².
-
-
@kazitor I was aiming for decibels, but some more googling shows that the association between decibels and loudness isn't as strong in English-speaking world as in Poland, so it's understandable why you'd miss it.
-
@Gąska I knew what decibels are and they came to mind from the units, but I didn't see the relevance to mass. Not being related to loudness in the English-speaking world is news to me; what else could they be related to?
Now I see you are referring to how decibels are logarithmic and thus can't measure a zero intensity.
But I must : dB ≠ W m-2. Because taking the logarithm effectively nullifies whatever units were already present.
-
@kazitor right, because dB is defined as the log of a ratio of like intensities.
The "named" functions (trig, exponentials, logs, etc) tend to take dimensionless arguments, because no one's sure what log(meters) is.
-
@kazitor said in Temperature Conversion:
But I must : dB ≠ W m-2.
And that's where my bit about cultural differences comes from - in Poland, they really are, because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
-
@kazitor said in Temperature Conversion:
@remi Interesting, but it's not the relevant issue here. If I start measuring pressures (also intensive) in different units, there are no problems with differences versus whole amounts.
I still think it does. "How many degrees C in a K" is meaningless, not because of the origin of the scales but because when you say "how many feet in a metre" (or other similar comparison with extensive properties), what you're really saying is "how many feet do I need to add to get to a metre", because you can add feet together (btw, did you know that 2.4384 m is a unit of length called the octopus?). That does not apply to temperature because it's intensive.
Pressure would have the same issue, only hidden because indeed the scales all start at the same point (pressure = 0 is the same whatever unit is used). But strictly speaking, I don't think "how many bars in a Pa" has any actual physical meaning. You can ask "what is the pressure in bars of that pressure in Pa" (converting between units), or "what is the increase in pressure in bars if I increase the pressure by 1 Pa", but then you're really talking variations of pressure, not pressure itself. It's not really "if I take something that has a pressure of one bar and splits it into Pa-sized chunks, how many chunks would I get", which is a meaningless question.
I'm not sure though, but that's how I understand it.
Also and re-reading it, I may be totally talking out of my ass, but when I thought about the bad pun above, I had to post it, so I had to say something to build up to it. I'm not apologizing for it.
-
@kazitor Welcome to true consciousness. Regardless of origin, unit names are common nouns that follow all the grammatical rules for common nouns, which means they're not normally capitalized (except in languages like German, that capitalize all nouns). The symbol is indeed capitalized if the unit name comes from a proper name (and uncapitalized if not, except for the litre, for which L is acceptable to avoid confusion). The symbols are mathematical symbols, not true abbreviations, which means they do not end with a period and are completely invariable.
-
@Gąska said in Temperature Conversion:
@kazitor said in Temperature Conversion:
But I must : dB ≠ W m-2.
And that's where my bit about cultural differences comes from - in Poland, they really are, because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
I've never seen dB used for anything but sound.
-
-
@boomzilla well, apparently they use it for other things in Australia and... Halland.
-
@boomzilla said in Temperature Conversion:
I've never seen dB used for anything but sound.
Isn't that the abbreviation for dBase?
-
-
@boomzilla said in Temperature Conversion:
@Gąska said in Temperature Conversion:
@kazitor said in Temperature Conversion:
But I must : dB ≠ W m-2.
And that's where my bit about cultural differences comes from - in Poland, they really are, because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
I've never seen dB used for anything but sound.
dBmV if you're working with WiFi-signal strength.
Or generally dB when talking about the gain of an antenna.
-
@Rhywden said in Temperature Conversion:
@boomzilla said in Temperature Conversion:
@Gąska said in Temperature Conversion:
@kazitor said in Temperature Conversion:
But I must : dB ≠ W m-2.
And that's where my bit about cultural differences comes from - in Poland, they really are, because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
I've never seen dB used for anything but sound.
dBmV if you're working with WiFi-signal strength.
Or generally dB when talking about the gain of an antenna.
OK, actually I believe I have come across it WRT antenna gain. Still, if you say decibels people are generally going to think sound.
-
@Rhywden said in Temperature Conversion:
@boomzilla said in Temperature Conversion:
@Gąska said in Temperature Conversion:
@kazitor said in Temperature Conversion:
But I must : dB ≠ W m-2.
And that's where my bit about cultural differences comes from - in Poland, they really are, because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
I've never seen dB used for anything but sound.
dBmV if you're working with WiFi-signal strength.
Isn't it milliwatt though, not millivolt? Written as dBm?
-
@Gąska dBm is milliwatt. The scaling is actually a bit mind-blowing if you stop to think about it. Wi-Fi receivers are usually functional down to around -70 dBm I think, and cell phone connections can be down below -100 dBm! (Mine's reporting -106 dBm at the moment which is only a "yellow" connection, the graph doesn't turn red until around -120 dBm.)
- 0 dBm: 1 milliwatt
- -30 dBm: 1 microwatt
- -60 dBm: 1 nanowatt
- -90 dBm: 1 picowatt
And things get really fun when you move in the positive direction. Then it becomes obvious just how much of a difference in power 30 dBm really is:
- 0 dBm: 1 milliwatt
- 30 dBm: 1 watt
- 60 dBm: 1 kilowatt
- 90 dBm: 1 megawatt
-
-
@Gąska said in Temperature Conversion:
@Rhywden said in Temperature Conversion:
@boomzilla said in Temperature Conversion:
@Gąska said in Temperature Conversion:
@kazitor said in Temperature Conversion:
But I must : dB ≠ W m-2.
And that's where my bit about cultural differences comes from - in Poland, they really are, because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
I've never seen dB used for anything but sound.
dBmV if you're working with WiFi-signal strength.
Isn't it milliwatt though, not millivolt? Written as dBm?
It really depends on
whatwatt you're interested in.Edit: Couldn't resist inserting this pun.
-
@Rhywden it's a surprisingly hard topic to google up. Even the site you linked gives a definition of dBmV but not of dBm. So could you please answer the following question for me: given a Wi-Fi adapter with a given antenna of given length and given impedance receiving a signal at given frequency from a given source emitting with a given power and having as constants all the other elements of the environment that a given pedant might think of that would turn the answer into "it depends", what's the exact relationship between signal strength in dBmV and signal strength in dBm?
-
@Gąska said in Temperature Conversion:
@boomzilla well, apparently they use it for other things in Australia and... Halland.
This Halland?
Dunno what special meaning dB got there, except for having the largest swedish radio transmitter...
-
@Atazhaia said in Temperature Conversion:
except for having the largest swedish radio transmitter...
The Big Ben?
-
@Gąska I found some references to dBmV just now, but it's not a scale I've ever seen used before. I see a lot of dBm and dBu, but never dBmV or dBV.
@Gąska said in Temperature Conversion:
what's the exact relationship between signal strength in dBmV and signal strength in dBm
It depends. Basically follow
Ohm's LawNot-Ohm's-Law but I forget the name, where Watts = Volts x Amps (assuming simplistic conditions and direct current). There's no direct conversion between dBmV and dBm without further information.
-
@mott555 said in Temperature Conversion:
@Gąska said in Temperature Conversion:
what's the exact relationship between signal strength in dBmV and signal strength in dBm
It depends.
FOR FUCK'S SAKE!!!!!!!!!!!!!!!!!
-
@mott555 said in Temperature Conversion:
Basically follow Ohm's Law, where Watts = Volts x Amps
That's not Ohm's law
There's no direct conversion between dBmV and dBm without further information.
Okay, but if there's a given signal being emitted as an electromagnetic wave, with near-constant frequency and near-constant amplitude, and I have a receiver located at a given point in space in straight line from the emitter, seperated by athmospheric air of uniform density, where exactly should I measure the voltage for the purpose of measuring signal strength, and where exactly should I measure the current, and when would I want to express signal strength as dBmV and when as dBm?
-
@Gąska said in Temperature Conversion:
when would I want to express signal strength as dBmV and when as dBm?
Ignoring the rest of that post, I'd say always dBm and never dBmV. I've never heard of measuring an antenna's receiving strength in dBmV before because it's power that you care about, and power is measured in Watts.
-
@Gąska said in Temperature Conversion:
@mott555 said in Temperature Conversion:
Basically follow Ohm's Law, where Watts = Volts x Amps
That's not Ohm's law
There's no direct conversion between dBmV and dBm without further information.
Okay, but if there's a given signal being emitted as an electromagnetic wave, with near-constant frequency and near-constant amplitude, and I have a receiver located at a given point in space in straight line from the emitter, seperated by athmospheric air of uniform density, where exactly should I measure the voltage for the purpose of measuring signal strength, and where exactly should I measure the current, and when would I want to express signal strength as dBmV and when as dBm?
Well, dBmV is independent of the impedance whereas dBmW isn't. I would say that dBmV is usable to denotate the "raw" signal strength whereas you'd use dBmW when working with a specific antenna.
-
@Rhywden ah, so dBm is just dBmV divided by antenna's own impedance? That clears things up. Thanks a lot!
Edit: ...divided by impedance and then multiplied by dBmV again, of course. Because watts.
-
@Rhywden according to some Polish random at the bottom of the page in this ancient mailing list thread, dBm is actually scaled to 1mW with constant impedance of 50Ω, a standard used in all telecom. That would suggest that dBm is just another way to state raw voltage of the signal, and contrary to @mott555's misguided ramblings, there is a direct conversion multiplier between dBm and dBmV. Is that correct, or is dBm actually obtained based on a specific antenna's own impedance?
Sorry for pestering you so much, but it really is interesting topic, and I don't know anyone else who can actually answer this question (and not cross me out of the student list in my school, because the only other person I know can).
-
@Gąska said in Temperature Conversion:
A difference of one kelvin, or a temperature of one kelvin
And with absolute units, they are the same.
A (difference/length) of 1 inch transforms into a (difference/length) of 25.4mm.
-
@Gąska said in Temperature Conversion:
because you don't use decibels for anything else but sound intensity, unless qualified with some additional symbol, like dBm or dBV (not to be confused with dBv).
Decibels used to describe sound intensity are generally implicitly (or explicitly) dBA, dBB, dBC, or dBL, where the subscript denotes the frequency weighting (roughly matching the frequency response of the human ear) used in the measurement. A-weighting applies to low-intensity sounds, B- to medium, and C- to loud sounds; L (or Z) denotes a flat, unweighted measurement.
They are, however, still ratios. For acoustic measurements in air, the reference sound pressure is implicitly 20 µPa. This is defined as 0 dB, and is approximately the faintest sound the human ear is capable of detecting.
-
@boomzilla said in Temperature Conversion:
@brie said in Temperature Conversion:
What do you take me for, some kind of nerd?
Well, geek, anyway.
-
@boomzilla said in Temperature Conversion:
I believe I have come across it WRT antenna gain.
Antenna gain is commonly expressed in dBi or dBd.