Simplified velocity calculation based on position and added more test cases to the test file