rotation equation

I'm new to guage development and I need abit of help with the script for the rotation equations. I'm trying to make an altimiter to get some practice before I get into the big stuff. Can anyone tell me where I can get some help on the script (or better yet, give me some of it)? :confused: