Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSLM Final Project Dr. SAFE Group 9 B95902001 黃昱翔 B95902060 賈乃輝.

Similar presentations

Presentation on theme: "CSLM Final Project Dr. SAFE Group 9 B95902001 黃昱翔 B95902060 賈乃輝."— Presentation transcript:

1 CSLM Final Project Dr. SAFE Group 9 B95902001 黃昱翔 B95902060 賈乃輝

2 Motivation We have many car accidents every day and the reasons varies, such as drunk- driving, bad road condition, rule-violating, and so on.

3 Motivation To avoid car accidents, we must find some solutions which can help us avoid the cause of accidents and will not be too unacceptable for people.

4 Goal Develop a system that can Prevent drunk-driving Detect bad road condition, and Give suggestion of a safe driving speed given the road condition

5 Road Condition Alcohol Test GPS Data Random Specific Patterns Touch Screen 3D Accelerator Data Car Lock Bluetooth Recording Data base Query Check nearby Road Condition Detect Current Road Condition Car Computer Drawing TestWalking Test GUI User 3D- accelerometer GPS

6 System Components Drunk-driving prevention block Road condition detection and speed suggestion block Connected by bluetooth interface

7 Bluetooth Maintain the state of the program  Door_closed->door_open->car_on->car_off Rfcomm sockets  Like TCP Communicate with car computer (our notebook) A thread parallel the original (GUI) thread  Awaken only when the socket is readable or need to request sth.

8 Flow of events In DOOR_CLOSED state:  Start these two tests  If failed in one test => Quit  If success in both tests => REQUEST_OPENDOOR  Receive ACK and go to DOOR_OPEN state In DOOR_OPEN state:  Idle until the CAR_ON msg is received  Then go to CAR_ON state

9 Flow of events In CAR_ON state:  Road condition detection and speed suggestion  Terminate until CAR_OFF msg is received

10 Prevent Drunk Driving Check if the user can walk straight  Two threads: GUI and Accelerometer thread Acc. thread is busy reading the acc. file  Calculate the standard deviation all data collected (x-axis acc. data) If less than threshold => pass! Else => failed

11 Prevent Drunk Driving Touch the random points display on the screen  mousePressedEvent  mouseReleaseEvent  timer   If user can point to the target for 8 out of 10 tries=>passed  else=>failed

12 Road Detection and Suggestion Record the condition of the road driver had gone through. Use the data we have recorded before with the current detection to suggest the driver how fast he (she) should drive with to avoid danger.

13 Road Detection and Suggestion 3D accelerator:  To detect the current road condition. We don’t use derivation but the difference between current and old values.  If the difference is too big, store in a variable as a part of the data for the road to record later.  If there is a obvious and last for a while, we see it as an action of turning. And two turning action forms a “road” in our definition.

14 Road Detection and Suggestion With the observation of the turning action, we call GPS to define where we are and record the data we have observed. The format of each road data in the file is like:  [GPS-address] [road-detection] [GPS-address]

15 Road Detection and Suggestion GPS  Call GPS to get address of the place turning action happens as ending an old road and starting a new road.  Search data in the file with the address and using the one-dim polynomial functions to find the closet data in the file. y infile = mx infile + c, this represent the road by the two point we have in file. Use the data whose function is the closet to  y data – mx data - c=0

16 Road Detection and Suggestion Combine the data we have recorded and the current difference of the acceleration we can suggest the driver how fast he (she) should drive according to the road condition.

17 Road Detection and Suggestion Summarize

Download ppt "CSLM Final Project Dr. SAFE Group 9 B95902001 黃昱翔 B95902060 賈乃輝."

Similar presentations

Ads by Google