Cranes control with time-based and position constraints