Fix code issues
Add missing function
Fix phase for conditional function
Fix ceiling variable in cabin altitude calc