Forum menu
Analysing a route w...
 

Analysing a route with AI

Posts: 242
Free Member
Topic starter
 

Thanks - I remember now that something like pandas does that nan thing now you mention it!
I've got your code base up in cursor ai, I changed the measurements to imperial just to see how it all works.
Initially I got an error, I pasted the error into the chat and it offered up a fix which I accepted.

And asked for changes like this -

Make the ignore two parameters - ignore first x miles and ignore last x miles

"I'll modify the code to make the ignore distances configurable parameters. We'll add them to the main function and pass them through to where they're needed. I'll modify the code to make the ignore distances configurable parameters. We'll add them to the main function and pass them through to where they're needed."

It's just...brilliant!!!


 
Posted : 05/01/2025 9:59 pm
Posts: 242
Free Member
Topic starter
 

I will refine it a bit more then check it against a real map before trusting it of course ๐Ÿ™‚
(Thinking I'll add hotels, compress to a list, look for some more API's like population count on towns, add a "handlebar print" mode that kind of thing!)

Wow, just wow!!


 
Posted : 05/01/2025 10:13 pm
 Ewan
Posts: 4395
Free Member
 

Nice! Feel free to submit the changes to the GitHub. That's all integrated in cursor too.


 
Posted : 05/01/2025 10:40 pm
Posts: 242
Free Member
Topic starter
 

I will do cheers!

I'm thinking to ask it to put all the parameters in a toml configuration file and a few other things!


 
Posted : 05/01/2025 11:05 pm
Posts: 9010
Free Member
 

This is quite interesting!

I recently dabbled with Python for the first time to process bike rides within Golden Cheetah (a ride/HR/power/data analyzer for desktop pc/mac).

I wrote some code to determine if a ride was a commute, and which direction it was in (ie to work, or, back home) - quickly discovered something more sophisticated than a series of if statements comparing coordinates within a rectangle was needed! Searching online gave me the Haversine Formula the code of which can be found on stackoverflow (note: be careful of the order of lat/lon).

Other rides and runs were filled in with generic data, and in some instances the bike could be determined from this also.

Would be quite good to automatically fill in the route field with settlements such that rides could then be filtered by aspects of the route.


 
Posted : 06/01/2025 12:37 am
 Ewan
Posts: 4395
Free Member
 

That seems doable. I've found that claude is actually quite a good coach given enough context. It's currently doing my half marathon training - I've basically given it my goals, performance metrics etc, and it gave me a training plan. I then paste in my run lap performaces from strava and it it'll then give me views etc - helped moderate my return from illness etc. I'm doing it just in a claude chat at the moment, but it could be worth turning it into more of an app.


 
Posted : 06/01/2025 1:23 pm
Page 2 / 2