0% found this document useful (0 votes)
20 views86 pages

Ridesharing 1

Download as pdf or txt
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 86

ENHANCED RIDESHARING USING

DIRECTIONS API AND


GEOLOCATION
Mini Project Report

Submitted in partial fulfilment of the requirements for


the award of degree of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
of
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
by

J NAVNEETH KRISHNAN
MAC21CS028

JOHN K JOSEPH
MAC21CS030

JOEL SEBASTIAN
MAC21CS029

Department of Computer Science & Engineering


Mar Athanasius College of Engineering
Kothamangalam, Kerala, India 686 666

JULY 2024
ENHANCED RIDESHARING USING
DIRECTIONS API AND
GEOLOCATION
Mini Project Report

Submitted in partial fulfilment of the requirements for


the award of degree of

BACHELOR OF TECHNOLOGY
in
COMPUTER SCIENCE AND ENGINEERING
of
APJ ABDUL KALAM TECHNOLOGICAL UNIVERSITY
by

J NAVNEETH KRISHNAN
MAC21CS028

JOHN K JOSEPH
MAC21CS030

JOEL SEBASTIAN
MAC21CS029

Department of Computer Science & Engineering


Mar Athanasius College of Engineering
Kothamangalam, Kerala, India 686 666

JULY 2024
DECLARATION

We, undersigned hereby declare that the project report - Enhance Ridesharing
Using Directions API and Geolocation submitted for partial fulfillment of the
requirements for the award of degree of Bachelor of Technology of the APJ Abdul
Kalam Technological University, Kerala is a bonafide work done by us under
supervision of Project coordinator. This submission represents the ideas in our
own words and where ideas or words of others have been included, we have
adequately and accurately cited and referenced the original sources. we also
declare that we have adhered to ethics of academic honesty and integrity and
have not misrepresented or fabricated any data or idea or fact or source in my
submission. We understand that any violation of the above will be a cause for
disciplinary action by the institute or the University and can also evoke penal
action from the sources which have thus not been properly cited or from whom
proper permission has not been obtained. This report has not been previously
formed the basis for the award of any degree, diploma or similar title of any other
University.

Date : 24.04.2024 J Navneeth Krishnan


Kothamangalam John K Joseph
Joel Sebastian

3
DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
MAR ATHANASIUS COLLEGE OF ENGINEERING
KOTHAMANGALAM

CERTIFICATE

