Monday 29 June 2009

Free data broadcaster & gauge kit.

After much procrastination, I am getting around to publicising my latest development, a data broadcaster and receiving device, to be used for whatever projects it may benefit.

I am making these implements free -- both free-of-charge, and freely-modifiable -- in the hopes that they may further the progress of science and industry in Caledon and like-minded communities.

A link to the kit is found at the end of this posting.

INTRODUCTION.

This kit contains two items: a prim scripted to transmit an integer (in degrees, 0-360) on a certain channel, and a receiver contained in a circular gauge. The gauge prim has its texture offset changed such that it indicates the value received (normalised to percentage, in this case).

The scripts and texture are released free of charge, and as open-source. Please improve and extend upon it.



Figure 1. Data transmitter in the path of a mushroom-eating juvenile plesiosaur (Cryptoclidus sp.).

APPLICATION.

Users will wish to replace the data transmitter script with something appropriate to their own work. Out of the box, the transmitter when touched generates a random number representing degrees, converts the floating point result into a string, and broadcasts that string (via llSay) on a channel defined in the script. The script in the receiver (the dial itself, actually) listens on the defined channel for a string. The string is then converted to a floating point value, and the texture offset is changed by value/360 (again, representing degrees).

Must one use degrees? Of course not. The texture offset parameter is a 0.0 to 1.0 range, so a decimal approach is actually simpler than the degree business. (Actually, the texture offset is -1.0 to +1.0; that is, 0 to 1 in both 'forward' and 'backward' directions.)

Why, then, degrees? A reasonable question. The project included the notion of not just changing the texture offset, but actually rotating the dial prim around its Z axis, as an actual dial would do in Real Life. In that case, the state of the dial in degrees (think compass on a ship's binnacle) would be the ideal currency for transmitting. Unfortunately, as your writer did not read maths or physics at university, all that work involving rotations and Euler representations of quaternions had to give way to the more expedient -- and graceful -- method of simply shifting the texture around.



Figure 2. Scientist at leisure outside a public house, viewing transmitted data on the receiving device.


POSSIBLE USES.

The list here is fairly large, limited only by imagination (and the whims of LSL). In short, any programmed system involving multiple objects can use this system to transmit and display numeric data in an analogue fashion. The initially-intended audience consists of steampunk builders, mad scientists, tinkerers, and anyone wishing to dabble in an old-fashioned method of data display.

The current broadcasting method, llSay, has its own caveats. The LSL wiki page on the function is recommended reading. (http://www.lslwiki.net/lslwiki/wakka.php?wakka=llSay)


IMPROVEMENTS.

The author will be happy to hear any suggestions, critiques, and constructive criticism related to this system. Users are asked not to keep their derivative creations hidden under their hats, but rather, to share them with the community. These scripts were not created by an expert, so any formative feedback will be taken in the manner in which it was given.


Figure 3. The location of the items in the offices of the Royal Society.

No comments: