Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6 7 ... 14

Author Topic: Change temperature to Celsius  (Read 63372 times)

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: Change temperature to Celsius
« Reply #60 on: March 16, 2009, 07:14:34 pm »

Well, I'm a selfish European player that would really prefer Celsius. ;)

Same here!  ;D
Logged

RAM

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #61 on: March 16, 2009, 07:39:12 pm »

It is simple:
Step 1: Take the temperature required for a 1x1x1 cube to freeze a 100x100x100 cube in a single frame, and call that 0.
Step 2: Take the temperature required for a 1x1x1 cube to melt a 100x100x100 cube in a single frame, and call that 1.
Step 3: Store temperature as a binary integer, it will save on processing power...
Step 4: Have fun!
Logged
Vote (1) for the Urist scale!
I shall be eternally happy. I shall be able to construct elf hunting giant mecha. Which can pour magma.
Urist has been forced to use a friend as fertilizer lately.
Read the First Post!

Mikademus

  • Bay Watcher
  • Pirate ninja dwarves for great justice
    • View Profile
Re: Change temperature to Celsius
« Reply #62 on: March 16, 2009, 07:41:55 pm »

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.

I'm pretty sure that is totally untrue...

Except when it causes space shuttles to explode.
That doesn't mean the formulas don't work, it just means there's a conversion factor that people can forget.  That's like saying that the formula for acceleration due to gravity changes depending on whether you're using feet or meters.
Oh yes, it will work if you have a conversion factor.  But all that does is convert Fahrenheit to whatever unit is appropriate before running it through the rest of the equation.  I you use the ideal gas law to find the temperature of a gas, your answer will always be Kelvin scale.
Because, you know, it is always good to have more things that could go wrong in critical systems. Yeah, let's use a conversion function in our equations rather than use a consistent unit set! :)

Anywhoo, that previous suggestion about suffixing your unit in the raw was good.
Logged
You are a pirate!

Quote from: Silverionmox
Quote from: bjlong
If I wanted to recreate the world of one of my favorite stories, I should be able to specify that there is a civilization called Groan, ruled by Earls from a castle called Gormanghast.
You won't have trouble supplying the Countess with cats, or producing the annual idols to be offerred to the castle. Every fortress is a pale reflection of Ghormenghast..

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Change temperature to Celsius
« Reply #63 on: March 16, 2009, 07:46:34 pm »

Because, you know, it is always good to have more things that could go wrong in critical systems. Yeah, let's use a conversion function in our equations rather than use a consistent unit set! :)
Yeah, that was kind of my point.

Anywhoo, that previous suggestion about suffixing your unit in the raw was good.
Yeah, I'm really not sure how this thread kept going after someone said "how about this?"
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

Random832

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #64 on: March 17, 2009, 01:09:47 pm »

Also, nearly all formulas used in physics and chemistry that involve temperature use Celsius or Kelvin, and inserting Fahrenheit would throw off the answers completely, which is part of why F is considered arbitrary.

I'm pretty sure that is totally untrue...

Except when it causes space shuttles to explode.
That doesn't mean the formulas don't work, it just means there's a conversion factor that people can forget.  That's like saying that the formula for acceleration due to gravity changes depending on whether you're using feet or meters.
Oh yes, it will work if you have a conversion factor.  But all that does is convert Fahrenheit to whatever unit is appropriate before running it through the rest of the equation.  I you use the ideal gas law to find the temperature of a gas, your answer will always be Kelvin scale.

Only if you're using 8.3144 for R and your pressure and volume are also in (appropriately scaled, i.e. kPa vs L or Pa vs m^3) SI units. SI in, SI out.

If I take pressure in PSI, volume in cubic feet, and quantity in "lbmol" (1 lbmol = 453.59 mol) I can use 10.731 for R and get my answer in the Rankine (degrees fahrenheit vs absolute zero) scale. And this is a consistent unit set (feet, pound-force, lbmol, rankine) no different from the SI being a consistent unit set (metres, newtons, mol, kelvin), and there are no conversion factors - just a physical constant that has a different value in different units.

Or did you think there was something sacred about 8.3144 in particular and therefore the ideal gas law "uses kelvin" (along with meters and pascals) rather than being a system-agnostic formula?