[ This is to certify that the report entitled Enhance Ridesharing Using


Directions API and Geolocation submitted by J Navneeth Krishnan
(MAC21CS028), John K Joseph (MAC21CS030), Joel Sebastian
(MAC21CS029), towards partial fulfillment of the requirement for the award
of Degree of Bachelor of Technology in Computer Science and Engineering from
APJ Abdul Kalam Technological University for June 2024 is a bonafide record of
the project carried out by them under our supervision and guidance.

Prof. Asha J George


Project Guide and Coordinator

Internal Examiner External Examiner

Date: Dept. Seal


ACKNOWLEDGEMENT

First and foremost, we sincerely thank the ‘God Almighty’ for his grace for
the successful and timely completion of the project.
We express our sincere gratitude and thanks to Dr. Bos Mathew Jos, Princi-
pal and Prof. Joby George, Head of the Department for providing the necessary
facilities and their encouragement and support.
We owe special thanks to the project coordinator and project guide Prof. Asha
J George for her corrections, suggestions and sincere efforts to co-ordinate the
project under a tight schedule.
We express our sincere thanks to staff members in the Department of Com-
puter Science and Engineering who have taken sincere efforts in guiding and
correcting us in conducting this project.
Finally, we would like to acknowledge the heartfelt efforts, comments, criti-
cisms, co-operation and tremendous support given to us by our dear friends during
the preparation of the project and also during the presentation without which this
work would have been all the more difficult to accomplish.

i
ABSTRACT

In the ever-evolving realm of urban transportation, the fusion of technological


advancements and ubiquitous mobile connectivity has sparked a paradigm shift in
how cities are navigated. This shift has led to innovative approaches in ridesharing
and crowdsourcing, offering promising solutions to tackle traffic congestion, re-
duce emissions, and prioritize travel needs in urban areas. Unlike traditional car-
pooling methods, where arrangements are made in advance, ridesharing in smart
cities operates on real-time matching of drivers and riders, with priority given
to factors such as destination and purpose.This study delves into the intricate
dynamics of ridesharing and crowdsourcing for smart city transportation, inves-
tigating the complex interplay between technology and social factors. Leveraging
technologies such as ESTAM model and geolocation, it explores the foundational
architecture of ridesharing systems, diverse techniques for efficient participant
matching, and the potential of autonomous vehicles in reshaping urban mobil-
ity. Additionally, it considers aspects of security, policy, and pricing strategies to
ensure a seamless and equitable experience for all stakeholders.Drawing insights
from comprehensive case studies and practical implementations, this exploration
highlights the advantages of ridesharing and crowdsourcing, including the reduc-
tion of carbon dioxide emissions and the prioritization of travel needs based on
purpose. It offers guidance for stakeholders navigating the complexities and em-
bracing the transformative potential of these innovative solutions in shaping the
future of urban mobility.

ii
Table of Contents

ACKNOWLEDGEMENT i

ABSTRACT ii

List of Abbreviations v

1 Introduction 1

2 Background 4
2.1 Flutter Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Dart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.3 Firebase . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.4 Directions API . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8

3 Requirement Specification 9
3.1 Methodology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.1.1 User Authentication and Profile Management . . . . . . . 9
3.1.2 Ride Request and Management . . . . . . . . . . . . . . . 9
3.1.3 Driver Matching and Dispatching . . . . . . . . . . . . . . 10
3.1.4 Ride Status Updates and Notifications . . . . . . . . . . . 10
3.1.5 Payment Integration . . . . . . . . . . . . . . . . . . . . . 10
3.1.6 Ratings and Reviews . . . . . . . . . . . . . . . . . . . . . 10
3.1.7 Admin Dashboard and Reporting . . . . . . . . . . . . . . 11
3.1.8 Testing and Quality Assurance . . . . . . . . . . . . . . . 11
3.1.9 Deployment and Maintenance . . . . . . . . . . . . . . . . 11
3.2 System Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.1 Feasibility Study . . . . . . . . . . . . . . . . . . . . . . . 12

iii
3.2.2 Requirements Analysis and Specification . . . . . . . . . . 13
3.3 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . 13
3.4 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . 14
3.5 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14

4 Design and Implementation 15


4.1 Application Flow . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
4.2 Data Flow diagram . . . . . . . . . . . . . . . . . . . . . . . . . 17

5 Results 18

6 Future Scope 30

7 Conclusion 32

8 Appendix 34
8.1 Dataset Description . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.1.1 Preprocessing . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.2 Model Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 34
8.3 Training Process . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.4 Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.5 Deployment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.6 Model Code . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
8.6.1 loginp age.dart 35
8.6.2 homep age.dart 41
8.6.3 onr oute.dart 53
8.6.4 Booking Form Processing . . . . . . . . . . . . . . . . . . 55
8.6.5 selectr ide.dart 70

9 References 77

iv
List of Abbreviations

ESTAM Electric Vehicle

API Application Programming Interface

HTML Hyper Text Markup Language

CSS Cascading Style Sheets

GUI Graphical User Interface

Flask Python Web Framework

Folium Python Library

MySQL Structured Query Language

v
Chapter 1
Introduction

Project Outline:GPS Enhanced Ridesharing System

Introduction

This project focuses on developing a GPS enhanced system for Ridesharing


purposes. The rise of private vehicles in road transportation results in high
expense and pollution .This necessitates the development of robust systems to
reduce such trends. The objective is to create an app that utilizes geolocation
API for providing Ridesharing services. The system’s front end will be
implemented using the Flutter framework, while the back end will be built
using the Firebase framework.

Literature Review

A comprehensive review of existing techniques and approaches for ride


publishing and ride requesting purposes will be conducted. This will include an
overview of ridesharing methods, including the utilization of Directions API, as
well as Geolocation technologies with functions for ridesharing. The review will
also encompass the selection of front-end and back-end technologies to build an
effective and user-friendly system.

1
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Methodology

The project’s methodology will encompass various stages, starting with user
interface and design. Locations of the users will be found using geolocation API
. The optimal path will be found using Dijkstra’s algorithm. Users can interact
with each other using the user interface. The front-end will be designed using
the Flutter framework, and the back-end will be implemented using the
Firebase framework. System design , evaluation, and integration will be
conducted to ensure a seamless workflow.

System Architecture

The system architecture will be outlined, highlighting the components


involved and their interactions. The front-end, built using Flutter, will
communicate with the back-end, implemented with Firebase, to process user
inputs and provide real-time toxicity and sarcasm analysis. The data flow and
processing steps within the system will be described to provide a comprehensive
understanding of the system’s operation.

Implementation

This section will delve into the implementation specifics of the project. It
will cover the data collection process, annotation procedures, and preprocessing
techniques applied to the collected data. The configuration and hyperparameter
tuning of the Bidirectional LSTM and LSTM models will be described, along
with the integration of the GloVe function for sarcasm detection. The front-end
design and functionality implemented using Flutter will also be explained, as
well as the back-end implementation using Python Flask.

Department of CSE, MACE, Kothamangalam 2


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Conclusion and Future work

The project’s conclusions will summarize the achievements and contributions


made in GPS enhanced ridesharing. The potential applications and impact of
the developed system will be discussed, along with suggestions for future
enhancements and research directions. The project aims to contribute to the
creation of sustainable transportation and more effective utilization of fuel and
money.

References

A comprehensive list of references used throughout the project will be


provided.

Department of CSE, MACE, Kothamangalam 3


Chapter 2
Background

2.1 Flutter Web


Flutter Web is a framework developed by Google that enables developers to
build web applications using the same codebase they use for building mobile ap-
plications with Flutter. It combines the power of Flutter’s reactive UI framework
with the flexibility and reach of the web.
One of the significant advantages of Flutter Web is code sharing. Developers
can create a single codebase for both mobile and web applications, reducing
development time and effort. This also means that updates and bug fixes can
be applied to both platforms simultaneously, ensuring consistency and reducing
maintenance overhead.
Flutter Web leverages Dart, a programming language optimized for perfor-
mance. During development, it uses just-in-time (JIT) compilation and can be
compiled to efficient JavaScript code for production. This compilation process
allows Flutter Web applications to achieve near-native performance on the web,
providing smooth animations and fast load times.
The framework provides a rich set of widgets and tools specifically designed
for web development. These widgets offer capabilities such as responsive layouts,
navigation, state management, and network connectivity. Flutter Web seam-
lessly integrates with popular web technologies like JavaScript, HTML, and CSS,
enabling developers to leverage existing web libraries and APIs.
Additionally, Flutter Web benefits from the extensive Flutter ecosystem,
including a vibrant community, a wide range of packages and plugins, and

4
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

comprehensive documentation. This ecosystem provides developers with the


resources and support they need to build complex and feature-rich web
applications. In summary, Flutter Web is a powerful framework that allows
developers to create high- quality web applications using Flutter’s expressive UI
framework and Dart’s performance optimizations. It offers code sharing, a
consistent user experience, near-native performance, and a robust ecosystem,
making it an excellent choice for web development.

2.2 Dart
Dart, developed by Google, is a statically-typed programming language de-
signed for building high-performance applications across platforms. With a fa-
miliar syntax for Java or C++ developers, Dart emphasizes productivity and
scalability. It enables cross-platform development, allowing code sharing between
web applications through Flutter Web, mobile applications with Flutter, and
server-side applications with frameworks like Aqueduct or Angel. This reduces
development time and effort.
Dart’s performance is enhanced by its just-in-time (JIT) compiler for fast
development cycles and ahead-of-time (AOT) compilation for highly performant
production applications. It offers a comprehensive standard library with built-
in support for asynchronous programming, HTTP requests, and more. Dart
also provides useful tools like a package manager, static analyzer, and debugger,
further enhancing the development process.
Developer productivity is prioritized with features like hot reload, instantly
reflecting code changes in the running application. Dart’s clean and concise
syntax contributes to a readable and maintainable codebase. Overall, Dart’s
combination of performance, productivity, and cross-platform capabilities makes
it an excellent choice for building various applications.

Department of CSE, MACE, Kothamangalam 5


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

2.3 Firebase
Firebase is a powerful mobile and web application development platform that
provides a wide range of features and tools for building, deploying, and scaling
applications. Today, it is used by millions of developers worldwide to build high-
quality, user-friendly applications for a variety of platforms and devices. One of
the key features of Firebase is its real-time database, which allows developers to
store and synchronize data across multiple clients and devices in real-time. This
makes it an ideal choice for building collaborative applications, such as chat apps,
multiplayer games, and real-time collaboration tools. The database is built on
top of Google’s Cloud Firestore, which provides a scalable and reliable infrastruc-
ture for storing and accessing data. Another important aspect of Firebase is its
authentication system, which supports a wide range of authentication methods,
including email and password, phone number, Google, Facebook, Twitter, and
GitHub. This allows developers to easily add authentication to their applications,
and provides a seamless user experience for their users.
Firebase also offers a number of other features and tools, such as cloud
storage, hosting, and messaging. Cloud storage allows developers to store and
serve files, such as images and videos, from a centralized location. Hosting
provides a simple and secure way to deploy and host web applications, while
messaging allows developers to send push notifications to users on mobile
devices. In addition to these features, Firebase also provides a number of tools
for monitoring and analyzing application performance, such as Firebase
Crashlytics and Firebase Performance Monitoring. These tools allow developers
to quickly identify and fix issues in their applications, and to optimize their
performance for better user experience. One of the main advantages of Firebase
is its ease of use. It provides a simple and intuitive interface for developers, and
integrates seamlessly with popular development tools and frameworks, such as
Android Studio, Xcode, and Angular. This allows developers to quickly get up
and running with Firebase, and to start building and deploying applications in
no time. Another advantage of Firebase is its scalability. It is built on top of
Google’s powerful infrastructure, which provides a scalable and reliable platform

Department of CSE, MACE, Kothamangalam 6


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

for hosting and running applications. This means that Firebase can easily
handle large amounts of traffic and data, and can scale up or down as needed to
meet the demands of the application. In conclusion, Firebase is a powerful and
versatile mobile and web application development platform that provides a wide
range of features and tools for building, deploying, and scaling applications. Its
real-time database, authentication system, cloud storage, hosting, and
messaging make it an ideal choice for building collaborative and interactive
applications, while its monitoring and analysis tools help developers optimize
their performance and user experience. With its ease of use, scalability, and
integration with popular development tools and frameworks, Firebase is a great
choice for developers looking to build high-quality, user-friendly applications.

2.4 Directions API


The Directions API is a powerful tool provided by various mapping
platforms like Google Maps, Mapbox, and MapQuest, offering developers the
ability to integrate turn-by-turn directions into their applications. This API
allows users to calculate routes between locations for different modes of
transportation such as driving, walking, cycling, and transit. It provides
detailed instructions on how to navigate from one point to another, including
waypoints and route optimization based on factors like travel time, distance,
and number of turns. Each platform’s Directions API offers unique features and
functionalities. For instance, Google Maps Directions API supports multiple
client libraries in Java, Python, Go, and Node.js, making it versatile for
developers using different programming languages. On the other hand, Mapbox
Directions API offers routing profiles like driving, walking, cycling, and driving
with traffic, allowing users to customize their route preferences. Furthermore,
the Directions API from MapQuest provides a simple interface to retrieve
routing information, narrative directions, and route shapes. It includes
functions like Optimized Route, Route Matrix, and Alternate Routes, enabling
users to tailor their route experience based on factors like drive time, drive

Department of CSE, MACE, Kothamangalam 7


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

distance, and the ability to request multiple potential routes between two
locations. In summary, the Directions API is a crucial tool for developers
looking to incorporate navigation and route planning features into their
applications. It offers a wide range of functionalities, including detailed
directions, route optimization, and customization options, making it an essential
component for location-based services and mapping applications.

2.5 Summary
In this chapter the discussion was all about the tech stacks that are used to
design and implement the application. Details of technologies like flutter, dart,
hive, android SDK, emulator have been elaborated.

Department of CSE, MACE, Kothamangalam 8


Chapter 3
Requirement Specification

3.1 Methodology
The overall architecture and design of the GPS enhanced ridesharing system
involve several components and steps. Here’s a description of the typical archi-
tecture and design for such a system:

3.1.1 User Authentication and Profile Management

Implement user authentication using Firebase Authentication or a similar ser-


vice to securely manage user accounts.
Allow users to register, log in, and manage their profiles (e.g., update personal
information, profile picture).

3.1.2 Ride Request and Management

Develop functionality for users to request rides by entering their pickup and
drop-off locations.
Implement real-time location tracking using Geolocator to determine the
user’s current location.
Allow users to view their ride requests and track the status (pending, accepted,
rejected) in real-time.

9
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

3.1.3 Driver Matching and Dispatching

Create a system for matching ride requests with available drivers based on
proximity and other factors.
Notify drivers of incoming ride requests and allow them to accept or reject
requests within a specified time frame.
Provide drivers with navigation assistance to reach the pickup location effi-
ciently.

3.1.4 Ride Status Updates and Notifications

Implement push notifications to update users and drivers on the status of


their ride requests.
Notify users when a driver accepts their ride request and provide estimated
arrival times.
Send notifications to drivers for new ride requests, cancellations, or changes
in the ride status.

3.1.5 Payment Integration

Integrate a payment gateway (e.g., Stripe, PayPal) to facilitate secure trans-


actions for ride payments.
Allow users to add payment methods, view ride fare estimates, and receive
digital receipts for completed rides.

3.1.6 Ratings and Reviews

Enable users and drivers to rate each other and provide feedback after com-
pleting a ride.
Implement a rating system to maintain quality standards and foster trust
within the ridesharing community.

Department of CSE, MACE, Kothamangalam 10


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

3.1.7 Admin Dashboard and Reporting

Create an admin dashboard to monitor ride activity, user feedback, and overall
system performance.
Generate reports on key metrics such as ride volume, driver ratings, and
revenue to analyze trends and make data-driven decisions.

3.1.8 Testing and Quality Assurance

Conduct comprehensive testing of the app’s functionality, including unit tests,


integration tests, and user acceptance testing (UAT).
Ensure the app performs reliably across different devices, screen sizes, and
network conditions.
Address any bugs or issues identified during testing to deliver a seamless user
experience.

3.1.9 Deployment and Maintenance

Deploy the ridesharing app to app stores (e.g., Google Play Store, Apple App
Store) for public access.
Regularly update the app with new features, enhancements, and bug fixes
based on user feedback and market demands.
Provide ongoing maintenance and support to address user inquiries, technical
issues, and platform updates.

3.2 System Analysis


Analysis is an important part of any project; if analysis is not done properly
then the whole project moves in the wrong direction. By conducting an analysis
the developer can get a brief idea of the challenges that they will be facing during
the development of the project. It also provides a schedule for proper project
work. Analysis task divided into 3 areas:

1. Problem Recognition

Department of CSE, MACE, Kothamangalam 11


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

2. Feasibility Study

3. Requirement Analysis

3.2.1 Feasibility Study

The feasibility study of the ridesharing application enhanced by directions API


holds significant importance in determining its viability and potential impact.
This stage involves assessing the system proposal’s workability, its alignment
with organizational goals, and the efficient utilization of resources. The feasibility
study examines five critical aspects:

1. Technical Feasibility: Evaluates the technical feasibility of developing the


software, considering required tools and available resources. The project’s
technical requirements are deemed feasible, with the necessary tools and
resources readily available.

2. Time Feasibility: Assesses whether sufficient time is available to complete


the project within reasonable deadlines. Given our technical expertise and
resource allocation, the allotted timeframe of 2 months is deemed sufficient
for project completion.

3. Operational Feasibility: Analyzes whether users are familiar with the


system interface and if adequate resources are available for system opera-
tion. With an intuitive GUI and necessary resources in place, the opera-
tional feasibility of the system is affirmed.

4. Implementation Feasibility: Examines the basic infrastructure required


for system development, including facilities, guidance, and data availability.
All essential infrastructure elements are present, ensuring implementation
feasibility.

5. Economic Feasibility: Focuses on the total cost incurred for system de-
velopment. The proposed system utilizes cost-effective software resources,
ensuring economic feasibility.

Department of CSE, MACE, Kothamangalam 12


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

3.2.2 Requirements Analysis and Specification

A thorough understanding of software requirements is essential for the suc-


cessful development of the Ridesharing System Enhanced Using Directions API
and Geolocation. This section encompasses the discovery, refinement, and specifi-
cation of software requirements, including functional and non-functional aspects.

3.2.2.1 Functional Requirements

The desired functionality of the Ridesharing System Enhanced Using Direc-


tions API and Geolocation includes:

• Drivers can publish their journey along with necessary information.

• Users can request for a ride after specifying the destination.

• The publisher can select travellers from the request list according to pref-
erences.

3.2.2.2 Non-Functional Requirements

Non-functional requirements focus on quality attributes such as responsive-


ness, usability, security, and accuracy. Key non-functional requirements for the
Ridesharing System Enhanced Using Directions API and Geolocation :

• Availability: The system should remain operational at all times, ensuring


uninterrupted service to users.

• Security: The system should adhere to stringent security standards to pro-


tect user data and transactions.

• Usability: The system should feature an intuitive and user-friendly inter-


face, enhancing user experience and accessibility.

3.3 Software Requirements


The software requirements for the Ridesharing System Enhanced Using Di-
rections API and Geolocation are as follows:

Department of CSE, MACE, Kothamangalam 13


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

• Operating System: Cross-platform compatibility with Android, MacOS,


and Windows.

• Database: Firebase for efficient storage and retrieval of charging station


data.

• Programming Languages: Firebase for backend development, Flutter for


frontend development.

3.4 Hardware Requirements


The hardware requirements for the Ridesharing System Enhanced Using Di-
rections API and Geolocation are as follows:

• Monitor: Minimum requirement of a 13-inch monitor for displaying system


interface and data.

• Processor: Minimum requirement of an Intel Core i3 processor or equiva-


lent for efficient system performance.

3.5 Summary
In this chapter the details of the requirements are specified. All the feasibility
factors are considered in this chapter. Technical, time, operational, economic,
implementation feasibility discussions are also included. The functional and non-
functional requirements of the project are also elaborated.

Department of CSE, MACE, Kothamangalam 14


Chapter 4
Design and Implementation

This chapter discusses the architecture of our proposed Ridesharing System


Enhanced Using Directions API and Geolocation. Users can interact via a user-
friendly app interface, dynamically managing carpooling based on real-time traffic
data. The system aims to enhance economic feasability, promote less traffic, and
support sustainable urban mobility management.

4.1 Application Flow

15
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 4.1: Enter Caption

Figure 4.2: Use Case Diagram

Department of CSE, MACE, Kothamangalam 16


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

4.2 Data Flow diagram

Figure 4.3: Data Flow Diagram

Department of CSE, MACE, Kothamangalam 17


Chapter 5
Results

18
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.1

Department of CSE, MACE, Kothamangalam 19


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.2

Department of CSE, MACE, Kothamangalam 20


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.3

Department of CSE, MACE, Kothamangalam 21


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.4

Department of CSE, MACE, Kothamangalam 22


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.5

Department of CSE, MACE, Kothamangalam 23


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.6

Department of CSE, MACE, Kothamangalam 24


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.7

Department of CSE, MACE, Kothamangalam 25


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.8

Department of CSE, MACE, Kothamangalam 26


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.9

Department of CSE, MACE, Kothamangalam 27


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.10: Enter Caption

Department of CSE, MACE, Kothamangalam 28


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Figure 5.11

Department of CSE, MACE, Kothamangalam 29


Chapter 6
Future Scope

The future of ridesharing apps is promising, with the industry expected to


grow significantly in the coming years. The convenience and affordability of
ridesharing apps have made them a popular choice for millions of people around
the world, and this trend is set to continue as more and more people opt for these
services over car ownership. One of the key drivers of growth in the ridesharing
industry is the increasing traffic congestion in cities. Ridesharing apps provide
a convenient and efficient way to get around, especially in urban settings where
parking can be difficult to find. They also offer a cost-effective alternative to taxis
and rental cars, making them an attractive option for travelers and commuters.
The rise of ridesharing apps has also had a significant impact on traditional taxi
services, with many taxi companies struggling to compete with the convenience
and affordability of ridesharing apps. To stay competitive, taxi companies are
being forced to innovate and offer new features and services to their customers.
Another trend that is set to shape the future of ridesharing apps is the rise of
autonomous vehicles. Autonomous vehicles have the potential to revolutionize
the ridesharing industry, providing a safer, more efficient, and more cost-effective
way to get around. Companies like Uber and Lyft are already investing heavily in
autonomous vehicle technology, and it is only a matter of time before autonomous
vehicles become a common sight on our roads. In terms of safety, ridesharing apps
are leading the way in innovation through the use of IoT technology. By using
location sensors and other IoT devices, ridesharing companies are able to ensure
that the right person is getting into the right vehicle, and that any potential
problems can be addressed quickly and efficiently. To stay competitive in the

30
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

ridesharing market, it is essential to offer a wide range of features and services


that meet the needs and preferences of passengers. This includes the ability to
schedule trips in advance or whenever needed, real-time tracking, in-app options
to share ride status with family and friends, and integration with emergency ser-
vices providers In summary, the future scope of geolocation enhanced ride sharing
methods and related techniques is vast. Advancements in fine-grained analysis,
contextual understanding, multimodal analysis, transfer learning, customization,
real-time monitoring, privacy and ethics, multilingual support, and collabora-
tive filtering will contribute to more effective and adaptive analyzers, fostering
healthier online environments and enabling proactive interventions.

Department of CSE, MACE, Kothamangalam 31


Chapter 7
Conclusion

In conclusion the ridesharing app project has been a challenging and rewarding
experience, resulting in a robust and user-friendly application that addresses the
needs of passengers and drivers. The app’s development focused on overcoming
key challenges, including technology stack selection, user safety, mapping service
integration, user experience design, competition, and regulatory compliance. The
technology stack was carefully chosen, considering the development time, budget,
and desired app performance. The app was developed using a cross-platform de-
velopment approach, which allowed for code reusability across multiple platforms
and a seamless user experience. User safety was prioritized by implementing
features like emergency buttons, real-time tracking, driver identity verification,
extensive background checks, and driver training. These features build trust with
users and ensure a secure and reliable service. The mapping service integration
was critical for accurate location data, route optimization, and navigation fea-
tures. A reliable mapping service was selected, offering cost-effective payment
plans to manage expenses related to GPS tracking and data. User experience de-
sign was a significant focus, with a simple, attractive, and intuitive user interface
that emphasizes simplicity, ease of use, and clear communication. This approach
ensures a seamless user experience for both passengers and drivers. To address
competition and market penetration, strategies were developed to differentiate
the app, provide unique features, and offer competitive pricing. These strategies
aim to stand out in the market and attract a user base. Regulatory compliance
was ensured by adhering to local regulations and transportation laws, licensing,
insurance, and data privacy requirements. This approach ensures that the app

32
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

operates legally and maintains trust with users. In conclusion, the ridesharing
app project has been successful in addressing the key challenges of ridesharing
app development. The app offers a safe, efficient, and user-friendly experience
for both passengers and drivers. The project’s success is a testament to the
team’s dedication and expertise in creating a robust and innovative solution that
addresses the needs of the ridesharing industry.

Department of CSE, MACE, Kothamangalam 33


Chapter 8
Appendix

8.1 Dataset Description


The dataset used for training and evaluating the Charging Station Locator
consists of a collection of location data for charging stations, categorized by avail-
ability and operational status. The dataset was obtained from various sources,
including government databases, electric vehicle charging networks, and user-
contributed data. Each charging station entry is labeled with its geographical
coordinates, availability status, and operational details for supervised learning.

8.1.1 Preprocessing

Before training the model, the dataset underwent several preprocessing steps,
including:

• Data Cleaning: Removing duplicate entries and erroneous data points.

• Geolocation Parsing: Parsing and extracting geographical coordinates from


location data.

• Labeling: Categorizing charging stations based on availability and opera-


tional status.

8.2 Model Architecture


The Charging Station Locator utilizes a combination of HTML, CSS,
JavaScript, Python, and MySQL for its architecture. HTML and CSS are used

34
ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

for frontend development, while JavaScript enhances interactivity. Python Flask


is employed for backend development, handling data processing and interactions
with the MySQL database. The Folium API is integrated to provide relatime
ride matching.

8.3 Training Process


As the Charging Station Locator does not rely on traditional machine learning
models, there is no explicit training process. However, data processing and model
refinement are ongoing tasks to ensure accurate and up-to-date charging station
information.

8.4 Evaluation Metrics


As the focus of the Charging Station Locator is on usability and accuracy of
location data, evaluation metrics such as map interactivity, accuracy of charging
station locations, and responsiveness of the application are considered.

8.5 Deployment
The Charging Station Locator can be deployed as a web application, accessible
through web browsers on desktop and mobile devices. It can be integrated into
electric vehicle manufacturer websites, navigation systems, and mobile apps to
provide users with real-time information on charging station locations and avail-
ability. Additionally, the system can be scaled to support larger user bases and
expanded to include additional features such as route planning and reservation
functionalities.

8.6 Model Code

8.6.1 loginp age.dart

import ’package:flutter/material.dart’;

Department of CSE, MACE, Kothamangalam 35


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

import ’package:nimbus_v2/home.dart’;
import ’package:nimbus_v2/phone_number.dart’;
import ’package:nimbus_v2/signup_page.dart’;
import ’package:firebase_auth/firebase_auth.dart’; // Import FirebaseAuth for Fir
import ’package:cloud_firestore/cloud_firestore.dart’; // Import FirebaseFirestor

class LoginPageState2 extends StatefulWidget {


@override
_LoginPageState2State createState() => _LoginPageState2State();
}

class _LoginPageState2State extends State<LoginPageState2> {


final GlobalKey<FormState> _formKey = GlobalKey<FormState>();
bool _otpSent = false;

String _email = ’’; // Store email input


String _password = ’’; // Store password input

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
title: Text(’Enter your Credentials’, style: TextStyle(color: Colors.whit
backgroundColor: Colors.black,
),
body: SingleChildScrollView(
child: Container(
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(’assets/background.jpeg’),
fit: BoxFit.cover,

Department of CSE, MACE, Kothamangalam 36


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

),
),
child: Padding(
padding: const EdgeInsets.all(20.0),
child: Form(
key: _formKey,
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
TextFormField(
style: TextStyle(color: Colors.white),
decoration: InputDecoration(
border: UnderlineInputBorder(),
labelText: ’Email’,labelStyle: TextStyle(color: Colors.whit
),
validator: (value) {
if (value == null || value.isEmpty) {
return ’Please enter your email’;
}
return null;
},
onChanged: (value) => _email = value,
),
SizedBox(height: 20),
TextFormField(
style: TextStyle(color: Colors.white),
obscureText: true,
decoration: InputDecoration(
border: UnderlineInputBorder(),
labelText: ’Password’,labelStyle: TextStyle(color: Colors.w
),
validator: (value) {

Department of CSE, MACE, Kothamangalam 37


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

if (value == null || value.isEmpty) {


return ’Please enter your password’;
}
return null;
},
onChanged: (value) => _password = value,
),
SizedBox(height: 45),
ElevatedButton(
onPressed: _handleLogin,
child: Text(’Login’),
),
SizedBox(height: 20),
TextButton(
onPressed: () {
// Navigate to phone number login page
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => LoginPage()));
},
child: Text(
’Login with phone number instead’,
style: TextStyle(color: Colors.white),
),
),
SizedBox(height: 20),
TextButton(
onPressed: () {
// Navigate to sign up page
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => SignUpPage()));
},
child: Text(

Department of CSE, MACE, Kothamangalam 38


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

’Don\’t have an account? Sign Up’,


style: TextStyle(color: Colors.white),
),
),
if (_otpSent)
Padding(
padding: const EdgeInsets.symmetric(vertical: 10),
child: Text(
’Login Successful!’,
textAlign: TextAlign.center,
style: TextStyle(fontSize: 16, color: Colors.green),
),
),
],
),
),
),
),
),
);
}

