ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/tcProps/readWrite.c
(Generate patch)

Comparing trunk/tcProps/readWrite.c (file contents):
Revision 1060 by mmeineke, Thu Feb 19 21:10:06 2004 UTC vs.
Revision 1085 by mmeineke, Fri Mar 5 03:10:29 2004 UTC

# Line 619 | Line 619 | void normalizeQ( double q[4] ){
619    for(i=0;i<4;i++)
620      q[i] /= qSqr;
621   }
622 +
623 + double scanSmallestZ(int startFrame){
624 +  double smallest;
625 +  int i;
626 +  
627 +  smallest = posArray[startFrame].Hmat[2][2];
628 +  for(i=startFrame;i<nFrames;i++)
629 +    smallest =
630 +      (smallest<posArray[i].Hmat[2][2])? smallest : posArray[i].Hmat[2][2];
631 +
632 +  return smallest;
633 + }
634 +  
635 + double calcAverageXY( double startTime ){
636 +  
637 +  int i, count, startFrame, startFound;
638 +  double avg;
639 +
640 +  startFound = 0;
641 +  startFrame = -1;
642 +  while( !startFound ){
643 +
644 +    startFrame++;
645 +
646 +    if(startFrame >= nFrames){
647        
648 +      fprintf( stderr,
649 +               "Start Time, %G, was not found in the dump file.\n",
650 +               startTime );
651 +      exit(0);
652 +    }
653 +    
654 +    if(startTime <= frameTimes[startFrame])
655 +      startFound = 1;
656 +
657 +
658 +  }
659 +
660 +  avg = 0.0;
661 +  count = 0;
662 +  for(i=startFrame;i<nFrames;i++){
663 +    avg += posArray[i].Hmat[0][0] * posArray[i].Hmat[1][1];
664 +    count++;
665 +  }
666 +  avg /= (double)count;
667 +
668 +  return avg;
669 + }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines