3_PowerRadiated/measuredPowerLienardWiechert/measuredPowerLienardWiechert.c
//calculate the angle between the acceleration vector (pointing towards the centre) and 
//the unit vector pointing towards the observer.
calculate the angle between the acceleration vector (pointing towards the centre) and
the unit vector pointing towards the observer.
calculate the angle between the acceleration vector ( pointing towards the centre ) and the unit vector pointing towards the observer .
double calculateTheta(double *accelVec, double *unitVec) {
  double dotProduct = accelVec[0] * unitVec[0] + 
                      accelVec[1] * unitVec[1] +
                      accelVec[2] * unitVec[2] ;
  double accelMag = sqrt(pow(accelVec[0],2.0) + pow(accelVec[1],2.0) + pow(accelVec[2],2.0));
  double theta = acos(dotProduct/accelMag);
  return theta;
}
double calculateTheta ( double * accelVec , double * unitVec ) { double dotProduct = accelVec [ 0 ] * unitVec [ 0 ] + accelVec [ 1 ] * unitVec [ 1 ] + accelVec [ 2 ] * unitVec [ 2 ] ; double accelMag = sqrt ( pow ( accelVec [ 0 ] , 2.0 ) + pow ( accelVec [ 1 ] , 2.0 ) + pow ( accelVec [ 2 ] , 2.0 ) ) ; double theta = acos ( dotProduct / accelMag ) ; return theta ; }
calculate the angle between the acceleration vector (pointing towards the centre) and
the unit vector pointing towards the observer.
calculate the angle between the acceleration vector ( pointing towards the centre ) and the unit vector pointing towards the observer .