[HTELE]: climbrate calculation with ring buffer. move some global variables to allocated mem.