Inspiration
In left-hand driving countries, left-hand turns are especially dangerous and unsafe because they usually involve the vehicle turning against a flow of oncoming vehicles. In the following article by CNN, it is mentioned that a study on crash factors actually has "left turning" as one of the leading critical pre-crash events.
UPS has already built a way to avoid left turns, using a method called "loop dispatch". Unfortunately, this is not readily available for a large range of consumers. Hence we have decided to come up with a way to use Google Map's API to allow day-to-day consumers to experience this optimisation.
What it does
GRight makes use of Google Maps' API and ensures that all the right turns (for right-hand driving countries) are omitted when plotting the map. After omitting the right turns, we snap the routes back in place and allow for the entirety of the route to be along a singular path that does not involves U-turns or any right-turn driving.
How we built it
We used ___ packages. Using the React-Google-Maps/API, we were able to make calls through the directionService to obtain the route from the origin to the destination. We subsequently, filter out steps with right turns.
Challenges we ran into
The API response did not include some of the information that we were expecting to receive. For example, if a node is an intersection, the lack of this information made it hard for us to run the original algorithm implementation that we wanted to have initially.
What we learned
We learnt how to integrate Google Map API into our application and subsequently, parse and filter the response to the google map.
What's next for GRight
We hope to further expand on just simply filtering the directions that we receive from Google Map's API, but rather use a graphing algorithm to construct a graph only encompassing of the turns that we want the drivers to take.
Besides this, Machine Learning features can be implemented to calculated the most congested / frequently used roads to reduce the amount of stops, which can further increase fuel efficiency.
Built With
- google-maps
- nextjs
- react
- tailwind
Log in or sign up for Devpost to join the conversation.