code: function(position1, velocity1, position2, velocity2) {
      var posDiff = mf.sub(position2, position1);
      var veloDiff = mf.sub(velocity2, velocity1);
  
      var zaehler = -mf.dot(posDiff, veloDiff);
      var nenner = mf.lengthSquared(veloDiff);
  
      return nenner === 0.0 ? undefined : zaehler / nenner;
    }
docs: Calculates the time of closest point of approach (TCPA) of two tracks.
  @method calcCPATime
  @param position1 {Vector3d} The position of track 1.
  @param velocity1 {Vector3d} The velocity of track 1.
  @param position2 {Vector3d} The position of track 2.
  @param velocity2 {Vector3d} The velocity of track 2.
  @return {Number} The time of CPA relative to now (0s) or undefined if CPA does not exists. Negative values show a CPA in the past
  @for motionpredict