sot/starcheck — pull request #17 by jeanconn (2012-08-09 17:45:07+00:00)
Title: Issue 16 redo normalize target quaternion

Hotfix to Close #16

Add an "abs" to the code that calculates the 4th component of the target quaternion to avoid ""Can't take sqrt of -1.05139e-10" errors.

my $q4_obc = sqrt(abs(1.0 - $c->{Q1}**2 - $c->{Q2}**2 - $c->{Q3}**2));

Also normalize the constructed quaternion to match expected OBC quaternion from Target Reference subfunction.