Accelerometer (LSM303) with arduino UNO HELP!!!!

I HAVE TO FIND VELOCITY FROM ACCELEROMETER , the problem is the angles of my accelerometer which it change my velocity values

void loop()
{

accelerometer.read();

acc111.x = acc1122.x;
acc111.y = acc1122.y;
acc111.z = acc1122.z;

acc1122.x = accelerometer.a.x;
acc1122.y = accelerometer.a.y;
acc1122.z = accelerometer.a.z;

acc3.y = acc111.y;

diffb.x = diffa.x;
diffb.y = diffa.y;
diffb.z = diffa.z;

diffa.x = acc1122.x - acc111.x;
diffa.y = acc1122.y - acc111.y;
diffa.z = acc1122.z - acc111.z;

avg = (acc111.y + acc1122.y + acc3.y )/3;

int angle = map (avg ,280,-280,-90,90);

//this is my calculations to find the velocity , i don't know if it's correct
//i put the time the same of the delay time it is correct ?

velocity_f = diffa.y *0.2 + velocity_i;

velocity_f = velocity_f * sin (angle);
velocity_f = abs (velocity_f);
velocity_i = velocity_f;

Serial.println(velocity_f);

How i calculate the velocity from accelerometer lsm303...