fixed_time_ms.py is the implementation without optimal time segments
min_snap_time_opt.py is the implementation with optimal time segments, where gradient descent is implemented manually to find optimal time segments
constrained_time_opt.py is the implementation of optimal time segments with improved gradient descent using scipy library
Go throught all of the above 3 files in given order and try to understand the concept, the implementation and the structure of the code.
Try out the code by yourself, for this, give the x, y, z position arrays and avegare velocity in the main function and a beautiful trajectory is generated.