Join us in Outworldz at www.outworldz.com:9000 or follow us:

Search dozens of selected web sites for OpenSim and LSL script

New! Script Meta-Search will search thousands of scripts here and at other sites for LSL or Opensim scripts.
Loading

Want to add a script or a project? Upload it and a half million people will see it and your name here this year.

Home   Show All
Category: Contributor: Creator
Barometer Barometer  

Barometer

Barometer.lsl

Category: Barometer
By : Cid Jacobs
Created: 2010-01-10 Edited: 2010-01-10
Worlds: Second Life

the Zip file

Download all files for Barometer
Contents are in zip format, with .LSL (text) source code and LSLEdit (text + Solution) formats.
Get file # 1. Barometer_1.lsl
1
2
3 // llAirPressure(vector v) Script
4 // Created by: Cid Jacobs
5 // Original by: Cid Jacobs
6 // Last Updated: 11-17-05
7 // Notes: Speak with Cid Jacobs about any concerns.
8 //
9 //This script will calculate air pressure at the objects vector plus offset.
10 //
11 //--------------------Globals
12 //Global Memory Storage For Calibration Offset
13 float Calibration = 101.32500;
14 //Global Memory Storage For User Definable Vector Offset
15 vector Offset = <0,0,10>;
16 //
17 //
18 //--------------------User Defined Function
19 float llAirPressure(vector Offset)
20 {
21 //Extrapolate Task's Local Coordinates
22 vector Position = llGetPos();
23 //Calculate And Calibrate Air Pressure
24 float Base_Reading = llLog10(5- (((Position.z - llWater(ZERO_VECTOR)) + Offset.z)/15500));
25 //Total Sum Air Pressure
26 float KiloPascal = (Calibration + Base_Reading);
27 return KiloPascal;
28 }
29 //
30 //
31 //--------------------States
32 //Mandatory Default State
33 default
34 {
35 //Triggered By The Start Of Agent Clicking
36 touch_start(integer num_detected)
37 {
38 //Say Current Total Air Pressure at Task + V
39 llSay(0,"Current air pressure is: "
40 +
41 (string)llAirPressure(Offset)
42 +
43 " KiloPascal.");
44 }
45 } // end

Back to the Best Free Tools in Second Life and OpenSim.