There are also _no_ physics formulas that use the celsius scale directly. The only significant issue with the "american" system in isolation is the fact that there are two different systems based on different interpretations of a "pound" (the metric system used to also have an alternate system using the "kilopond" (9.8 N) as a unit of force, and the "hyl" (9.8 kg) as the unit of mass), and that can be avoided by being specific about which one you use

At the end of the day, there's no REAL superiority to 1/299724258 the distance light travels in a second vs 1/983571056.43 that distance, or to the weight of one lump of metal vs another (though, the pound is nowadays defined as an exact fraction of the kilogram's lump of metal), or 1/273.16 of the temperature of the triple point of standard water vs 1/491.688 of that temperature, or a zero point 1/27316 less than that vs one 32018/491688 less. And of course both share the definition of the second as 9192631770 times the transition between two arbitrarily chosen states of an arbitrarily chosen element. The point is, these are all completely arbitrary numbers (and/or lumps of metal) with no real mathematical basis. Yeah, the nice round decimal number ten million metres from pole to equator through Paris sounds impressive, until you think that it was only chosen as ten million to get a length close to a yard anyway, there's about an extra 2km because they were off in their measurement, and why Paris anyway or Earth for that matter?
« Last Edit: March 17, 2009, 01:32:39 pm by Random832 »
Logged

Kilo24

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsiusm
« Reply #65 on: March 17, 2009, 04:27:15 pm »

There is a good argument against using non-SI measurements: they make shuttles crash. 
It was more a problem with human stupidity.  That's generally a bit harder to control for than notation conventions.

As we all know, that is merely a concern of NASA engineers and rocket scientists.   Bugs flee in terror before The Great Toady One's Blessed +5 Fingers of Relentless Coding.

More seriously, how did he convert the real-world boiling/melting points into dt (dwarftemp)?  And what would be the problem in allowing us to tag our raw modifications with C, K or F to denote the real world temperatures to become dt?  It should be just a simple input patch to reading temperature from the raws.

(And on a random note, it's Kelvin, not degrees Kelvin.  Fahrenheit and Celsius are a degree measurement, Kelvin's not because it starts at absolute zero.)
Logged

Veroule

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #66 on: March 17, 2009, 04:41:24 pm »

Thank you Random for stating it so succintly.  Also the reason Paris was chosen was because the observer involved was in Paris, it is a matter of Relativity.

Can -Kelvin exist in the real world?  Yes.  When the sum of the vectors involved in computing the temperatures of Relative substances have directions and velocities that result in it.  Temperature is a relative calcluation, just look at the glass formed on impact craters to understand this.  The specific temperatures of each object do not need to be anywhere near what is required to create glass, but the Relative velocities of those objects produces a discharge of energy (some of which forms as temperature) upon impact. It is easy to see it when the vectors result in conjuction, what is difficult to conceptualize if the disjunction.  Claiming it doesn't exist would require that most of Newtonian, Relativistic and Quantum mechainics be thrown away.  Once again I will say...Let us put the Physics aside.

DF should use whatver units it wants, and allow for the raws to support multiple units.
Logged
"Please, spare us additional torture; and just euthanise yourselves."
Delivered by Tim Curry of Clue as a parody of the lead ass from American Idol in the show Psych.

Martin

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #67 on: March 17, 2009, 06:40:55 pm »

A vote for Centigrade.

While nothing below -273C makes sense, neither does anything above 6,000C. We don't need to recover the low end of a signed int16 any more than we need to use the high end. And I don't see any point to fractional temps since they'll never come into play in a meaningful way.

Centigrade is the most common and straightforward measure, results in the least hassle, and at least simplifies some things in the code by simply looking for the high bit to see if water should be freezing or liquid.

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Change temperature to Celsius
« Reply #68 on: March 17, 2009, 06:57:32 pm »

A vote for Centigrade.

While nothing below -273C makes sense, neither does anything above 6,000C. We don't need to recover the low end of a signed int16 any more than we need to use the high end. And I don't see any point to fractional temps since they'll never come into play in a meaningful way.

