Accident Detection and Disaster Response Framework Utilizing IoT

The internet of things (IoT) leads the noteworthy edges above customary information and communication technologies (ICT) for Intelligent Transportation Systems (ITS). The progression in the transportation system, the increment in vehicles and the accidents happened on the roads are cumulative up to an alarming situation. Additionally, 1.256 million people expire by the road bumps every year and it is very problematic to find the precise accident location of the user. If an accident occurs, the survival rate of the victim increases, if he is given instantaneous remedial assistance. You can provide remedial assistance to the victim only when you identify the precise location of accident. The main persistence of this system is to identify an accident and find the location of the user. After tracing the location, the system will search nearby hospitals for remedial treatment. System will send a message that contains user's current location, to the nearby hospitals in case of an emergency. System will acquire recommended contacts from the cloud and also send message to them for user’s support by using API. If the user is safe, he can cancel the message that is being sent to the nearest hospital and the recommended contacts. This system will help the users in saving their lives within minimal


I. INTRODUCTION
Nowadays, researchers have described a lot of benefits of using smart cell phones in accidents and report systems in numerous articles. The main reason of using such type of software in a smart cell phone is because of their installation in vehicle is much more expensive than a smart cell phone. Smart cell phones are always present with their possessors and can signify an accident, even though if the vehicles somehow are not engaged in the accident. Plus smart phone uses integrated sensors [17] (such as accelerometer, GPS, gyroscope, etc.) which help in getting a rich variety of data.
Vehicle accidents are an unavoidable issue in your routine life. The recklessness of driver causes numerous vehicle accidents. Additionally, these accidents produce a financial and social damage as well as in worst case scenario, maybe the end of a precious human life [1]. The security of driver and traveler can be endangered due to different factors that lead up to a mishap. Besides this, there are huge time difference between the hour of mishap and when the crisis administrations arrive at the point of accident. Accidents are identified by utilizing three sensors for example accelerometer, force resistive sensor and gyroscope to get precise outcomes [2]. More often, we can't find the accurate location of the accident when we don't have the exact idea where the accident has occurred. We can utilize the essential microcontroller AT89S52 and assembly programming for improved precision and GPS and GSM module to follow the vehicle anyplace on the globe [3]. Moreover, report it to the closest remedial care center [4] to save precious human life.
We can lessen the human demise proportion and give appropriate assistance in the most barren regions by presenting a solution to detect the location of accidents [5]. The data is transmitted to the recommended contacts immediately when the accident happens.
The Internet of Things (IoT) has seen development in the past few years, with upgrades in a few unique applications in the armed, naval, intelligence transportation and many other fields which belongs to the safety and convenience of human beings. In spite of these facts the IoT brings huge points of interest over customary information and communication technologies (ICT) for Intelligent Transportation Systems (ITS), anyhow accidents are quiet very common and are increasing day by day [19]. These accidents can be recognized by utilizing different applications or some other vehicle communication system. Although, the algorithms generated by the machine can straightforwardly find out the accidents [20] by using the speed of the vehicle or by some sudden jerks. Accidents or different occurrences can be viewed as irregularities in rush hour jams, information and machine algorithms [21,6] can be utilized to distinguish these exceptions. Upon exposure to the unwanted event, the incoming drivers can be warned about that mishappening, and this will support the users take certain measures to avoid greater disaster.
GPS works as a vibrant piece of the automobile that gives how far the vehicle is moving, at what time and how close it is to its destination. This system helps to identify an accident from the location of the automobile by using GPS speed information and corresponding maps algorithms and send out the accident site to an Alert Service Center [3,7]. The position information will be utilized in the corresponding map algorithms to find out the automobile position. Whenever, the speed will slow down beneath the predetermined safe-limit, the system will identify the case as an accident. Also, certain A couple of prevailing works have exhibited an accident finding system on an Android smart cell phones. When the accident is recognized, a warning is sent to every vehicle in the vicinity, in addition to that, a message or voice call is also transmitted to the user's recommended contacts. Moreover, to regulate the false-positives, these warnings are only conveyed if the user is unable to interfere with the commencement instruction, which starts with the accident detection algorithm [9,10]. This will quickly alert the closest police headquarters as well as the remedial clinic and send emergency messages for assistance.
In this article, we struggled in recognizing the accident and finding out the precise location of the user. Relevant to the subscribed location, the system will scan close by emergency clinics and hospitals for remedial treatment. System will deliver message that holds client current location to the nearby emergency clinic for assistance and remedial treatment. System will acquire the contacts of recommended personnel from the cloud and will send the message to client's supporter for assistance that holds user present location. On the other hand, if the drive is safe, he can also cancel the message that is being sent to the closest remedial clinic and recommended contacts. This system will assist the user in saving their life. Clients could be efficiently found and get remedial treatment in minimal time.
This article is prearranged as follows. Segment 2 describes material and methods portion. Segment 3 describes the experiments and the results. Segment 4 examines the results. Segment 5 offers some concluding observations and suggestions for future work.

