The Amadou Diallo case was a cultural screw up. The guy was from Africa. When confronted by the cops in Africa you reach for identification papers. When confronted by cops in NYC you reach for nothing and keep your hands in plain sight.
And the Patrick Dorismond case was not.
The very nature of undercover police work tells me that there is a good possibility nobody in the car knew who those undercover officers were. That case in Georgia a few weeks ago involving the 92 year-old woman who shot a couple of cops breaking into her house is a good example of what can happen in situations like this.