// Function to handle login button pressed


Future<void> _handleLogin() async {
// Validate the form
if (_formKey.currentState!.validate()) {
// Set _otpSent to true to display the message
setState(() {
_otpSent = true;
});

// Implement login logic using Firebase

Department of CSE, MACE, Kothamangalam 39


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

try {
// Sign in with email and password
UserCredential userCredential = await FirebaseAuth.instance.signInWithEma
email: _email,
password: _password,
);

// Navigate to home page with display name


Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => StreamBuilder<DocumentSnapshot>(
stream: FirebaseFirestore.instance.collection(’users’).doc(userCred
builder: (context, snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator();
} else if (snapshot.hasError) {
return Text(’Error: ${snapshot.error}’);
} else {
var data = snapshot.data!.data() as Map<String, dynamic>;
String userName = data[’name’];
return HomePage(userName: userName);
}
},
),
),
);
} catch (e) {
print("Failed to sign in: $e");
// Handle login failure
}
}
}

Department of CSE, MACE, Kothamangalam 40


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

8.6.2 homep age.dart

import ’dart:async’;
import ’dart:math’ as math;

import ’package:cloud_firestore/cloud_firestore.dart’;
import ’package:flutter/material.dart’;
import ’package:geocoding/geocoding.dart’;
import ’package:google_maps_flutter/google_maps_flutter.dart’;
import ’package:geolocator/geolocator.dart’;
import ’package:nimbus_v2/ride_publish_animation.dart’;
import ’package:nimbus_v2/ride_select.dart’;
import ’package:nimbus_v2/settings.dart’;

class HomePage extends StatefulWidget {


final String userName;

const HomePage({Key? key, required this.userName}) : super(key: key);

@override
_HomePageState createState() => _HomePageState();
}

class _HomePageState extends State<HomePage> {


String _selectedOption = ’Ride Hire’;
String _fromLocation = ’’;
String _toLocation = ’’;
String _selectedRoute = ’’;
List<String> _routes = [];
Completer<GoogleMapController> _controller = Completer();
Set<Marker> _markers = {};

Department of CSE, MACE, Kothamangalam 41


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Set<Polyline> _polylines = {};


LatLng _currentPosition = LatLng(0, 0); // Variable to store current device loc

@override
void initState() {
super.initState();
_checkPermissionAndFetchLocation();
}

Future<void> _checkPermissionAndFetchLocation() async {


LocationPermission permission = await Geolocator.checkPermission();
if (permission == LocationPermission.denied) {
permission = await Geolocator.requestPermission();
}

if (permission == LocationPermission.whileInUse || permission == LocationPerm


bool serviceEnabled = await Geolocator.isLocationServiceEnabled();
if (!serviceEnabled) {
bool serviceEnabled = await Geolocator.openLocationSettings();
if (!serviceEnabled) {
return; // Location service is not enabled, handle accordingly
}
}

_getCurrentLocation();
} else {
// Location permission denied, handle accordingly
}
}

@override
Widget build(BuildContext context) {

Department of CSE, MACE, Kothamangalam 42


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

return Scaffold(
appBar: AppBar(
title: Text(’Nimbus’, style: TextStyle(color: Colors.black)),
backgroundColor: Colors.white,
actions: [
IconButton(
icon: Icon(Icons.lightbulb_outline,color: Colors.black),
onPressed: () {},
),
IconButton(
icon: Icon(Icons.account_circle,color: Colors.black),
onPressed: () {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SettingsPage(userName: widget.userName)))
},
),
],
),
body:
SingleChildScrollView(
child: Container(
color: Colors.black,
padding: const EdgeInsets.all(20.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
’Welcome, ${widget.userName}!’,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold,color:

Department of CSE, MACE, Kothamangalam 43


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

),
SizedBox(height: 10),
Text(
’Select Ride Option’,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold,color:
),
SizedBox(height: 10),
DropdownButtonFormField(
value: _selectedOption,
items: [’Ride Publish’, ’Ride Hire’]
.map((option) => DropdownMenuItem(
child: Text(option,style: TextStyle(color: Colors.white)),
value: option,
))
.toList(),
onChanged: (value) {
setState(() {
_selectedOption = value.toString();
_routes = [];
_selectedRoute = ’’;
});
},
dropdownColor: Colors.black,
),
SizedBox(height: 20),
TextFormField(
style: TextStyle(color: Colors.white),
decoration: InputDecoration(
labelText: ’From’,
border: UnderlineInputBorder()
),
onChanged: (value) {

Department of CSE, MACE, Kothamangalam 44


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

setState(() {
_fromLocation = value;
_buildMarkers();
_updateRoute();
});
},
controller:
TextEditingController(text: _fromLocation), // Update text field
),
SizedBox(height: 10),
TextFormField(
style: TextStyle(color: Colors.white),
decoration: InputDecoration(
labelText: ’To’,
border: UnderlineInputBorder()
),
onChanged: (value) {
setState(() {
_toLocation = value;
_buildMarkers();
_updateRoute();
});
},
),
SizedBox(height: 20),
if (_selectedRoute.isNotEmpty)
// Display distance if route is available
Padding(
padding: const EdgeInsets.symmetric(vertical: 8.0),
child: Text(
’Distance: $_selectedRoute km’,
style: TextStyle(fontSize: 16, fontWeight: FontWeight.bold,co

Department of CSE, MACE, Kothamangalam 45


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

),
),
SizedBox(
height: 300, // Adjust height as needed
child: GoogleMap(
mapType: MapType.normal,
initialCameraPosition: CameraPosition(
target: _currentPosition, // Set initial position to current
zoom: 10,
),
markers: _markers,
polylines: _polylines,
onMapCreated: (GoogleMapController controller) {
_controller.complete(controller);
},
),
),
SizedBox(height: 20),
ElevatedButton(
style: ButtonStyle(backgroundColor: MaterialStatePropertyAll(Colo
onPressed: () {
if (_selectedOption == ’Ride Publish’) {
_publishRide();
} else {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SelectDriverPage(
fromLocation: _fromLocation,
toLocation: _toLocation,
userName: widget.userName,
),

Department of CSE, MACE, Kothamangalam 46


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

),
);
}
},
child: Text(_selectedOption == ’Ride Publish’ ? ’Publish Ride’ :
),
],
),
),
),
);
}

Future<void> _buildMarkers() async {


if (_fromLocation.isNotEmpty && _toLocation.isNotEmpty) {
// Use _currentPosition as from location
LatLng fromLatLng = _currentPosition;

List<Location> locations = await Future.wait([


_getLocationFromAddress(_fromLocation),
_getLocationFromAddress(_toLocation),
]);

double minLat = fromLatLng.latitude;


double minLng = fromLatLng.longitude;
double maxLat = fromLatLng.latitude;
double maxLng = fromLatLng.longitude;

Set<Marker> markers = {};

for (int i = 0; i < locations.length; i++) {


Location location = locations[i];

Department of CSE, MACE, Kothamangalam 47


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

markers.add(
Marker(
markerId: MarkerId(i.toString()),
position: LatLng(location.latitude!, location.longitude!),
infoWindow: InfoWindow(title: i == 0 ? ’From Location’ : ’To Location
),
);
minLat = math.min(minLat, location.latitude!);
minLng = math.min(minLng, location.longitude!);
maxLat = math.max(maxLat, location.latitude!);
maxLng = math.max(maxLng, location.longitude!);
}

LatLngBounds bounds = LatLngBounds(


southwest: LatLng(minLat, minLng),
northeast: LatLng(maxLat, maxLng),
);

GoogleMapController controller = await _controller.future;


controller.animateCamera(CameraUpdate.newLatLngBounds(bounds, 100));

setState(() {
_markers = markers;
});
}
}

void _publishRide() async {


if (_fromLocation.isNotEmpty && _toLocation.isNotEmpty) {
// Calculate and display distance using Vincenty’s formula
await _calculateDistanceAndSetState(_fromLocation, _toLocation);

Department of CSE, MACE, Kothamangalam 48


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

// Geocode the from and to locations


List<Location> fromLocations = await locationFromAddress(_fromLocation);
List<Location> toLocations = await locationFromAddress(_toLocation);

// Check if geocoding was successful


if (fromLocations.isNotEmpty && toLocations.isNotEmpty) {
// Get the first location result for both from and to locations
Location fromLocation = fromLocations[0];
Location toLocation = toLocations[0];

// Store the distance in the Firestore document


FirebaseFirestore.instance.collection(’rides’).add({
’driverId’: widget.userName,
’fromLocation’: _fromLocation,
’toLocation’: _toLocation,
’status’: ’published’,
’distance’: double.parse(_selectedRoute), // Store the distance in the
}).then((value) {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => RidePublishedAnimationPage(
fromLocation: _fromLocation,
toLocation: _toLocation,
userName: widget.userName,
),
),
);
}).catchError((error) {
print(’Failed to publish ride: $error’);
// Handle error
});

Department of CSE, MACE, Kothamangalam 49


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

FirebaseFirestore.instance.collection(’ride_publish’).add({
’driverId’: widget.userName,
’fromLocation’: _fromLocation,
’toLocation’: _toLocation,
’status’: ’published’,
’distance’: double.parse(_selectedRoute), // Store the distance in the
});
}
}
}

