0% found this document useful (0 votes)
173 views7 pages

Bus Tracking App for Commuters

Uploaded by

aryan.desai23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
173 views7 pages

Bus Tracking App for Commuters

Uploaded by

aryan.desai23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Bus Tracking and Monitoring System

1st Prof. Dr. Girish Kotwal 2nd Chaitanyaa Deokar 3rd Mandar Deotale
Industrial & Prod. Engg. Department of Engineering of Sciences Department of Engineering of Sciences
Department and Humanities and Humanities
Vishwakarma Institute of Vishwakarma Institute of Vishwakarma Institute of
Technology, Pune Technology, Pune Technology, Pune
Pune, India Pune, India Pune, India
[email protected] [email protected] [email protected]

4th Aryan Desai 5th Purva Daundkar 6th Aftab Desai


Department of Engineering of Sciences Department of Engineering of Sciences Department of Engineering of Sciences
and Humanities and Humanities and Humanities
Vishwakarma Institute of Vishwakarma Institute of Vishwakarma Institute of
Technology, Pune Technology, Pune Technology, Pune
Pune, India Pune, India Pune, India
[email protected] [email protected] [email protected]

7th Samyak Dawale


Department of Engineering of Sciences
and Humanities
Vishwakarma Institute of
Technology, Pune
Pune, India
[email protected]

Abstract — The Bus Tracking and Monitoring App optimization with real-time tracking, this app
is an innovative solution designed to simplify the significantly improves the efficiency and
process of navigating public transportation by convenience of public transit, ultimately leading to a
providing real-time bus location tracking and more streamlined and satisfactory commuting
optimized route planning. This project addresses experience.
common commuter challenges by offering two main
features: route optimization and real-time bus Key Words: Route Optimization, Bus tracking, Real-
tracking. The route optimization feature assists users time bus tracking, Firebase.
in finding the most efficient route between two I. INTRODUCTION:
points, taking into account direct and indirect 1. The Bus Tracking and Monitoring App is
routes, costs, estimated arrival times, and total
designed to simplify the process of navigating
journey duration. The real-time bus tracking feature
utilizes a web application and Firestore database to public transportation by providing commuters
continuously update and display bus locations on an with tools to find the most efficient bus routes
interactive map. This enables commuters to plan and track bus locations in real-time. This project
their journeys effectively and avoid the frustration of aims to address common challenges faced by
waiting for buses that may not arrive on time. By public transit users, offering a more convenient
entering their starting point and destination, users and efficient way to plan journeys.
receive the best route options tailored to their 2. The application offers two primary features:
preferences. They can also access real-time  Route optimization
information on bus locations and estimated arrival
 Real-time bus tracking.
times, empowering them to make informed travel
decisions and avoid unnecessary delays. The app The route optimization feature helps users
aims to enhance the commuting experience by determine the best route between two points by
reducing wait times and improving reliability. considering factors such as direct and indirect
Through its user-friendly interface, the Bus Tracking routes, costs, estimated time of arrival, and
and Monitoring App offers a convenient and efficient overall journey time. The real-time bus tracking
way for commuters to navigate public transportation feature utilizes a web application and Firestore
systems. In conclusion, by integrating route
database to continuously update and display bus
locations on an interactive map interface.
3. By providing real-time information on bus
locations, the app enables commuters to plan
their journeys effectively, avoiding the
frustration of waiting for buses that may not
arrive on schedule. Users simply enter their
starting point and destination, and the app
generates the best route options based on their
preferences. Real-time data on bus locations and
estimated arrival times further enhances the user
experience, allowing for more informed travel
decisions.
4. The Bus tracking and monitoring app
significantly enhances the commuting
experience by reducing wait times and
improving the reliability of public
transportation. By integrating route optimization
with real-time tracking, the app offers a user-
friendly solution that empowers commuters to
navigate public transportation systems more
efficiently, ultimately leading to a more
streamlined and satisfactory travel experience.

II. METHODOLOGY

1. Initialization of StopToRoutes Map: Fig.2 Image of the representation of best route


- Populate the stopToRoutes map to associate from the app
each bus stop with a list of bus routes passing
through it. 3. Representation of Routes:
- Define the RouteOption class to encapsulate
route details, including individual legs (bus
routes), arrival times, total travel time, and cost.

4. Selection of the Best Route:


- Implement the selectBestRoute() method to
iterate through RouteOption objects and select
the best route based on predefined criteria such
as shortest travel time and lowest cost.
Fig.1 StopToRoutes - Populate the stopToRoutes map to associate
each bus stop with a list of bus routes passing
2. Identification of Possible Routes: through it.
- For direct routes check if source and - Identify all possible routes between given
destination stops are present in the same bus source and destination stops.
route - Consider both direct and indirect routes,
-For indirect routes, it will find a common stop checking for stops within the same bus route for
between source and destination and concatenate direct routes and concatenating routes via a
the two routes using that common stop. common stop for indirect routes.
- Define the RouteOption class to encapsulate the Firestore database. It utilizes the following
route details, including individual legs (bus components:
routes), arrival times, total travel time, and cost. 1. Geolocator Package: The geolocator package
- Implement the selectBestRoute() method to is used to obtain the current
iterate through RouteOption objects and select location of the bus driver's device using GPS or
the best route based on predefined criteria such network-based location
as shortest travel time and lowest cost. services.
- Implement the addLeg() method in the 2. Location Updater: The locationUpdater()
RouteOption class to add a leg (bus route) to the function is implemented as a custom action in
RouteOption object, calculating arrival times the driver application. It performs the following
and partial route details. tasks:
- Develop the calculateNextBusTime() method  Creates a reference to a specific document in
to calculate the next available bus time based on the Firestore database, where the bus
the current time and an assumed hourly bus location data will be stored.
schedule.  Sets up a periodic timer that triggers every
- Create the calculateTravelTime() method to 5 seconds.
calculate the travel time between two stops on a  Within the timer callback, it retrieves the
given bus route using the LocalTime class from current location using the
Java 8 for time calculations.  Geolocator.getCurrentPosition() method
This sequence outlines the systematic steps  Converts the obtained location coordinates
involved in implementing route optimization into GeoPoint object,
features and defining essential methods within  which represents a geographic point in the
the RouteOption class for efficient route Firestore database.
representation and selection.  Updates the specific document in Firestore
with the new GeoPoint
 location data using the docRef.set() method.

Fig.3 Login Page

I. Real-time Bus Tracking


The real-time bus tracking feature is
implemented using a combination of a mobile
application for bus drivers, Firebase Firestore
for data storage, and a user-facing mobile
application for displaying bus locations.

Driver Application:
The driver application is responsible for
continuously updating the bus location data in
Fig.4 Displaying location on Google 5. User Authentication: Upon successful OTP
Maps verification, users gain access to the app's
features, ensuring system security and privacy.
This process ensures that only authorized users
User application: access the app, enhancing the overall system
1. Google Maps Integration: The user security.
application seamlessly integrates the Google
Maps SDK to render maps and display markers, Real-Time Bus Tracking: The app combines
ensuring a user-friendly interface. driver location updates with map rendering and
2. Firestore Data Retrieval: The application Firestore integration for seamless bus tracking.
efficiently retrieves bus location data by Passengers view real-time bus locations on their
listening for changes to a specific document in mobile devices, ensuring a smooth experience
Firestore. Upon detection of any change, it for both drivers and passengers.
promptly fetches the updated GeoPoint data.
3. Map Rendering: Utilizing the retrieved In summary, the application actively listens for
GeoPoint data, the application generates a Firestore document changes through the
LatLng object, representing a precise addSnapshotListener method, enabling real-time
geographical point on the map. Subsequently, it updates of bus locations on the map interface.
dynamically updates the map by clearing
previous markers, placing a new marker at the
updated location, and adjusting the camera
position to focus on the latest bus location.

Fig.6 Flowchart

The frontend of the app is developed using


modern web and mobile technologies, including
Fig.5 User Application Android for the bus driver's web application and
Flutter for the user's mobile application.
User Authentication:
Utilizing Firebase Authentication, the app offers IV.IMPLEMENTATION
a secure login process:
1. User Input: Users enter their phone number Map activity: This activity sets up the Google
on the login screen. Maps integration and handles the rendering of
2. Phone Number Validation: The app verifies the bus location on the map.
the phone number for completeness and format FirebaseFirestore: The Firestore instance is used
accuracy. to retrieve the bus location data from the
3. Firebase Authentication:Valid phone numbers Firestore database.
trigger Firebase Authentication, which sends an OnMapReadyCallback: This interface is
OTP via SMS. implemented by the map activity to handle the
4. OTP Verification:Users enter the OTP map's ready state and perform necessary
received on their phone, which Firebase verifies. operations.
The bus driver web application is developed Fig.7 Displaying the Google Maps
using Flutter, a cross-platform framework for
building mobile applications. The backend VI.CONCLUSION
infrastructure is developed using Firebase, a
comprehensive app development platform The primary objective of this work is to
provided by Google. Firestore is a cloud-hosted, significantly enhance the Bus Tracking system
NoSQL document database provided by by integrating essential features that will
Firebase. It is used to store and retrieve the bus improve its functionality and user experience.
location data in real-time. The application These features include projecting accurate bus
creates a specific document in Firestore to store timings to ensure passengers have reliable
the bus location as a GeoPoint object. information on when buses will arrive and
depart, as well as displaying the correct bus
V. RESULTS numbers to avoid any confusion. Additionally,
we aim to incorporate a GPS tracker into the
 Flutter integration with Firebase and system. This will provide real-time, precise