A. Android Studio
In this article, we utilize Android Studio [11][12] to develop this system and perform experiments. Android Studio is the state Integrated Development Environment (IDE) used for improvement in an Android application. It is pattern on the IntelliJ IDEA, the Java coordinated advancement requirement for programming, and have all the code modifying and engineer devices. To help out the application progression through the Android operational framework, Android Studio utilizing a Gradle-based framework, emulator, code formats, and GitHub joining. It is much more easy, flexible and using Android Studio we can even develop complex android based applications. It also provides us built-in debugging and testing features to make our code clean and to run our applications smoothly. The individual undertaking in Android Studio has minimum one system with source code and asset report. These techniques incorporate the Android application modules, Library modules, and the Google App Engine modules. The Android Studio is using an Instant Run feature to push code and resource changes to currently running application on real device or android emulator. A code proofreader encourages the programmer with composing code and delicate code execution, scattering, and broke down. Applications developing in the Android Studio are proceed in the Google Play Store for further arrangement into the APK group for consistence. Android Studio provide us to generate Android App Bundle file to publish our application on Google Play Store. Android App Bundle is new format that includes all code, resources, files, build settings etc. of your application. When a user tries to download applications form Google Play Store, it generates differ APK and deliver to the user according to his device.
Android Studio 3.5 as shown in Fig. 1 has autorecommended memory settings. Truth be told, when the Android Studio perceives that your task requires more RAM, it is naturally increment in the memory store size, however it likewise tells the android application developer for the equivalent.

B. Java and XML
Java is a far-reaching programming language that is plainly anticipated for the use of communicating the requirement of web. It is a supremely stylish programming language for Android smart cell phone applications. Furthermore, it is the best upheld in the advancement of gadgets and the web of things. Java remained adjusted to have the aspect and impression of the C++ language, however it is simple to develop and execute the items arranged programming model. Java can be developed to create entire applications that might keep running on an individual PC or be circulated among servers and clients in the system. Similarly, it can be used to assemble the minute application module or gadget for its usage as a major aspect of the site page. Java is platform of independent language which means that Java can be installed and run on almost every operating system. More than 3 billion devices are using Java these days and it is growing day by day. Java is pure object-oriented language and it also supports multithreading. Finally, Java is much more secure than other different languages.
Extensible Mark-up Language (XML) is the language that is much like HTML, but XML is much more flexible than HTML. XML provide us to make user defined tags. XML is designed to store and ship information and it is arranged to be self-descriptive. That characterizes a lot of norms for encoding, archives is an example that is both comprehensible and machine-discernible. The purpose for creating XML emphasizes on its effortlessness, sweeping report, and its easiness for the usage on the Internet. It is a textual data format with Unicode providing assistance from various human languages. XML is intensively utilized as an arrangement for www.ijacsa.thesai.org report stockpiling and handling, both on the web and disconnected PC depending on global measures. Forward and in reverse resemblance is generally simple to keep up in spite of changes in DTD (Document Type Definition) or Schema. It very well may be refreshed steadily. Although, plan of the XML accentuation on records, the language is generally utilized for the outline of discretionary information structures, e.g. utilized in web administrations.

C. Device Shake Detection
Motion sensor devices are helpful in inspecting device movement, e.g. incline, wobble, pivot or swipe. The motion is generally a perception through user contribution (for instance, user guiding a vehicle in the game or a client controlled ball in a game), however it can likely be a sensation of physical condition where the device is stationary (for instance, it will move with you while you are travelling on your vehicle) [13]. In the principal circumstance, you are checking measures, in esteem to the device's indication or your system's alert. In the 2 nd case you're observing mobility with respect to the world's casing of reference. The mobile sensors without someone else's input are not normally utilized as screen gadget position, however it can be functional with different sensors, e.g. the Geo-magnetic field sensor, to determine the device's location or shake detection. In order to avoid unnecessary false alarm, this framework check the intensity of vibration and threshold value of force. If the threshold value of force is less than 10000 Newton (N), our framework does not detect any accident. If the threshold value of forces is greater than 10000 Newton and user is safe, then he can also cancel the alarm and help message. Fig. 2 demonstrates the real-world implementation that device shake sensors then it works when accident is detected.

