clean up and calculation optimization
calculation of altitude without the use of pow()

the sketch size is bigger however, I'm going to optimize it later using
just computations on ints