altitude calculation only using ints