Its my understanding - after reading of the Hobart incident - that the events occured at 3:30 AM so visual ID of the warship was impossible. In addition, the missiles that struck the warship were SPARROW radar guided air-to-air missiles fired by USAF F-4 Phantoms trying to shoot down low flying un-identified aircraft at night.
The Sparrow was not designed for ground or anti-ship attack. It does have a long range and can travel in excess of 20 miles. In Vietnam, the Sparrow had a failure rate of over 80% with many missile simply not locking on target or locking onto false targets such as clouds. I also understand that several other US warships were also the targets of miss-fired Sparrow missiles over the same period of time.
First, I can conclude that the incident was not intentional - in short the aircraft were not shooting at the warship. Second, I can speculate that the Sparrows were either:
1 - fooled by Vietnamese ECM into locking onto a larger target or ...
2 - malfunctioned and locked onto the warships - the missile uses a Semi-active homing radar system - following emissions either from the F-4 air-to-air targeting radar or from a similar broadcast bandwidth that may have from the ship.
An anti-air variant of the Sparrow (Sea Sparrow) has locked onto and struck other warships by accident during exercises (Turkish Nato training in the Med). We do not know if the Hobart was transmitting on frequencies used by the Sparrow to guide itself.
The USAF stood down after the second series of missile attacks and it appears that this type of incident did not re-occur. Thus, this is classified as fratricide but not a targeted incident in that the aircraft were NOT shooting at warships but other aircraft. Although, as I pointed out above it also could have been good ECM on the part of the NVA.
Finally, prevention of similar incidents requires good IFF, common communications, knowledge of weaponry being used so emissions that might be mistaken for targeting are minimized, and good equipment. The Sparrow is no longer in service but modern missiles have just as many holes in their programming that could allow similar incidents to occur.