You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have city json data with cityname, latitude and longitude and other minor information. Now we make a weighted bidirectional graph between every city .The weight is the traffic between the two place . For simplicity we gave random numbers between 1 to 1000 as traffic weight in our project.
A better approach could have been using Haversine Formula (using radius of earth and angle between two places : Wikipedia - Reference) ,we could find the distance between two places using latitutde and longitude. Then based on Rural, City, Highway segment of the road and traffic factor we could assign values:
Then finally calulate the time taken (traffic weight)= (Distance / speed) *traffic_factor
After Assigning the weights to the graph , we use shortest path finding algorithm ( Dijkstra algorithm ),to find the shortest path and also construct the path .
Say Shortest path from Delhi to Mumbai in our Demo .
Live Location Track
Using Rabbit MQ we used 3 topic-exchange : shipping, onroad, delivered .The status will get updated as the parcel moves from one city to another and it is consumed by the consumers. Finally when the parcel reaches the destination , a mail will be sent to pick up the delivery. The Live location is tracked using socket