Updated flight phase related code

- Updated flight phases definitions (6)
- Renamed constants in defs.h
- Cleaned code and fixed some bugs in main.cpp