Simple rocket trajectory calculation, written in C++