Future<Location> _getLocationFromAddress(String address) async {


List<Location> locations = await locationFromAddress(address);
return locations.isNotEmpty ? locations[0] : Location(latitude: 0, longitude:
}

void _updateRoute() {
if (_fromLocation.isNotEmpty && _toLocation.isNotEmpty) {
// Calculate and display distance using Vincenty’s formula
_calculateDistanceAndSetState(_fromLocation, _toLocation);
}
}

Future<void> _calculateDistanceAndSetState(String fromLocation, String toLocati


// Geocode the from and to locations
List<Location> fromLocations = await locationFromAddress(fromLocation);
List<Location> toLocations = await locationFromAddress(toLocation);

// Check if geocoding was successful


if (fromLocations.isNotEmpty && toLocations.isNotEmpty) {
// Get the first location result for both from and to locations

Department of CSE, MACE, Kothamangalam 50


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Location fromLoc = fromLocations[0];


Location toLoc = toLocations[0];

// Calculate distance using Vincenty’s formula


double distance = DistanceCalculator.calculateDistance(
fromLoc.latitude!,
fromLoc.longitude!,
toLoc.latitude!,
toLoc.longitude!,
);

setState(() {
_selectedRoute = distance.toStringAsFixed(2); // Display distance with tw
});
} else {
// Handle case when geocoding fails
setState(() {
_selectedRoute = ’Geocoding failed’;
});
}
}

void _getCurrentLocation() async {


Position position = await Geolocator.getCurrentPosition(desiredAccuracy: Loca
setState(() {
_currentPosition = LatLng(position.latitude, position.longitude);
_getLocalityFromCoordinates(position.latitude, position.longitude);
});
}

void _getLocalityFromCoordinates(double latitude, double longitude) async {


List<Placemark> placemarks = await placemarkFromCoordinates(latitude, longitu

Department of CSE, MACE, Kothamangalam 51


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

if (placemarks.isNotEmpty) {
Placemark placemark = placemarks.first;
setState(() {
_fromLocation = placemark.locality ?? ’Unknown Locality’;
});
} else {
setState(() {
_fromLocation = ’Unknown Locality’;
});
}
}
}

class DistanceCalculator {
static double calculateDistance(double startLat, double startLng, double endLat
const double earthRadius = 6371.0; // Earth’s radius in kilometers

// Convert degrees to radians


double latDiffRad = _degreesToRadians(endLat - startLat);
double lngDiffRad = _degreesToRadians(endLng - startLng);
double startLatRad = _degreesToRadians(startLat);
double endLatRad = _degreesToRadians(endLat);

// Vincenty’s formula for distance calculation


double a = math.pow(math.sin(latDiffRad / 2), 2) +
math.cos(startLatRad) * math.cos(endLatRad) * math.pow(math.sin(lngDiffRa
double c = 2 * math.atan2(math.sqrt(a), math.sqrt(1 - a));
double distance = earthRadius * c;

return distance;
}

Department of CSE, MACE, Kothamangalam 52


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

static double _degreesToRadians(double degrees) {


return degrees * (math.pi / 180);
}
}

void main() {
runApp(MaterialApp(
home: HomePage(userName: ’John Doe’),
theme: ThemeData(
scaffoldBackgroundColor: Colors.black,
),
));
}

8.6.3 onr oute.dart

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-
scale=1.0">
<link rel="stylesheet" href="/static/user/user-login-
dashboard.css">
href="https://stackpath.bootstrapcdn.com/font-
awesome/4.7.0/css/font-awesome.min.css">
<title>user-login dashboard</title>
<script src="https://code.jquery.com/jquery-3.6.0.min.js">
" crossorigin="anonymous"></script>

</head>

Department of CSE, MACE, Kothamangalam 53


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

<header>
<a href="{{ url_for(’home’) }}" class="logo"> <img
src="/static/pic/logo.png" alt="logo"> </a>
<nav>
<ul>
<li><a href="{{ url_for(’home’) }}">Home</a></li>
<li><a href="{{ url_for(’user_find_your_charger’)
}}">Find your charger</a></li>
<li><a href="{{ url_for(’about’) }}">About</a></li>
<li><a href="{{ url_for(’contact_us’) }}">Contact
us</a></li>
</ul>
</nav>

</header>

<body>

<!-- BODY SECTION -->

<div class="d-flex toggled" id="wrapper">

<!-- Sidebar -->


<div class="bg-light border-right" id="sidebar-wrapper">
<div class="text-right">
<button class="sidebar-toggler" id="sidebar-toggle-
onSidebar">
<span class="icon-bar top-bar"></span>
<span class="icon-bar middle-bar"></span>

</button>

Department of CSE, MACE, Kothamangalam 54


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

</div>

<div class="list-group list-group-flush">


<a href="/user-dashboard" class="list-group-item list-
group-item-action bg-light">Dashboard</a>
<a href="/user-profile" class="list-group-item list-
group-item-action bg-light">Profile</a>
<a href="{{ url_for(’user_find_your_charger’) }}"
class="list-group-item list-group-item-action bg-
light">book anew slot</a>
<a href="{{ url_for(’contact_us’) }}" class="list-group-
item list-group-item-action bg-light">contact us</a>
<a href="/logout" class="list-group-item list-group-
item-action bg-light">logout</a>

</div>
</div>

8.6.4 Booking Form Processing

import ’package:flutter/material.dart’;
import ’package:google_maps_flutter/google_maps_flutter.dart’;
import ’package:cloud_firestore/cloud_firestore.dart’;
import ’package:url_launcher/url_launcher.dart’;
import ’package:geocoding/geocoding.dart’;

import ’home.dart’;

class RideRequestWidget extends StatefulWidget {


final String requestId;
final String name;
final String pickupLocation;

Department of CSE, MACE, Kothamangalam 55


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

final String dropoffLocation;


final String fare;
final String userName;
final bool rideAccepted;
final Function() onAccept;
final Function() onCancel;
final bool isMarkerVisible; // Added property to track marker visibility
final Function() onToggleMarker; // Added function to toggle marker visibility

RideRequestWidget({
required this.requestId,
required this.name,
required this.pickupLocation,
required this.dropoffLocation,
required this.fare,
required this.userName,
required this.rideAccepted,
required this.onAccept,
required this.onCancel,
required this.isMarkerVisible, // Initialize with isMarkerVisible
required this.onToggleMarker, // Pass onToggleMarker function
});

@override
_RideRequestWidgetState createState() => _RideRequestWidgetState();
}

class _RideRequestWidgetState extends State<RideRequestWidget> {


@override
Widget build(BuildContext context) {
return Card(
elevation: 2.0,

Department of CSE, MACE, Kothamangalam 56


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

margin: EdgeInsets.symmetric(vertical: 8.0),


child: ExpansionTile(
title: Text(
’Name: ${widget.name}’,
style: TextStyle(fontWeight: FontWeight.bold),
),
childrenPadding: EdgeInsets.all(16.0),
children: [
Text(’Pickup Location: ${widget.pickupLocation}’),
Text(’Dropoff Location: ${widget.dropoffLocation}’),
Text(’Fare: ${widget.fare}’),
SizedBox(height: 8.0),
Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
onPressed: widget.rideAccepted ? null : widget.onAccept,
child: Text(widget.rideAccepted ? ’Accepted’ : ’Accept’, style: T
style: ElevatedButton.styleFrom(
primary: widget.rideAccepted ? Colors.green : null,
),
),
ElevatedButton(
onPressed: widget.onCancel,
child: Text(’Cancel Ride’, style: TextStyle(color: Colors.red)),
style: ElevatedButton.styleFrom(
// primary: Colors.red,
),
),
ElevatedButton(
onPressed: () {
FirebaseFirestore.instance

Department of CSE, MACE, Kothamangalam 57


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

.collection(’users’)
.where(’name’, isEqualTo: widget.userName)
.get()
.then((querySnapshot) {
if (querySnapshot.docs.isNotEmpty) {
final userData = querySnapshot.docs.first.data();
final phoneNumber = userData[’phoneNumber’];
if (phoneNumber != null) {
print(’Phone number: $phoneNumber’);
// Launch caller app with the phone number
launch(’tel:$phoneNumber’);
} else {
print(’Phone number not found for user: ${widget.userName
}
} else {
print(’User document not found for username: ${widget.userN
}
}).catchError((error) {
print(’Error retrieving phone number: $error’);
});
},
child: Icon(Icons.phone),
),
],
),
SizedBox(height: 8.0),
ElevatedButton(
onPressed: widget.onToggleMarker, // Use onToggleMarker function to t
child: Text(widget.isMarkerVisible ? ’Hide Marker’ : ’Locate Marker’)
),
],
),

Department of CSE, MACE, Kothamangalam 58


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

);
}
}

class OnRoutePage extends StatefulWidget {


final LatLng fromLocation;
final LatLng toLocation;
final String userName;
final Function(LatLng) onRideAccepted; // Modified to pass driverLocation

OnRoutePage({required this.fromLocation, required this.toLocation, required thi

@override
_OnRoutePageState createState() => _OnRoutePageState();
}

class _OnRoutePageState extends State<OnRoutePage> {


LatLng? driverLocation; // Added to store the driver’s location
LatLng? userLocation;
Map<String, bool> _markerVisibility = {};// Added map to track marker visibilit

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
backgroundColor: Colors.white,
title: Text(’On Route’),
),
body: Column(
children: [
Expanded(

Department of CSE, MACE, Kothamangalam 59


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

child: GoogleMap(
initialCameraPosition: CameraPosition(
target: widget.fromLocation,
zoom: 14.0,
),
mapType: MapType.normal,
markers: _buildMarkers(),
onTap: (_) {
// Hide markers when the map is tapped
_hideAllMarkers();
},
),
),
Container(
padding: EdgeInsets.all(16.0),
child: Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
Text(
’Ride Requests’,
style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold,colo
),
SizedBox(height: 10),
StreamBuilder(
stream: FirebaseFirestore.instance.collection(’requests’).where
builder: (context, AsyncSnapshot<QuerySnapshot> snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return CircularProgressIndicator();
} else if (snapshot.hasError) {
return Text(’Error: ${snapshot.error}’);
} else {
final requests = snapshot.data!.docs;

Department of CSE, MACE, Kothamangalam 60


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

return Column(
children: requests.map((request) {
final requestId = request.id;
final name = request[’driverName’];
final pickupLocation = request[’fromLocation’];
final dropoffLocation = request[’toLocation’];
final fare = ’’;

return RideRequestWidget(
requestId: requestId,
name: name,
pickupLocation: pickupLocation,
dropoffLocation: dropoffLocation,
fare: fare,
userName: widget.userName,
rideAccepted: request[’status’] == ’accepted’,
isMarkerVisible: _markerVisibility[requestId] ?? fals
onAccept: () {
FirebaseFirestore.instance.collection(’requests’).d
// Retrieve driver’s location and pass it to the
FirebaseFirestore.instance.collection(’drivers’).
final driverLat = docSnapshot[’latitude’];
final driverLng = docSnapshot[’longitude’];
final driverLocation = LatLng(driverLat, driver
widget.onRideAccepted(driverLocation); // Pass
}).catchError((error) {
print(’Error retrieving driver location: $error
});
}).catchError((error) {
print(’Error accepting ride request: $error’);
// Handle error accordingly
});

Department of CSE, MACE, Kothamangalam 61


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

},
onCancel: () {
FirebaseFirestore.instance.collection(’requests’).d
},
onToggleMarker: () {
_toggleMarkerVisibility(requestId); // Call _toggle
},
);
}).toList(),
);
}
},
),
],
),
),
Container(
padding: EdgeInsets.all(16.0),
child: ElevatedButton(
onPressed: _abandonRide,
child: Text(’Abandon Ride’),
),
),
SizedBox(height: 16), // Add some spacing
ElevatedButton(
onPressed: () {
// Navigate to the CompleteRidePage
Navigator.push(
context,
MaterialPageRoute(builder: (context) => CompleteRidePage()),
);
},

Department of CSE, MACE, Kothamangalam 62


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

child: Text(’Complete Ride’),


),
],
),
);
}

