Click here to Skip to main content
11,705,473 members (45,626 online)
Rate this: bad
Please Sign up or sign in to vote.
See more: C#
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 21-Jan-12 3:03am
OriginalGriff at 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.
SAKryukov at 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.
Kim Togo at 21-Jan-12 11:15am
That sounds like a nice project :-)
SAKryukov at 21-Jan-12 13:51pm
Perhaps you'll become less enthusiastic if you look at my answer... :-)
Kim Togo at 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...
SAKryukov at 22-Jan-12 17:06pm
Actually, the question is not quite clear. Some devices running Android could certainly use internal accelerator, but hardly the air bag noise. :-)

Even with the accelerator: you see, measured acceleration also can be very far from valid. If you solidly bracket the device to the car, the reading still could be considered as reliable (if this device survives the crash :-), but if one, say, hand-holds it, the reading will be strongly dumped...

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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[^].

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:[^],[^].

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. Smile | :)

Espen Harlinn at 22-Jan-12 7:18am
Good points :)
SAKryukov at 22-Jan-12 13:06pm
Thank you, Espen.
NeptuneHACK! at 22-Jan-12 16:48pm
SAKryukov at 22-Jan-12 17:01pm
Thank you,
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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 Smile | :) Mono for Android[^], from there you can create Android apps in C#.

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

  Print Answers RSS
0 OriginalGriff 229
1 Sergey Alexandrovich Kryukov 136
2 ppolymorphe 68
3 Inimicos 60
4 ProgramFOX 50
0 OriginalGriff 9,053
1 Sergey Alexandrovich Kryukov 8,347
2 CPallini 5,189
3 Maciej Los 4,726
4 Mika Wendelius 3,626

Advertise | Privacy | Mobile
Web03 | 2.8.150819.1 | Last Updated 22 Jan 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100