D. Firebase Realtime Database
In this paper, we used the firebase real-time database as shown in Fig. 3 for the storage and recovering data [14]. Google Firebase is a Google-supported application advancement programming that enables designers to create iOS, Android and Web applications. Firebase gives apparatus to following investigation; revealing and fixing application crashes, making advertising and analyzing items. The Firebase Realtime Database is a cloud-facilitated NoSQL database that enables information to be put away and adjusted between clients progressively. The information of all customers is synchronized continuously; this is advantageous for the case when the application is disconnected. Firebase Cloud Messaging (FCM) is a cross-stage informing instrument that lets venture securely get and convey messages on iOS, Android and the web at no expense. Firebase Authentication makes it simple for engineers to construct secure confirmation frameworks and amplifies the sign-in and mix involvement for clients. This element offers a total personality arrangement, supporting email and secret word accounts, telephone authentication, just as Google, Facebook, GitHub, and Twitter login.
Here, we used Firebase real-time database [14] to store the supporter contact details and accident location, where we verified 32 casual accident locations and the database model was designated as demonstrated in Fig. 4.

E. Google Places API
Google Places API is the facility that is presented by Google which processes data about your closest places by examining the latitude, longitude and range of territory. It is a service that provides information about location [15]. You can include or remove a spot from their "places service" as well. Google Places API provides many built-in features to facilitate its users. The arrival of Android places API encourages the information access as well as maintains a strategic distance from the engineers to monitor latitude and longitudes [22]. Prior to access place information in Android, one needs to get all the data from a web administration by passing different parameters like latitude and longitudes to it. The API utilized around past was Google Maps API, but the new Google places API is amazing enough to recognize your current location, nearby places data and recover all the travel information arithmetically. We use Google Places API in our framework to get exact location of the user when he met with accident. Fig. 5 demonstrate the key code segment, how we are getting data of nearby hospitals from the firebase database.

F. GSM and GPS
GSM is developed to send and gather information from a focal unit through an information call. GPS is a satellite way system that attires zone and time data in all climate circumstances to the client and used to decide the ground area www.ijacsa.thesai.org of an article. There are various electronic gadgets dependent on GPS, while GSM innovation is typically utilized by cell phone gadgets. On the off chance that your cell phone has a GPS chip, it must be on the off chance that you need to find it utilizing real GPS satellites [23]. On the off chance that your cell phone doesn't have a GPS chip, or if it is killed, at that point GSM restriction will triangulate the position utilizing the three nearest GSM base stations. Limitation of utilizing GSM [14] will work to convey your general position, and it likewise consume your phone battery, however it can't give exact position data.
To find out the straight path in a graph we utilized the Dijkstra's algorithm, as shown in Fig. 6. GPS is utilized in Dijkstra's algorithm to acquire the existing position of respective node. Distance may also be calculated from its position. The essential part of the algorithm is to use what controls to traverse the functionality at Google Maps, Apple Maps, at this juncture, Open Street Map and any additional ordinal map that perhaps you may use. Yes, it is not quite the same algorithm that controls the navigation application nowadays, but exploration and additional algorithms are an addition of the unusual Dijkstra's algorithm. Dijkstra's Algorithm is used by Google maps to find the shortest path and nearby locations from specific place. It's also used to calculate the distance between edges. By using Dijkstra's Algorithm, Google places API suggests us nearby places/hospitals from the accident location for medical treatment. Fig. 6 demonstrates the Dijkstra's algorithm is utilized to locate the direct track in the graph.

G. Accident Data Interpretation
The data which is sent as Short Message Service (SMS), will be acknowledged by nearby hospital and user's supporter [7]. A suitable system will be inscribed so that the accident site is inevitably acquired and sent to the nearby hospital and user's support. If the driver is safe or accident is falsely detected, he can cancel the SMS. Fig. 7 demonstrate the flow chart of the system.

III. EXPERIMENTS AND RESULTS
Here, in this fragment, the execution of the anticipated system and precision of this recognition is to be examined. To achieve the assessment procedure [16], we have smart cell phone which is always in the pocket of the user. It is renowned that the number of individuals engaged in this exercise and those who are involve in the test panel both are four. However, the four individuals in the test group and that in the exercise panel both are different. The data assimilated from the four individuals in the exercise panel is used to find out the threshold settings, while the others, four persons who are in the test panel are for efficiency validation. Furthermore, the projected accident detection and disaster response framework is applied in the Huawei Mate 10 Lite smart cell phone with the following characteristics.

