Skip to content

Get data about fuel prices at any location from this program

License

Notifications You must be signed in to change notification settings

vivek-nexus/KnowFuelPrice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Know your Fuel Price by location

This program gives fuel prices at any desired location. Just input latitude and longitude of the location and you will be able to know the nearest fuel outlet and the fuel price there.

Example

Below data is indicative, for demonstration purpose only.

Enter Latitude of location: 13.362281
Enter Longitude of location: 74.875378

Nearest Outlet Customer Code: 11223344 at 13.390869, 74.872886
Petrol Price: 67.07
Diesel price: 60.10

How to Find Latitude & Longitude of a Place on Phone/Computer?

Use Cases

  • Many organisations make payments to vendors with Fuel price as an important component in PO. Price at a particular location can be monitored on daily basis/weekly basis or any other logic, to dynamically include price changes in invoice.
  • Find nearest outlet with lowest price, without having to pay for Maps API.
  • Run this as a Web Service to provide customer convenience on locating outlet and pricing info.

Usage

Execute the cpp file as below: Clone this repository or download all files and place them in a particular folder. Open Terminal and navigate to that folder and run FuelPriceLatLong.cpp

g++ FuelPriceLatLong.cpp
./a.out


Enter Latitude of location: 13.362281
Enter Longitude of location: 74.875378

Nearest Outlet Customer Code: 11223344 at 13.390869, 74.872886
Petrol Price: 67.07
Diesel price: 60.10

Additional Data Files

  1. OutletCsvData.csv: This file has to contain latitude, longitude, Outlet Code of all outlets to be included for search. Indicative sample file is provided in the repository.
  2. RSPData.csv: This file has to contain data on Customer Code, Price of Petrol and Diesel. Indicative sample file is provided in the repository.

Advantages

  • Easily lends to automation and monitoring tools as the response is text and data, rather than GUI
  • Can be blended into Pricing & Invoicing systems
  • Does not require Maps Paid API to locate and display nearest outlet and Rates

Pending Tasks & Future Scope

  • Run this as a Website and provide Fuel Price Finding Service
  • Return results of up to 10 outlets in the increasing order of distance from entered location
  • Include clickable link to plot nearest outlet in the results

About

Get data about fuel prices at any location from this program

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages