working example for altitude measurement