first altitude

How can i get info.altitude and freeze it to a static var

or how can I get elevation from zero

I have tried with static var an const and do not works.