Firestore location data of the buses, allowing users to
 Custom actions for location updating and track their journeys more effectively and make
Firestore data handling informed decisions about their travel plans. This
 Integration with the Google Maps SDK for system would utilize a combination of GPS and
map rendering and marker placement. GSM modules, paired with a high-speed
processor, to offer enhanced monitoring
capabilities. Such a system could be deployed
not only in buses but also in cars and trucks,
showcasing its versatility and wide-ranging
applicability. By implementing these
improvements and future enhancements, the
project aims to provide a robust, reliable, and
user-friendly Bus Tracking system that meets
the needs of modern commuters and contributes
to more efficient transportation management.

VII. FUTURE SCOPE

The primary goal of this project is to enhance


the current Bus Tracking system by introducing
key features such as real-time bus schedule
updates, precise bus number identification, and
the integration of GPS tracking for improved
location accuracy. Additionally, the system can
be extended to private travel agencies to track
their buses efficiently.
In the future, the system can evolve into a
comprehensive vehicle monitoring solution by
incorporating GPS and GSM modules alongside
a high-speed processor. This would make it
suitable for various vehicles, including buses,
cars, and trucks, ensuring broad applicability.
Furthermore, this Android application will
increase the productivity and efficiency of bus
transportation, benefiting both public and 9. Dr. Nookala Venu and Dr.A.Arun Kumar,
private transportation services. Design of Bus Tracking and Fuel Monitoring
System using IoT, High Technology
II. REFERENCES Letters,Volume 29, Issue 10, 2023
10. Google Maps Platform Documentation. (n.d.).
1. Authors ManiniKumbhar, MeghanaSurvase and Retrieved from
Pratibha MAvdhutSalunk, Real Time Web Based https://developers.google.com/maps/documentatio
Bus Tracking System, International Journal of n
Engineering Research and Technology(IJERT), 11. Firebase Documentation. (n.d.). Retrieved
2020 from https://firebase.google.com/docs
2. M. A. Hannan, A. M.Mustapha,A.Hussain and
H.Basri, Intelligent Bus Monitoring and
Management System, World Congress on
Engineering, 2012
3. S. Eken and A. Sayar, "A smart bus tracking
system based on location-aware services and QR
codes," 2014 IEEE International Symposium on
Innovations in Intelligent Systems and
Applications (INISTA) Proceedings, Alberobello,
Italy, 2014, pp. 299-303,
doi:10.1109/INISTA.2014.6873634.
4. R.Maruthi and C.Jayakumari ,SMS based Bus
Tracking System using Open Source
Technologies, International Journal of Computer
Applications, 2014
5. Kushal Gogri , Ankeet Bhanushali , Akshay
Sonawane , Milind Khairnar, 2020, Real Time
Bus Tracking System, INTERNATIONAL
JOURNAL OF ENGINEERING RESEARCH &
TECHNOLOGY (IJERT) Volume 09, Issue 06
(June 2020)
6. Md. Marufi Rahman, Jannatul Robaiat Mou,
Kusum Tara and Md. Ismail Sarkar, Real Time
Google Map and Arduino Based VehicleTracking
System, Institute of Electrical and Electronics
Engineers, 2nd International Conference on
Electrical, Computer & Telecommunication
Engineering(ICECTE), 2016
7. Salava V Satyanarayana; M. Manasa; B.
Vishwanth; V. Akanksha and D.Anil Sai,IOT
Based Bus Tracking and monitoring
system,Institute of Electrical and Electronics
Engineers,3rd International conference on
Artificial Intelligence and Signal Processing
(AISP), 2023.
8. Mona Kumari, Ajitesh Kumar and Arbaz Khan,
IoT Based Intelligent Real-Time System for Bus
Tracking and Monitoring, 2020 International
Conference on Power Electronics & IoT
Applications in Renewable Energy and its Control
(PARC),2020

You might also like