This PR introduces an enhancement to the existing Flask API by implementing a new feature that returns a simulated route with waypoints between the start and end locations. Additionally, each waypoint includes a randomly generated speed value to simulate varying travel speeds along the route.
Key Changes:
New Route Calculation: The /route endpoint now accepts start and end parameters, representing the start and end coordinates of the route.
Waypoints Generation: The API generates a series of waypoints between the start and end locations. Each waypoint includes:
A location (latitude and longitude).
A speed value (randomly generated between 30 and 70 units).
Response Structure: The API response includes the start, end, and a list of waypoints, each with its respective location and speed.
How It Works:
Endpoint:/route
Query Parameters:
start: Comma-separated latitude and longitude for the starting point (e.g., start=12.34,56.78).
end: Comma-separated latitude and longitude for the end point (e.g., end=34.56,78.90).
This PR handles #4
Summary:
This PR introduces an enhancement to the existing Flask API by implementing a new feature that returns a simulated route with waypoints between the start and end locations. Additionally, each waypoint includes a randomly generated speed value to simulate varying travel speeds along the route.
Key Changes:
/route
endpoint now acceptsstart
andend
parameters, representing the start and end coordinates of the route.location
(latitude and longitude).speed
value (randomly generated between 30 and 70 units).How It Works:
/route
start
: Comma-separated latitude and longitude for the starting point (e.g.,start=12.34,56.78
).end
: Comma-separated latitude and longitude for the end point (e.g.,end=34.56,78.90
).Usage:
http://127.0.0.1:5000/route
with the appropriate query parameters.Future Enhancements:
This feature provides a basic framework for simulating routes and can be expanded further with more complex logic.