Click here to Skip to main content
15,891,951 members
Please Sign up or sign in to vote.
4.00/5 (2 votes)
See more:
The accelerometer data and Air Bag Noise information are stored in a MySQL database table.Through the code I need to connect with that database and get those two information and check them and detect that there is an accident.

eg: if Air Bag Noise > 16dB and the accelerometer shows a significant speed change we can say that is an accident.

Then send that notification to an Android phone through a Web Service.
If anyone have an idea about the code please reply

Thank You.
Posted
Comments
OriginalGriff 21-Jan-12 9:37am    
What is the problem? It sounds pretty simple, how far have you got? What have you done so far?
And why would you want to send a message to say "this car has had an accident"? If you send it to the driver, I think he probably knows already, and if you send it to his nearest and dearest then you may be causing them considerable worry and distress.
Sergey Alexandrovich Kryukov 21-Jan-12 13:50pm    
It would be simple if not the issues of real-time which may indirectly haunt the project. Please see my concerns in my answer.
--SA
Kim Togo 21-Jan-12 11:15am    
That sounds like a nice project :-)
Sergey Alexandrovich Kryukov 21-Jan-12 13:51pm    
Perhaps you'll become less enthusiastic if you look at my answer... :-)
--SA
Kim Togo 22-Jan-12 8:08am    
I have misread the question from OP.
I thought the Android phone should detect the accident and sent the accident to a web service...

This does not sound like something well defined, not even the whole idea.

You need to give us the idea on what computer system should be installed in the car and connected to the car equipment. As far as I know, nearly all cars are using the CAN bus, see http://en.wikipedia.org/wiki/CAN_bus[^].

So, the car's on-board computer is connected to the number of car devices and runs some real-time system, apparently. Theoretically speaking, you can replace the whole system and run a Web Service on it. This is highly questionable, even if you are only working at the very rudimentary prototype. Just one note: all Web technologies had never been even close to the real-time, and some reasons are really fundamental, the behavior of the note in the network is fundamentally probabilistic due to the internet protocols.

Most likely, you can say that you are going to use yet another computer monitoring the acceleration and air bag noise. I say "yet another" because this computer should be attached to the CAN bus as well. I have no idea what CAN controller are you going to use, perhaps a wireless one; I just never heard about such thing. OK, let's say you are connecting to the CAN bus. Still, this is very questionable as the concern is the possible disruption of the car's real-time operation. The problem is: CAN is relatively slow. I was always amazed by the fact how a vehicle can react to the events withing required latency (as all hard real time systems do), but it can. It looks like the embedded system is really licked clean in terms of performance, so any additional host indirectly taking out some extra resources might disrupt the real-time operation.

See also:
http://en.wikipedia.org/wiki/Real-time_computing[^],
http://en.wikipedia.org/wiki/Real-time_operating_system[^].

Please don't get me wrong: I don't say this is impossible. I only suspect that the problem might appear more serious that you might think of by orders of magnitude. :-)

—SA
 
Share this answer
 
v2
Comments
Espen Harlinn 22-Jan-12 7:18am    
Good points :)
Sergey Alexandrovich Kryukov 22-Jan-12 13:06pm    
Thank you, Espen.
--SA
NeptuneHACK! 22-Jan-12 16:48pm    
5
Sergey Alexandrovich Kryukov 22-Jan-12 17:01pm    
Thank you,
--SA
I have misread the question from OP.
I thought the Android phone should detect the accident and sent the accident to a web service...

But it is a start :-) Mono for Android[^], from there you can create Android apps in C#.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900