Don't click here unless you want to be banned.

LSL Wiki : LibraryThermometer

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are crawl338.us.archive.org

Thermometer


This script will calculate temperature at the objects vector.

float base;
float pascal;
float sealevel = 101.32500;
float temperatureF;
vector sun;
vector pos;
default
{
    touch_start(integer total_number)
    {
        sun = llGetSunDirection();
        pos = llGetPos();
        base = llLog10(5- ((pos.z - llWater(ZERO_VECTOR))/15500));
        pascal = (sealevel + base);
        temperatureF = ((((pascal * (2 * llPow(10,22)))/ (1.8311*llPow(10,20))/ 8.314472)/19.85553747) + (sun.z * 10));
        llSay(0,"Current Temperature is "+ (string)temperatureF +" Degrees Fahrenheit");
        llSleep(1);
        llSay(0,"Current Temperature is "+ (string)((temperatureF + 459.67) * 5/9) +" Degrees Kelvin");
        llSleep(1);
        llSay(0,"Current Temperature is "+ (string)((temperatureF - 32) * 5/9) +" Degrees Celsius");
    }
}
There are 6 comments on this page. [Display comments/form]