Uber uses a fare calculation algorithm that factors in time spent on the ride as well as the distance and other factors when determining the fare to be charged. We cn't easily apply this to a public bus system. To start with there are many passengers in the bus getting and getting out at different times and places. Assuming we have a gpx record of the times and locations where the passenger is in the bus like 

 

{

       {

         "longitude":6.45676,

         "latitude":3.45678,

         "timestamp":12342343464

    },

       {

         "longitude":6.45776,

         "latitude":3.45678,

         "timestamp":12342343474

    },

       {

         "longitude":6.45876,

         "latitude":3.45678,

         "timestamp":12342343484

    },

       {

         "longitude":6.45976,

         "latitude":3.45678,

         "timestamp":12342343494

    }

}

How can we use this information to calculae a distance and time based fare?

E-mail me when people leave their comments –

You need to be a member of Solvi.ng to add comments!

Join Solvi.ng