Task #0030: Ttrajectory implementation and tests.