FractalUK/KSPInterstellar — pull request #31 by toadicus (2014-03-21 00:37:15+00:00)
Title: FNImpactorModule revision to improve detection of impacts from complex craft

Current KSPI impact detection uses Part::onJustAboutToBeDestroyed, which is among the last events fired during a part's collision. Furthermore, the current implementation only watches the root part for a given vessel.

This is problematic given the way KSP tracks vessel velocity during an impact, especially for larger craft, where changes in design or orientation may necessitate that the root part's collision is not handled during the first update when a vessel crashes. For parts collisions handled in updates after the first collision in a crash, KSP registers the vessel's velocity as zero, preventing the impactor code from running.

This revision ameliorates this problem by watching all part collisions and crashes and filtering out irrelevant events before determing the scientific value, if any, and recording it.