hmmm, thanks for the link...the required altitude there seems to be teh altitude of the sun (-6deg for civil twilight etc) not the observer sitting in a plane or on top of a tall mountain.
is there any way of easily calculating it from say 16000 feet...i think I'll have to calculate the distance to horizon from height and go from there