Set<Marker> _buildMarkers() {
Set<Marker> markers = {};

// Add markers for fromLocation and toLocation


markers.add(
Marker(
markerId: MarkerId(’from’),
position: widget.fromLocation,
infoWindow: InfoWindow(title: ’From Location’),
),
);
markers.add(
Marker(
markerId: MarkerId(’to’),
position: widget.toLocation,
infoWindow: InfoWindow(title: ’To Location’),
),
);

// Add markers for each request’s pickup and dropoff locations


_markerVisibility.forEach((requestId, visible) {
if (visible) {
markers.add(_markers[requestId]![’pickup’]!);
markers.add(_markers[requestId]![’dropoff’]!);
}

Department of CSE, MACE, Kothamangalam 63


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

});

return markers;
}

void _abandonRide() {
// Delete the ride entry from Firestore
FirebaseFirestore.instance
.collection(’rides’)
.where(’driverId’, isEqualTo: widget.userName)
.get()
.then((querySnapshot) {
querySnapshot.docs.forEach((doc) {
doc.reference.delete();
});
}).then((_) {
// Navigation logic after abandoning the ride
Navigator.of(context).pushReplacement(MaterialPageRoute(
builder: (context) => HomePage(userName: widget.userName),
)); // Navigate back to the previous page
}).catchError((error) {
print(’Error abandoning ride: $error’);
// Handle error accordingly
});
FirebaseFirestore.instance.collection(’rides’).where(’driverId’, isEqualTo: w
querySnapshot.docs.forEach((doc) {});
});
}

void _toggleMarkerVisibility(String requestId) {


setState(() {
_markerVisibility[requestId] = !_markerVisibility[requestId]!;

Department of CSE, MACE, Kothamangalam 64


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

});

if (_markerVisibility[requestId]!) {
_showMarkersForRequest(requestId);
} else {
_hideMarkersForRequest(requestId);
}
}

void _showMarkersForRequest(String requestId) {


// Retrieve pickup and dropoff locations from Firestore
FirebaseFirestore.instance.collection(’requests’).doc(requestId).get().then((
final pickupLocation = doc[’fromLocation’];
final dropoffLocation = doc[’toLocation’];

// Convert pickup and dropoff locations to LatLng coordinates


// You need to implement the logic to convert addresses to coordinates
convertAddressToLatLng(pickupLocation).then((pickupLatLng) {
convertAddressToLatLng(dropoffLocation).then((dropoffLatLng) {
// Add markers for pickup and dropoff locations
setState(() {
_markers[requestId] = {
’pickup’: Marker(markerId: MarkerId(’pickup-$requestId’), position:
’dropoff’: Marker(markerId: MarkerId(’dropoff-$requestId’), positio
};
});
});
});
});
}

void _hideMarkersForRequest(String requestId) {

Department of CSE, MACE, Kothamangalam 65


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

setState(() {
_markers.remove(requestId);
});
}

// Define a method to convert address to LatLng


Future<LatLng?> convertAddressToLatLng(String address) async {
try {
List<Location> locations = await locationFromAddress(address);
if (locations.isNotEmpty) {
Location location = locations.first;
return LatLng(location.latitude, location.longitude);
} else {
print(’No location found for address: $address’);
return null;
}
} catch (e) {
print(’Error converting address to LatLng: $e’);
return null;
}
}

void _hideAllMarkers() {
setState(() {
_markerVisibility.forEach((requestId, _) {
_markerVisibility[requestId] = false;
_markers.remove(requestId);
});
});
}

// Define _markers variable in the _OnRoutePageState class

Department of CSE, MACE, Kothamangalam 66


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Map<String, Map<String, Marker>> _markers = {};


}

class RideSelectPage extends StatelessWidget {


final LatLng fromLocation;
final LatLng toLocation;
final String userName;

RideSelectPage({required this.fromLocation, required this.toLocation, required

@override
Widget build(BuildContext context) {
return OnRoutePage(
fromLocation: fromLocation,
toLocation: toLocation,
userName: userName,
onRideAccepted: (driverLocation) {}, // Pass driverLocation to the OnRouteP
);
}
}

class CompleteRidePage extends StatefulWidget {


@override
_CompleteRidePageState createState() => _CompleteRidePageState();
}

class _CompleteRidePageState extends State<CompleteRidePage> {


bool _isAnimationComplete = false;

@override
void initState() {
super.initState();

Department of CSE, MACE, Kothamangalam 67


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

// Start the animation when the page is first loaded


_startAnimation();
}

void _startAnimation() {
// Set a delay to simulate animation duration
Future.delayed(Duration(seconds: 1), () {
// After the delay, mark the animation as complete
setState(() {
_isAnimationComplete = true;
});
});
}

@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text(’Complete Ride’),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
_isAnimationComplete
? _buildStaticTickMark()
: _buildAnimatedTickMark(),
SizedBox(height: 20),
_isAnimationComplete
? Text(
’Ride Completed’,
style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),

Department of CSE, MACE, Kothamangalam 68


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

)
: SizedBox.shrink(),
],
),
),
);
}

