Must be a math and python expert!! Code is given need few fixing

Job ID: 33274414

Budget: $10 – $30 USD

I have the feature extraction code build but there are some errors such as straight_speed, trajectory acceleration and straight acceleration.
Requirements:
1) I want to keep the dataset same way it looks now but need following changes
straight speed is not calculating between two points (first and last points of the trajectory). So please fix and add to the feature
2) Calculate the horizontal and vertical acceleration of the straight speed and trajectory speed.
Related categories: Python Matlab and Mathematica Mathematics