Centigrade is the most common and straightforward measure, results in the least hassle, and at least simplifies some things in the code by simply looking for the high bit to see if water should be freezing or liquid.
DF should use whatver units it wants, and allow for the raws to support multiple units.
Read it!  >:(
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

RAM

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #69 on: March 17, 2009, 08:03:56 pm »

Celsius:
It is simple:
Step 1: Take the temperature required for a 1x1x1 cube to freeze a 100x100x100 cube in a single frame, and call that 0.
Step 2: Take the temperature required for a 1x1x1 cube to melt a 100x100x100 cube in a single frame, and call that 1100.
Step 3: Store temperature as a binarysigned number integer, it will save on processing power...
Step 4: Have fun!

Fahrenheit: Take the highest mean temperature recorded at any one moment in Boatmurdered, use that figure as 100. Take the lowest mean temperature recorded at any one moment in Nist Akath, that will be the 0 point. Use a sign.

Kelvin: A single 1x1x1 grid at 0 will cause everything in an entire world map of maximum size to become freezing in a single frame. 100 is the melting point of dwarf. No sign.

Me? I would rather not have to deal with negatives trying to bring me down...
Logged
Vote (1) for the Urist scale!
I shall be eternally happy. I shall be able to construct elf hunting giant mecha. Which can pour magma.
Urist has been forced to use a friend as fertilizer lately.
Read the First Post!

ShadeJS

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #70 on: March 17, 2009, 08:59:51 pm »

Well, I'm a selfish European player that would really prefer Celsius. ;)

Well, I'm a selfish Canadian player that would really prefer Celsius. ;)

Oh, and: http://www.metric4us.com/
Logged

Martin

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #71 on: March 17, 2009, 10:28:25 pm »

DF should use whatver units it wants, and allow for the raws to support multiple units.
Read it!  >:(
I did. Why make it harder to distribute mods when each one may use a different set of units? Why introduce that kind of code complexity when we're talking about a linear scaling from one to the other? Why open up the possibility that someone will pick a totally stupid set of units that overflows and crashes DF? Do we really want Toady to add code that will constantly convert among an arbitrary number of temperature scales when everyone already complains about the processor load of running temperature as it is?

Put another way, what is the benefit to the game of having more than one scale, other than to avoid a bit of inconvenience for a handful of modders - and an inconvenience that a 3rd grader could overcome?

(And we already have 0 Kelvin implemented in DF. It's called the space bar.)

Random832

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #72 on: March 17, 2009, 11:17:56 pm »

I did. Why make it harder to distribute mods when each one may use a different set of units? Why introduce that kind of code complexity when we're talking about a linear scaling from one to the other? Why open up the possibility that someone will pick a totally stupid set of units that overflows and crashes DF? Do we really want Toady to add code that will constantly convert among an arbitrary number of temperature scales when everyone already complains about the processor load of running temperature as it is?

Um... read it again; none of what you just said was in the proposal - what was proposed was to use one scale (maybe the one in use now, maybe something with smaller units for precision, who cares) internally within DF, and convert it from a fixed set of scales (C, F, and K) _once_ when reading from the raws. I.e. nothing changed internally but [HOMEOTHERM:99F] is equivalent to [HOMEOTHERM:10067].
Logged

Martin

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #73 on: March 17, 2009, 11:50:56 pm »

I did. Why make it harder to distribute mods when each one may use a different set of units? Why introduce that kind of code complexity when we're talking about a linear scaling from one to the other? Why open up the possibility that someone will pick a totally stupid set of units that overflows and crashes DF? Do we really want Toady to add code that will constantly convert among an arbitrary number of temperature scales when everyone already complains about the processor load of running temperature as it is?

Um... read it again; none of what you just said was in the proposal - what was proposed was to use one scale (maybe the one in use now, maybe something with smaller units for precision, who cares) internally within DF, and convert it from a fixed set of scales (C, F, and K) _once_ when reading from the raws. I.e. nothing changed internally but [HOMEOTHERM:99F] is equivalent to [HOMEOTHERM:10067].

Fair enough. But it still doesn't address dealing with multiple units across mods (stone mod 1 uses F and stone mod 2 uses C, etc making it harder to maintain consistency across files.) And again, what is the benefit to offering multiple options like that? Is it really that hard to work in one set of units?

Silverionmox

  • Bay Watcher
    • View Profile
Re: Change temperature to Celsius
« Reply #74 on: March 18, 2009, 06:28:17 am »

A uniform standard would be the best I think.


online conversion of all kinds of units
Logged
Dwarf Fortress cured my savescumming.
Pages: 1 ... 3 4 [5] 6 7 ... 14