Widget _buildStaticTickMark() {
return Icon(
Icons.check,
color: Colors.green,
size: 100, // Icon size
);
}

Widget _buildAnimatedTickMark() {
return AnimatedContainer(
duration: Duration(seconds: 1),
curve: Curves.easeInOut,
width: 100, // Initial width
height: 100, // Initial height
decoration: BoxDecoration(
color: Colors.green,
shape: BoxShape.circle,
),
child: Icon(
Icons.check,
color: Colors.white,
size: 60, // Icon size
),
onEnd: () {

Department of CSE, MACE, Kothamangalam 69


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

// Animation completed callback


// Set isAnimationComplete to true to switch to the static tick mark
setState(() {
_isAnimationComplete = true;
});
},
);
}
}

void main() {
runApp(MaterialApp(
initialRoute: ’/’,
routes: {
’/’: (context) => RideSelectPage(fromLocation: LatLng(0, 0), toLocation: La
},
));
}

8.6.5 selectr ide.dart

import ’package:flutter/material.dart’;
import ’package:cloud_firestore/cloud_firestore.dart’;
import ’package:geocoding/geocoding.dart’;
import ’package:nimbus_v2/waiting_for_confirmation.dart’;

class SelectDriverPage extends StatefulWidget {


final String fromLocation;
final String toLocation;
final String userName;

SelectDriverPage({required this.fromLocation, required this.toLocation, require

Department of CSE, MACE, Kothamangalam 70


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

@override
_SelectDriverPageState createState() => _SelectDriverPageState();
}

class _SelectDriverPageState extends State<SelectDriverPage> {


String _selectedDriverId = ’’;
String _selectedDriverName = ’’;
String _selectedDriverLoc = ’’;
String _userLocationLatLong = ’’; // Initialize here

@override
void initState() {
super.initState();
_getUserLocation(); // Call the method to initialize _userLocationLatLong
}

@override
void dispose() {
super.dispose();
}

Future<void> _getUserLocation() async {


try {
List<Location> locations = await locationFromAddress(widget.fromLocation);
if (locations.isNotEmpty) {
Location location = locations.first;
double lat = location.latitude;
double lng = location.longitude;
setState(() {
_userLocationLatLong = ’$lat,$lng’;
});
print(’User Location: $_userLocationLatLong’); // Print user location

Department of CSE, MACE, Kothamangalam 71


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

} else {
print(’Error: User location not found.’);
}
} catch (e) {
print(’Error getting user location: $e’);
}
}

Future<void> _hireRide() async {


if (_selectedDriverId.isNotEmpty) {
List<Location> locations = await locationFromAddress(_selectedDriverLoc);
if (locations.isNotEmpty) {
Location location = locations.first;
double lat = location.latitude;
double lng = location.longitude;

Navigator.of(context).pop();
FirebaseFirestore.instance.collection(’requests’).add({
’driverId’: _selectedDriverId,
’driverName’: _selectedDriverName,
’hireId’: widget.userName,
’fromLocation’: widget.fromLocation,
’toLocation’: widget.toLocation,
’status’: ’pending’,
});
FirebaseFirestore.instance.collection(’ride_request’).add({
’driverId’: _selectedDriverId,
’driverName’: _selectedDriverName,
’hireId’: widget.userName,
’fromLocation’: widget.fromLocation,
’toLocation’: widget.toLocation,
’status’: ’pending’,

Department of CSE, MACE, Kothamangalam 72


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

});

Navigator.of(context).pushReplacement(
MaterialPageRoute(
builder: (context) => WaitingForConfirmationPage(
username: widget.userName,
userLocation: _userLocationLatLong,
driverLocation: ’$lat,$lng’,
),
),
);
} else {
showDialog(
context: context,
builder: (context) => AlertDialog(
title: Text(’Location Not Found’),
content: Text(’The selected driver location could not be found.’),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text(’OK’),
),
],
),
);
}
} else {
showDialog(
context: context,
builder: (context) => AlertDialog(

Department of CSE, MACE, Kothamangalam 73


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

title: Text(’No Driver Selected’),


content: Text(’Please select a driver before confirming the ride.’),
actions: [
TextButton(
onPressed: () {
Navigator.of(context).pop();
},
child: Text(’OK’),
),
],
),
);
}
}

@override
Widget build(BuildContext context) {
return Scaffold(
backgroundColor: Colors.black,
appBar: AppBar(
title: Text(’Select Driver’),
backgroundColor: Colors.white,
),
body: Column(
children: [
Expanded(
child: StreamBuilder(
stream: FirebaseFirestore.instance.collection(’rides’).snapshots(),
builder: (context, AsyncSnapshot<QuerySnapshot> snapshot) {
if (snapshot.connectionState == ConnectionState.waiting) {
return Center(child: CircularProgressIndicator());
} else if (snapshot.hasError) {

Department of CSE, MACE, Kothamangalam 74


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

return Center(child: Text(’Error: ${snapshot.error}’));


} else {
final rides = snapshot.data!.docs;
return ListView.builder(
itemCount: rides.length,
itemBuilder: (context, index) {
final ride = rides[index];
final fromLocation = ride[’fromLocation’];
final toLocation = ride[’toLocation’];
final driverName = ride[’driverId’];
final driverId = ride.id;
final isSelected = _selectedDriverId == driverId;

return ListTile(
title: Text(driverName,style: TextStyle(color:Colors.whit
subtitle: Text(’From: $fromLocation\nTo: $toLocation’,sty
tileColor: isSelected ? Colors.grey.withOpacity(0.5) : nu
onTap: () {
setState(() {
_selectedDriverId = driverId;
_selectedDriverName = driverName;
_selectedDriverLoc = fromLocation;
});
},
);
},
);
}
},
),
),
if (_selectedDriverId.isNotEmpty)

Department of CSE, MACE, Kothamangalam 75


ENHANCED RIDESHARING USING DIRECTIONS API AND
GEOLOCATION

Padding(
padding: const EdgeInsets.all(8.0),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
ElevatedButton(
style: ButtonStyle(backgroundColor: MaterialStatePropertyAll(
onPressed: _hireRide,
child: Text(’Confirm Ride’,style: TextStyle(color:Colors.blac
),
ElevatedButton(
style: ButtonStyle(backgroundColor: MaterialStatePropertyAll(
onPressed: () {
setState(() {
_selectedDriverId = ’’;
});
},
child: Text(’Clear Selection’,style: TextStyle(color:Colors.b
),
],
),
),
],
),
);
}
}

Department of CSE, MACE, Kothamangalam 76


Chapter 9
References

1. Rolling Time Domain Charging Allocation of Electric Vehicles Under Time


Varying Demand https://ieeexplore.ieee.org/document/10411885

2. ChargePlug- A Comprehensive Cross-Platform Application for Locating


Electric Charging Stations https://ieeexplore.ieee.org/document/10126148

3. An Evaluation of UWB for Location-Based Hands-Free Authentication


Charging https://ieeexplore.ieee.org/document/9831628

4. Flask Documentation https://flask.palletsprojects.com/en/3.0.x/

5. Folium API https://python-visualization.github.io/folium/latest/

77

You might also like