Abhii Final
Abhii Final
Abhii Final
PROJECT REPORT
ON
“Bus Tracking”
:: Submitted by ::
Mr. Abhishek Prabhakar Bagal
Mr. Omkar Sanjay Bhalewar
::Department of ::
COMPUTER ENGINEERING
GRAMIN POLYTECHNIC,
VISHNUPURI NANDED: - 431606
ACADEMIC YEAR
2020-21
A
PROJECT REPORT
ON
“Bus Tracking”
:: Submitted by ::
Mr. Abhishek Prabhakar Bagal
Mr. Omkar Sanjay Bhalewar
:: Guided by ::
Ms. Dudhmal M.N.
In partial fulfillment for the award of the diploma in
COMPUTER ENGINEERING
GRAMIN POLYTECHNIC,
VISHNUPURI NANDED: - 431606
ACADEMIC YEAR
2020-21
CERTIFICATE
This is to certify that project entitled “Bus Tracking” being submitted by Mr.
Abhishek Prabhakar Bagal, Mr.Omkar Sanjay Bhalewar to “Maharashtra State
Board of Technical Education, Mumbai” as a partial fulfillment of award of Diploma
in Computer Engineering, is record of bonafied work carried out by them under my
supervision and guidance. The matter contain in this project work has not been
submitted to any other institute for award of any degree or diploma.
( ) ( )
Mr.Wahi G.S Ms. Dudhmal M.N.
( )
Dr. Pawar V.S.
Principal
PROJECT APPROVAL SHEET
Following team has done the appropriate work related to the “Bus-Tracking” in
partial fulfillment for the award of diploma in Computer Engineering of “MSBTE” and
is being submitted to Gramin Polytechnic Vishnupuri, Nanded.
Team:
Mr. Abhishek Prabhakar Bagal
Mr. Omkar Sanjay Bhalewar
Guide:
Ms. Dudhmal M.N.
Date:
Place: Nanded.
( ) ( )
Internal Examiner External Examiner
ACKNOWLEDGEMENT
We would like to thank our scheme, faculties and mentors for giving us the opportunity to
work under their guidance and help us in our final project. I would like to thank our beloved
principal Dr. Pawar V.S. who is the force behind this project. My sincere thanks to Ms. Dudhmal
M.N. as our internal project guide for giving us valuable inputs and ideas right from the selection
of topic for project till its successful completion.
I thank Mr. Wahi G.S (HOD of Computer Department) for his ongoing support and
encouragement in every aspect Last but not the least entire staff of Department of Computer
Engineering for guiding their thoughts and vision.
The successful completion of our final project report would not have been possible without
the dedicated support from all our mentors, family and friends. Finally, yet importantly I would
like to express my heartfelt thanks to my beloved parents for their blessings, my friends, and all
those who supported me directly or indirectly for their help and wishes for successful completion
of this project.
This project focuses on the development of a bus tracking system aimed at enhancing
transportation efficiency and passenger experience. The system utilizes GPS technology
to provide real-time tracking of bus locations, enabling passengers to access accurate
arrival times and optimize travel routes. With an emphasis on reducing travel costs and
minimizing time consumption, the system offers convenience by allowing users to track
buses from any location. Moreover, amidst the challenges posed by the COVID-19
pandemic, the system ensures passenger safety by minimizing physical interactions
through contactless tracking and notifications. By promoting digitization in public
transportation, the project aims to streamline operations, reduce management costs, and
deliver an improved and reliable bus tracking solution.
Advantages
2. Privacy Concerns: Users may have concerns about privacy when sharing their location
data, potentially leading to reluctance in using the application.
No. No.
1 Introduction 1
2 Literature Survey 4
2.1 Introduction 4
2.2 Technologies Used 4
3 System Requirements Specifications 6
3.1. Hardware Requirement 6
5 System Implementation 22
5.1. User Application Coding 22
6 Testing 85
6.1 Testing 85
6.2 Testing Objectives 85
6.3 Levels of Testing 85
6.4 Types of Testing 86
6.5 White box testing 88
6.6 Black box testing 88
6.7 Test Case 88
7 Advantages 91
8 Conclusion 92
9 References 93
Bus-Tracking 2023-2024
CHAPTER 1
INTRODUCTION
The project's scope encompasses the development of a comprehensive bus tracking system. It includes
real-time tracking functionalities facilitated by GPS technology, enabling accurate location updates for
buses. The system will feature intuitive user interfaces tailored for both passengers and administrators,
ensuring accessibility and ease of use. Additionally, algorithms will be implemented to optimize bus
routes based on traffic conditions and passenger demand, enhancing efficiency. Timely notifications
will inform passengers of bus arrivals, delays, or route changes, improving the overall travel experience.
Robust data management protocols will ensure secure storage and processing of bus location data, while
integration with existing transportation infrastructure will facilitate seamless
operations.
1.4 OBJECTIVES
Improved Passenger Experience
Enhanced Safety and Security
Optimized Bus Operations
Cost Savings
Data-Driven Decision Making
You can save your time.
1.5 FEATURES
Real-time Bus Tracking
Route Optimization
Notifications
User Interfaces
Data Management
Integration.
All data store online.
1.6 MODULE
🠶 User
🠶 Admin
CHAPTER 2
LITERATURE SURVEY
The bus tracking system presents an innovative solution to the challenges faced in public transportation by
leveraging modern technology. With the increasing demand for efficient and reliable transportation services, the
need for real-time tracking and optimization of bus routes has become paramount. This system aims to address
these needs by providing passengers with accurate information on bus locations, arrivals, and delays, thereby
enhancing their overall travel experience. By utilizing GPS technology and sophisticated algorithms, the system
optimizes bus operations, reduces wait times, and improves passenger safety. This introduction sets the stage for
exploring how the bus tracking system revolutionizes public transportation, offering convenience, efficiency,
and reliability to commuters and transportation authorities alike.
2.1 TECHNOLOGIES USED
This application uses mainly dart and some c++ technologies namely:
2.1.2 TOOLS
2.1.3 DATABASE
PostGIS: An extension to PostgreSQL that adds support for geographic objects, making it suitable for
storing and querying spatial data such as GPS coordinates and routes.
Firebase Realtime Database: Offers real-time synchronization and updates, making it suitable for
tracking applications where immediate updates are required.
CHAPTER 3
SYSTEM REQUIREMENT SPECIFICATIONS
A System requirement specification (abbreviated SRS when needed to be distinct from a SRS)
is structured collection of information that embodies the requirements of the system.
CHAPTER 4
SYSTEM DESIGN
4.1 DESIGN DOCUMENT
The entire system is projected with a physical diagram which specifics the actual storage parameters
that are physically necessary for any database to be stored on to the disk. The overall systems
existential idea is derived from this diagram.
The relation upon the system is structure through a conceptual ER-Diagram, which not only
specifics the existential entities but also the standard relations through which the system exists and
the cardinalities that are necessary for the system state to continue.
4.2 ER-DIAGRAM
The entity Relationship Diagram (ERD) depicts the relationship between the data
objects. The ERD is the notation that is used to conduct the date modeling activity the
attributes of each data object noted is the ERD can be described resign a data object
descriptions.
The set of primary components that are identified by the ERD are
Data object
Relationships
Attributes
The primary purpose of the ERD is to represent data objects and their relationships.
used by the process, an external entity that interacts with the system and the
information flows in the system.
DFD shows how the information moves through the system and how it is modified by
a series of transformations. It is a graphical technique that depicts information flow
and the transformations that are applied as data moves from input to output
DFD is also known as bubble chart. A DFD may be used to represent a system at any
level of abstraction. DFD may be partitioned into levels that represent increasing
information flow and functional detail.
The unified modeling language allows the software engineer to express an analysis model
using the modeling notation that is governed by a set of syntactic semantic and pragmatic
rules.
A UML system is represented using five different views that describe the system from
distinctly different perspective. Each view is defined by a set of diagram, which is as
follows.
A use case diagram shows a set of use cases and actors and their relationships. Use
case diagrams address the static use case view of a system. These diagrams are especially
important in organizing and modeling the behaviors of a system.
A use case diagram is a just a special kind of diagram and shares the same common
properties as do all other diagrams. A use case diagram differs from all other kinds of
diagrams in its particular content.
4.5.1 Contents
Use case:
Use case is a description of set of sequence of actions that a system performs that
yields an observable result of value to a particular actor. A use case is used to structure the
behavioral things in a model. A use case is realized by collaboration. Graphically a use case
is rendered as an ellipse with solid lines, usually including only its name, as shown below.
Place order
Relationships:
Dependency
Fig.4.5(b) Dependency
0….1 *
Association
Fig.4.5(c) Association
Generalization
Fig.4.5(d) Generalization
5.1.1 Flow Chart Diagram of Canteen Ordering System User App Register
Activity
6.1.1 Flow Chart Diagram of Canteen Ordering System User App Home
Activity
CHAPTER 5
SYSTEM IMPLEMENTION
5.1 USER APPLICATION CODING/IMPLEMENTATION
import 'package:flutter/src/widgets/framework.dart';
import 'package:flutter/services.dart';
import 'registration_screen.dart';
import 'login_screen.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:lottie/lottie.dart';
import 'package:google_fonts/google_fonts.dart';
@override
State<welcomeScreen> createState() => _welcomeScreenState();
}
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
bool? result = await _onBackPressed();
if (result == null) {
result = false;
}
return result;
},
child: Scaffold(
// return Scaffold(
body: SafeArea(
child: Padding(
padding: const EdgeInsets.symmetric(horizontal: 20),
child: Column(
children: [
Flexible(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
SizedBox(
height: 20,
),
Lottie.asset('assets/images/bus.json'),
SizedBox(
height: 20,
),
Text(
"Welcome to \n KRU Bus Tracking",
style: GoogleFonts.poppins(
fontSize: 34, fontWeight: FontWeight.w700),
textAlign: TextAlign.center,
),
],
),
),
Padding(
padding: EdgeInsets.symmetric(vertical: 38),
child: Container(
height: 65,
decoration: BoxDecoration(
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:email_password_login/model/shared_preference.dart';
import 'package:email_password_login/model/user_model.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'login_screen.dart';
@override
_HomeScreenState createState() => _HomeScreenState();
}
final Stream<QuerySnapshot>users=
FirebaseFirestore.instance.collection('users').snapshots();
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
bool? result = await _onBackPressed();
if (result == null) {
result = false;
}
return result;
return ListView.builder(
itemCount:data.size,
itemBuilder:(context,index){
return Text('${data.docs[index]['fullname']} ${data.docs[index]['email']}');
}
);
}
)
),
// Text("${loggedInUser.fullName}",
// style: TextStyle(
// color: Colors.black54,
// fontWeight: FontWeight.w500,
// )),
// Text("${loggedInUser.email}",
// style: TextStyle(
// color: Colors.black54,
// fontWeight: FontWeight.w500,
// )),
// SizedBox(
// height: 15,
// ),
ActionChip(
label: Text("Logout"),
onPressed: () async {
await _prefService
.removeCache("email", "password")
.whenComplete(() => {
logout(context),
});
}
),
],
),
),
)
)
);
}
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:email_password_login/model/routes.dart';
import 'package:email_password_login/model/user_model.dart';
import 'package:email_password_login/screens/welcome_screen.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:firebase_database/firebase_database.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:flutter/material.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:lottie/lottie.dart';
import 'home_screen.dart';
import 'login_screen.dart';
@override
_RegistrationScreenState createState() => _RegistrationScreenState();
}
// editing Controller
final fullnameEditingController = new TextEditingController();
final emailEditingController = new TextEditingController();
final passwordEditingController = new TextEditingController();
final confirmPasswordEditingController = new TextEditingController();
@override
Widget build(BuildContext context) {
//first name field
final fullnameField = TextFormField(
autofocus: false,
controller: fullnameEditingController,
keyboardType: TextInputType.name,
validator: (value) {
RegExp regex = new RegExp(r'^.{3,}$');
if (value!.isEmpty) {
return ("Full Name cannot be Empty");
}
if (!regex.hasMatch(value)) {
return ("Enter Valid name(Min. 3 Character)");
}
return null;
},
onSaved: (value) {
fullnameEditingController.text = value!;
},
textInputAction: TextInputAction.next,
decoration: InputDecoration(
prefixIcon: Icon(Icons.account_circle),
contentPadding: EdgeInsets.fromLTRB(20, 15, 20, 15),
hintText: "Full Name",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
));
//email field
final emailField = TextFormField(
autofocus: false,
controller: emailEditingController,
keyboardType: TextInputType.emailAddress,
validator: (value) {
if (value!.isEmpty) {
return ("Please Enter Your Email");
}
// reg expression for email validation
if (!RegExp("^[a-zA-Z0-9+_.-]+@[a-zA-Z0-9.-]+.[a-z]")
.hasMatch(value)) {
return ("Please Enter a valid email");
}
return null;
},
onSaved: (value) {
fullnameEditingController.text = value!;
},
textInputAction: TextInputAction.next,
decoration: InputDecoration(
prefixIcon: Icon(Icons.mail),
contentPadding: EdgeInsets.fromLTRB(20, 15, 20, 15),
hintText: "Email",
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
));
//password field
final passwordField = TextFormField(
autofocus: false,
controller: passwordEditingController,
obscureText: _obscureText,
validator: (value) {
RegExp regex = new RegExp(r'^.{6,}$');
if (value!.isEmpty) {
return ("Password is required");
}
if (!regex.hasMatch(value)) {
return ("Enter Valid Password(Min. 6 Character)");
}
},
onSaved: (value) {
fullnameEditingController.text = value!;
},
textInputAction: TextInputAction.next,
decoration: InputDecoration(
prefixIcon: Icon(Icons.vpn_key),
contentPadding: EdgeInsets.fromLTRB(20, 15, 20, 15),
hintText: "Password",
suffixIcon: GestureDetector(
onTap: () {
setState(() {
_obscureText = !_obscureText;
});
},
child: Icon(
_obscureText ? Icons.visibility : Icons.visibility_off,
),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
));
}
return null;
},
onSaved: (value) {
confirmPasswordEditingController.text = value!;
},
textInputAction: TextInputAction.done,
decoration: InputDecoration(
prefixIcon: Icon(Icons.vpn_key),
contentPadding: EdgeInsets.fromLTRB(20, 15, 20, 15),
hintText: "Confirm Password",
suffixIcon: GestureDetector(
onTap: () {
setState(() {
obscureText = ! obscureText;
});
},
child: Icon(
obscureText ? Icons.visibility : Icons.visibility_off,
),
),
border: OutlineInputBorder(
borderRadius: BorderRadius.circular(10),
),
));
//signup button
final signUpButton = Material(
elevation: 5,
borderRadius: BorderRadius.circular(10),
color: Colors.deepPurple,
child: MaterialButton(
padding: EdgeInsets.fromLTRB(20, 15, 20, 15),
minWidth: MediaQuery.of(context).size.width,
onPressed: () {
signUp(emailEditingController.text, passwordEditingController.text);
},
child: Text(
"SignUp",
textAlign: TextAlign.center,
style: TextStyle(
fontSize: 20, color: Colors.white, fontWeight: FontWeight.bold),
)),
);
return Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: Colors.black,
size: 30,
),
onPressed: () {
// passing this to our root
Navigator.of(context).pushReplacement(
MaterialPageRoute(builder: (context) => welcomeScreen()));
},
),
),
body: Center(
child: SingleChildScrollView(
child: Container(
color: Colors.white,
child: Padding(
padding: const EdgeInsets.all(36),
child: Form(
key: _formKey,
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Lottie.asset(
'assets/images/sign-up.json',
width: 140,
height: 140,
),
SizedBox(
height: 15,
),
Text(
'Registeration',
style: GoogleFonts.poppins(
color: Colors.black,
fontSize: 34,
fontWeight: FontWeight.w700),
),
SizedBox(height: 45),
fullnameField,
SizedBox(height: 20),
emailField,
SizedBox(height: 20),
passwordField,
SizedBox(height: 20),
confirmPasswordField,
SizedBox(height: 20),
signUpButton,
SizedBox(height: 15),
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text("Already registered? "),
GestureDetector(
onTap: () {
Navigator.pushReplacement(
context,
MaterialPageRoute(
builder: (context) => LoginScreen()));
},
child: Text(
"Login",
style: TextStyle(
color: Colors.deepPurple,
fontWeight: FontWeight.bold,
fontSize: 15),
),
)
],
),
],
),
),
),
),
),
),
);
}
if (_formKey.currentState!.validate()) {
try {
await _auth
.createUserWithEmailAndPassword(email: email, password: password)
.then((value) => {afterThen()});
void afterThen() {
postDetailsToFirestore() async {
// calling our firestore
// calling our user model
// sedning these values
await firebaseFirestore
.collection("users")
.doc(user.uid)
.set(userModel.toMap());
Navigator.of(context).pop;
Navigator.of(context).pushReplacementNamed(loginRoute);
Fluttertoast.showToast(msg: "User Successfully Registered");
}
}
import 'package:email_password_login/screens/login_screen.dart';
import 'package:flutter/material.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:fluttertoast/fluttertoast.dart';
import 'package:google_fonts/google_fonts.dart';
import 'package:lottie/lottie.dart';
@override
State<ForgotPassword> createState() =>
_ForgotPasswordState();
}
String? errorMessage;
@override
Widget build(BuildContext context) {
//email field
final emailField = TextFormField(
autofocus: false,
controller: emailController,
keyboardType: TextInputType.emailAddress,
validator: (value) {
if (value!.isEmpty) {
Passanger Mode
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:firebase_database/firebase_database.dart';
@override
void initState() {
super.initState();
_getCurrentLocation();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Passenger Mode'),
),
body: Center(
Gramin Polytechnic Vishnupuri, Nanded. Page 47
Bus-Tracking 2023-2024
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Latitude: ${_currentPosition.latitude}'),
Text('Longitude: ${_currentPosition.longitude}'),
],
),
),
);
}
}
Waiting Mode
import 'package:flutter/material.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:firebase_database/firebase_database.dart';
@override
void initState() {
super.initState();
_getPassengerLocations();
}
void _getPassengerLocations() {
_databaseRef.onChildAdded.listen((event) {
Map<String, dynamic> data = event.snapshot.value as Map<String, dynamic>;
double latitude = data['latitude'];
double longitude = data['longitude'];
setState(() {
_markers.add(
Marker(
markerId: MarkerId(event.snapshot.key ?? ""),
position: LatLng(latitude, longitude),
),
);
});
});
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
Location provider
import 'package:flutter/cupertino.dart';
import 'package:google_maps_flutter/google_maps_flutter.dart';
import 'package:location/location.dart';
import 'dart:async';
LocationProvider() {
_location = Location();
}
initalization() async {
await getUserLocation();
}
getUserLocation() async {
bool serviceEnabled;
PermissionStatus permissionGranted;
if (!serviceEnabled) {
return;
}
}
location.onLocationChanged.listen(
(LocationData currenLocation) {
_locationPosition = LatLng(
currenLocation.latitude!,
currenLocation.longitude!,
);
},
);
}
}
// import 'dart:async';
// import 'package:curved_navigation_bar/curved_navigation_bar.dart';
// import 'package:firebase_auth/firebase_auth.dart';
// import 'package:flutter/cupertino.dart';
// import 'package:flutter/material.dart';
// import 'package:flutter/services.dart';
// import 'package:flutter_polyline_points/flutter_polyline_points.dart';
// import 'package:google_maps_flutter/google_maps_flutter.dart';
// import 'package:location/location.dart';
// import '../login/login/login_screen.dart';
// import '../model/shared_preference.dart';
// import '../screens/home.dart';
// import 'google_map copy.dart';
// import 'google_map_api.dart';
// @override
// _LocationTrackingState createState() => _LocationTrackingState();
// }
// LocationData? currentLocation;
// late LocationData destinationLocation;
// late Location location;
// int index = 1;
// @override
// void initState() {
// super.initState();
// location = Location();
// polylinePoints = PolylinePoints();
// subscription = location.onLocationChanged.listen((clocation) {
// currentLocation = clocation;
// setInitialLocation();
// }
// destinationLocation = LocationData.fromMap({
// "latitude": destinationLatlng.latitude,
// "longitude": destinationLatlng.longitude,
// });
// }
// void showLocationPins() {
// var sourceposition = LatLng(
// currentLocation!.latitude ?? 0.0, currentLocation!.longitude ?? 0.0);
// var destinationPosition =
// LatLng(destinationLatlng.latitude, destinationLatlng.longitude);
// _marker.add(Marker(
// markerId: MarkerId('sourcePosition'),
// position: sourceposition,
// ));
// _marker.add(
// Marker(
// markerId: MarkerId('destinationPosition'),
// position: destinationPosition,
// ),
// );
// setPolylinesInMap();
// }
// if (result.points.isNotEmpty) {
// result.points.forEach((pointLatLng) {
// polylineCoordinates
// .add(LatLng(pointLatLng.latitude, pointLatLng.longitude));
// });
// }
// setState(() {
// _polylines.add(Polyline(
// width: 5,
// polylineId: PolylineId('polyline'),
// color: Colors.blueAccent,
// points: polylineCoordinates,
// ));
// });
// }
// controller.animateCamera(CameraUpdate.newCameraPosition(cameraPosition));
// setState(() {
// _marker.removeWhere((marker) => marker.mapsId.value == 'sourcePosition');
// _marker.add(Marker(
// markerId: MarkerId('sourcePosition'),
// @override
// Widget build(BuildContext context) {
// CameraPosition initialCameraPosition = CameraPosition(
// zoom: 20,
// tilt: 80,
// bearing: 30,
// target: currentLocation != null
// ? LatLng(currentLocation!.latitude ?? 0.0,
// currentLocation!.longitude ?? 0.0)
// : LatLng(0.0, 0.0),
// );
// centerTitle: true,
// backgroundColor: Colors.transparent,
// elevation: 4.0,
// flexibleSpace: Container(
// decoration: const BoxDecoration(
// borderRadius: BorderRadius.only(
// bottomLeft: Radius.circular(20),
// bottomRight: Radius.circular(20)),
// color: Colors.white),
// ),
// actions: [
// IconButton(
// icon: Icon(
// Icons.logout_rounded,
// color: Colors.black,
// ),
// onPressed: () async {
// await _prefService
// .removeCache("email", "password")
// .whenComplete(() => {
// logout(context),
// });
// },
// )
// ],
// ),
// body: GoogleMap(
// myLocationButtonEnabled: true,
// myLocationEnabled: true,
// //compassEnabled: true,
// markers: _marker,
// polylines: _polylines,
// mapType: MapType.normal,
// initialCameraPosition: initialCameraPosition,
// @override
// void dispose() {
// subscription.cancel();
// super.dispose();
// }
// }
import 'package:flutter/material.dart';
import 'package:geolocator/geolocator.dart';
import 'package:firebase_database/firebase_database.dart';
@override
void initState() {
super.initState();
_getCurrentLocation();
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(
title: Text('Passenger Mode'),
),
body: Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Text('Latitude: ${_currentPosition.latitude}'),
Text('Longitude: ${_currentPosition.longitude}'),
],
),
),
);
}
}
"stylers": [
{
"color": "#757575"
}
]
},
{
"featureType": "road.highway",
"elementType": "geometry",
"stylers": [
{
"color": "#dadada"
}
]
},
{
"featureType": "road.highway",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#616161"
}
]
},
{
"featureType": "road.local",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
},
{
"featureType": "transit.line",
Gramin Polytechnic Vishnupuri, Nanded. Page 65
Bus-Tracking 2023-2024
"elementType": "geometry",
"stylers": [
{
"color": "#e5e5e5"
}
]
},
{
"featureType": "transit.station",
"elementType": "geometry",
"stylers": [
{
"color": "#eeeeee"
}
]
},
{
"featureType": "water",
"elementType": "geometry",
"stylers": [
{
"color": "#c9c9c9"
}
]
},
{
"featureType": "water",
"elementType": "labels.text.fill",
"stylers": [
{
"color": "#9e9e9e"
}
]
}
]""";
Home activicty
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:email_password_login/model/shared_preference.dart';
import 'package:email_password_login/model/user_model.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'login_screen.dart';
@override
_HomeScreenState createState() => _HomeScreenState();
}
final Stream<QuerySnapshot>users=
FirebaseFirestore.instance.collection('users').snapshots();
@override
Widget build(BuildContext context) {
return WillPopScope(
onWillPop: () async {
bool? result = await _onBackPressed();
if (result == null) {
result = false;
}
return result;
},
child: new Scaffold(
backgroundColor: Colors.white,
appBar: AppBar(
backgroundColor: Colors.transparent,
elevation: 0,
leading: IconButton(
icon: Icon(
Icons.arrow_back,
color: Colors.black,
size: 30,
),
onPressed: () {
_onBackPressed();
},
),
),
body: Center(
child: Padding(
padding: EdgeInsets.all(20),
child: Column(
return ListView.builder(
itemCount:data.size,
itemBuilder:(context,index){
return Text('${data.docs[index]['fullname']}
${data.docs[index]['email']}');
}
);
}
Testing is the process of detecting errors. Testing performs a very critical role for quality
assurance and for ensuring the reliability of software. The results of testing are used later on during
maintenance also.
The aim of testing is often to demonstrate that a program works by showing that it has no
errors. The basic purpose of testing phase is to detect the errors that may be present in the
program. Hence one should not start testing with the intent of showing that a program works, but
the intent should be to show that a program doesn’t work. Testing is the process of executing a
program with the intent of finding errors.
The main objective of testing is to uncover a host of errors, systematically and with
minimum effort and time. Stating formally, we can say:
In order to uncover the errors present in different phases we have the concept of levels testing.
The basic levels of testing are as shown below…
System Testing
The philosophy behind testing is to find errors. Test cases are devised with this in mind. A
strategy employed for system testing is code testing.
Code Testing:
This strategy examines the logic of the program. To follow this method we developed some
test data that resulted in executing every instruction in the program and module i.e. every path is
tested. Systems are not designed as entire nor are they tested as single systems. To ensure that the
coding is perfect two types of testing is performed or for that matter is performed or that matter is
performed or for that matter is performed on all systems.
Unit Testing
Link Testing
Unit testing focuses verification effort on the smallest unit of software i.e. the module.
Using the detailed design and the process specifications testing is done to uncover errors within
the boundary of the module. All modules must be successful in the unit test before the start of the
integration testing begins.
In this project each service can be thought of a module. There are so many modules like
Login, HWAdmin, MasterAdmin, Normal User, and PManager. Giving different sets of inputs has
tested each module. When developing the module as well as finishing the development so that each
module works without any error. The inputs are validated when accepting from the user.
In this application developer tests the programs up as system. Software units in a system
are the modules and routines that are assembled and integrated to form a specific function. Unit
testing is first done on modules, independent of one another to locate errors. This enables to detect
errors. Through this errors resulting from interaction between modules initially avoided.
In this project integrating all the modules forms the main system. When integrating all the
modules I have checked whether the integration effects working of any of the services by giving
different combinations of inputs with which the two services run perfectly before Integration.
Here the entire software system is tested. The reference document for this process is the
requirements document, and the goal os to see if software meets its requirements.
Here entire ‘Bus tracking system’ has been tested against requirements of project and it is
checked whether all requirements of project have been satisfied or not.
In this project ‘Network Management Of Database System’ I have collected some data and
tested whether project is working correctly or not.
Test cases should be selected so that the largest number of attributes of an equivalence
class is exercised at once. The testing phase is an important part of software development. It is the
process of finding errors and missing operations and also a complete verification to determine
whether the objectives are met and the user requirements are satisfied.
This is a unit testing method where a unit will be taken at a time and tested thoroughly at a
statement level to find the maximum possible errors. I tested step wise every piece of code, taking
care that every statement in the code is executed at least once. The white box testing is also called
Glass Box Testing.
I have generated a list of test cases, sample data. which is used to check all possible
combinations of execution paths through the code at every module level.
This testing method considers a module as a single unit and checks the unit at interface and
communication with other modules rather getting into details at statement level. Here the module
will be treated as a block box that will take some input and generate output. Output for a given set
of input combinations are forwarded to other modules.
CHAPTER 7
ADVANTAGES
Improved Efficiency: By providing real-time location data of buses to passengers in waiting mode,
the application helps them plan their journeys more efficiently, reducing wait times and minimizing
disruptions.
Enhanced Safety: Passengers can track the current location of the bus, allowing them to make
informed decisions about their travel and ensuring their safety, especially during late hours or in
unfamiliar areas.
Optimized Routing: Utilizing GPS data and average location calculations from multiple users in
passenger mode, the application can optimize bus routes based on passenger demand, leading to more
efficient and cost-effective transportation services.
Reduced Congestion: With better route optimization and real-time tracking, the app can help reduce
congestion on roads by providing alternative routes or encouraging passengers to use less crowded
buses.
Improved User Experience: Passengers in waiting mode can have a more seamless and convenient
experience by accessing accurate location data and estimated arrival times, leading to higher
satisfaction levels with the transportation service.
Environmental Benefits: By optimizing routes and reducing congestion, the application contributes to
lowering carbon emissions and promoting environmentally sustainable transportation practices.
Cost Savings: Both passengers and transportation authorities can benefit from cost savings due to
improved route efficiency, reduced fuel consumption, and optimized resource allocation, leading to
overall financial savings for all stakeholders involved.
CHAPTER 8
9.1 CONCLUSION
In conclusion, the bus tracking application offers a range of advantages that contribute to a more
efficient, safe, and user-friendly transportation experience. By providing real-time location data,
optimizing routes, and enhancing passenger convenience, the application improves the overall
efficiency of public transportation systems. Additionally, the app promotes environmental
sustainability, reduces congestion, and results in cost savings for both passengers and transportation
authorities. Overall, the bus tracking application represents a significant step forward in modernizing
and optimizing public transportation services for the benefit of passengers, operators, and the
community as a whole.
To further enhance the bus tracking application and maximize its benefits, the following recommendations are
suggested:
1. **Integration with Public Transport Networks**: Explore opportunities to integrate the application with
existing public transport networks, such as bus schedules, routes, and fare payment systems. This integration
would provide users with comprehensive information and streamline their journey planning process.
2. **Enhanced User Interface**: Continuously improve the user interface to make it more intuitive, visually
appealing, and accessible across different devices. Incorporate user feedback to identify areas for improvement
and implement user-centric design principles.
3. **Advanced Analytics and Predictive Modeling**: Implement advanced analytics and predictive modeling
techniques to analyze historical data and predict future demand patterns. This information can be used to optimize
bus schedules, allocate resources efficiently, and anticipate passenger needs.
4. **Multilingual Support**: Introduce multilingual support to cater to a diverse user base and enhance
accessibility for non-native speakers. Provide options for users to switch between different languages based on
their preferences.
5. **Enhanced Security and Privacy Measures**: Strengthen security measures to safeguard sensitive user
data and ensure compliance with data protection regulations. Implement encryption techniques, secure
authentication methods, and regular security audits to mitigate potential risks.
6. **Integration with Smart City Initiatives**: Collaborate with local governments and smart city initiatives
to leverage emerging technologies, such as Internet of Things (IoT) sensors and urban mobility platforms. This
integration can facilitate seamless data sharing, interoperability, and alignment with broader urban development
goals.
9. **Accessibility Features**: Incorporate accessibility features, such as voice-guided navigation, screen reader
compatibility, and alternative input methods, to ensure inclusivity for users with disabilities or special needs.
By implementing these recommendations, the bus tracking application can evolve into a comprehensive and
indispensable tool for improving public transportation services, enhancing passenger experiences, and
contributing to the development of smarter, more sustainable cities.
CHAPTER 9
REFERENCE
1. Websites:-
1. www.androidtutorials.com
2. www.progchamp.com
3. https://www.emarketinginstitute.org/
4. https://www.restolabs.com/
2. Books:-