Oh brother, this is funny, the person who created the tests for this challenge kind of got things backwards
Take a close look at how the gps function is being called in the sample test suite. Specifically, the order of the parameters. Let me know if you need a bigger hint. Bottom line, your code is fine, you just need to make a simple adjustment because the person who wrote the tests got it backwards.
P.S. Now that I look at it more, the instructions do include the function definition as gps(s, x) but I swear the seed code had it the other way around. Regardless, the first argument is the time and the second argument is the array of distances. Once you fix your function to reflect that, you will pass.