See inside and read the comments to see how I created a program to replicate gravity with forward movement. See my projects "Gravity Example" and "Comparing Gravity Code" for more information.