named constants for gravity, invalid time, invalid seqence

use c++ style casts