A discrete time, optimal trajectory planning scheme for position trajectory generation of a vehicle is given here, considering the mission duration as a free variable. The vehicle is actuated in three rotational degrees of freedom and one translational degree of freedom. This model is applicable to vehicles that have a body-fixed thrust vector direction for translational motion control, including fixed-wing and rotorcraft unmanned aerial vehicles (UAVs), unmanned underwater vehicles (UUVs) and spacecraft. The lightweight scheme proposed here generates the trajectory in inertial coordinates, and is intended for real time, on-the-go applications. The unspecified terminal time can be considered as an additional design parameter. This is done by deriving the optimality conditions in a discrete time setting, which results in the discrete transversality condition. The trajectory starts from an initial position and reaches a desired final position in an unspecified final time that ensures the cost on state and control is optimized. The trajectory generated by this scheme can be considered as the desired trajectory for a tracking control scheme. Numerical simulation results validate the performance of this trajectory generation scheme used in conjunction with a nonlinear tracking control scheme.