Vikas Rohra

Full Stack JavaScript Web Developer

Vikas Rohra

Full Stack JavaScript Web Developer

SmartCabs - A Smart Cab Fare Predictor

SmartCabs - A Smart Cab Fare Predictor

About:

  • SmartCabs is a fare predictor website depending on distance, estimated time, and time of the day.
  • This project is a part of hackathon organized by FindCoder.

Features:

  • Smart autocomplete for places
  • A path highligter to show a path from your pickup location to your drop location
  • Smart fare calculator
  • A wide variety of cabs available to select that suit every pocket

Fare Calculation:

Go through below example to understand how fare is calculated in SmartCabs.

Example:

Suppose a person has entered his pickup and drop locations and selected Smart Sedan. Day time hence night charges are not applicable

Google Maps has calculated the Distance = 30KM and Duration = 30mins from the entered pickup and drop locations.

Now, for Smart Sedan, charges as per our fare chart are

Charge/KM: ₹13 for first 20 KMs after that ₹25/KM

Base Price: ₹60 for first 5 KMs

Ride Time Charge: ₹1/min

Service Tax: 5.6%

Calculations,

Charge on Distance (First 20 KMs) = 13 * 20 = ₹260

Charge on Distance (Remaining 10 KMs) = 25 * 10 = ₹250

Base Price = 60 * 5 = ₹300

Ride Time Charge = 1 * 30 = ₹30

Total Fare = 260 + 250 + 300 + 30 = 840 * 5.6% = 887.04 = ₹887

Technologies / Libraries Used:

JavaScript

ReactJS

Tailwind CSS

DaisyUI

React Router

React Google Maps

HTML

CSS

Comments (0)