500 meters is pretty damn high for OFP, but you can do this:
_height = getpos planename select 2
That will return the altitude of your plane above ground. If you want the altitude above sea level, then look in the editors depot under functions. There is a nice function call getASLheight by Snypir.