I am currently developing a navigation system in android and I am using dijkstra's shortest path algorithm My Vertex class contains members as shown below:
-------------------------------------
| Vertex |
-------------------------------------
| | | | |
| id | name | longitude | latitude |
-------------------------------------
and an edge with members shown below:
---------------------------------------------
| Edge |
---------------------------------------------
| | | | | |
| id | name | source | destination | weight |
---------------------------------------------
Since the vertices and edges are based on a real data specifically: Intersections as Vertices and One intersection to another as Edges to put it simply the whole graph of of my application is the road network of my city.
My problem here is that I still can't come up with an algorithm or an arithmetic equation in calculating the weight of an edge based on the distance of one intersection to another and the time it gets to one intersection to another.