A. Real-World Implementation
On this stage, application will get supporters information and save all the information on the cloud for future use. At this stage, user must provide 2 emergency recommended contact numbers [24,25]. If user already saved the emergency contact number on the cloud, there is no need to save number on the cloud every time they access the system.
He can update the emergency contact numbers at any time by giving new numbers by clicking on "update numbers" button. Fig. 8 demonstrates the real-world implementation that a user can save his information and emergency contact numbers on the cloud. www.ijacsa.thesai.org After updating all the information, user should activate the application by clicking on "activate" button. This action is required for the first time only. After activation, system will automatically detect accidents and show an alert box to the user before sending alert message to the recommended contacts and nearby hospitals. Fig. 9 demonstrates the real-world implementation that the message will be sent to the nearby hospitals for emergency help.
If the driver is safe, he can cancel the alert box which stops the deliverance of the "help message", otherwise system will send "help message" to nearby hospital and recommended contacts. Fig. 10 demonstrates the message sending process to nearby hospitals after getting nearby hospitals data. Fig. 11 demonstrates the information transfer and reaction time on the cloud. Time taken by four different android devices to transfer data to the cloud, in milliseconds (MS), to their reaction time on the cloud, with respect to the incident and recommended contact's data.

C. Average Information Transfer and Reaction Time
Average information transfer and reaction done in milliseconds (MS) from online storage. Fig. 12 demonstrates the information transfer and reaction time from online storage.

D. Comparison
Our purposed system provides numerous features. The difference of our projected system is shown in Table 1. Our proposed system is compared with other studies Paper A [17] and Paper B [18].
The purposed framework gives numerous highlights. The correlation of our proposed framework is shown in Table 1. The proposed framework is compared with different papers (Paper A [17] and Paper B [18]).  According to the victim's opinion, in case of a mortal accident, the injured person commonly is not capable to contact the rescue by himself, especially in those areas which are not located in the city or not much populated. In these circumstances, the intended system will robotically detect the accident and will send a message that contains user's current location to nearby hospital for remedial treatment. Sending a disaster alert is quite easy and suitable because all required functionalities squat together. In case of other emergencies, the system also provides capabilities to send request to the anticipated emergency service. Whereas, according to the responder's opinion towards causality, the system will display the precise site of the causality, and it is very beneficial to reach at the location in a minimal time and reduce the response time as well. So that, the authorities will be capable to trail the victims in real time and relief them as rapidly, ensuring in an effective usage of the assets of emergency services.
For instant, let us discuss the A1 performance of the system in previous papers. In paper A and B there are no accident force measurement, but in this article if the force is less than 10000 N, it would not be considered as an accident. In paper B, it takes 2 to 3 minutes to send a voice or text message to the hospital and desired contact but this system send message alert in 15 seconds. Our application is more user friendly than other applications, as it does not require log-in and easy to use. Moreover, other papers don't have support notification features & have not any database attached with their systems.
This study is based upon the shake detection sensors and shows that accidents can be detected by using shake sensors. The person who is using a vehicle can use projected system throughout their journey, and if there are some accident, the system will get the precise accident location by GPS and search for nearby hospitals by "Nearby Places API" and send all the information to the nearly hospitals as well as to the user's recommended contacts. Basically, when the user falls down by some means, the shake sensor will get some information from cell phone. This is due to the reason that when the cell phone having this system is dropped, the system's shake sensor feels it seriously and becomes activated due to this jerk. Since noticing the normal state as an accident is more desirable than identifying the accident as a normal state, so this can be clinched that the system represents an improved work, and this can be utilized in case of an accident exposure. When there is no accident, the system will detect it as an accident more frequently than vice versa.

V. CONCLUSION
The Internet of things (IoT) is a system of interrelated computing devices, mechanical and digital machines provided with unique identifiers (UIDs) and the ability to transfer data over a network without requiring human-to-human or humanto-computer interaction. IoT leads the noteworthy edges above customary information and communication technologies (ICT) for Intelligent Transportation Systems (ITS). The progression in the transportation system, the increment in vehicles and the accidents happened on the roads are reaching to an alarming situation. In this paper, we configure a system to identify a road accident and to find the particular site of the accident precisely. To find the precise site of the user, the application uses Global Positioning System. After getting the site of the user, the system will locate the nearby hospitals with the support of Google nearby Places (API) for remedial treatment. System will directly transmit messages containing the user's present site to a nearby hospital for remedial help. The system will get cell numbers of the recommended contacts from the cloud and send a "help message" containing the user's current location to the contacts for assistance using APIs. If the driver is unharmed, he or she may cancel the message that is being sent to the nearby hospital and recommended contacts. This system will help in saving the life of the users and make secure them from any accidental risk. The user can get remedial care in a minimal time and the user can easily be treated without any further due.

VI. AUTHORS' CONTRIBUTIONS
Jingxia CHEN and Tariq Mahmood carried out the best way in making this system for the security purpose as well as to secure the lives of the human beings. I'm personally very thankful to J.C. and T.M. who delivered their best to fulfill the requirements of my idea in a very efficient way and in syndicating the data. A.A participated in experiment design and manuscript drafting. All authors read and are agreed with the final document.