accelerometer readings

hi, i am using accelerometer in my quad copter to stable it, i got coding from some other forum...

//Analog read pins
const int xPin = 0;
const int yPin = 1;
const int zPin = 2;

//The minimum and maximum values that came from
//the accelerometer while standing still
//You very well may need to change these
int minVal = 265;
int maxVal = 402;

//to hold the caculated values
double x;
double y;
double z;

void setup(){
Serial.begin(9600);
}

void loop(){

//read the analog values from the accelerometer
int xRead = analogRead(xPin);
int yRead = analogRead(yPin);
int zRead = analogRead(zPin);

//convert read values to degrees -90 to 90 - Needed for atan2
int xAng = map(xRead, minVal, maxVal, -90, 90);
int yAng = map(yRead, minVal, maxVal, -90, 90);
int zAng = map(zRead, minVal, maxVal, -90, 90);

//Caculate 360deg values like so: atan2(-yAng, -zAng)
//atan2 outputs the value of -? to ? (radians)
//We are then converting the radians to degrees
x = RAD_TO_DEG * (atan2(-yAng, -zAng) + PI);
y = RAD_TO_DEG * (atan2(-xAng, -zAng) + PI);
z = RAD_TO_DEG * (atan2(-yAng, -xAng) + PI);

//Output the caculations
Serial.print("x: ");
Serial.print(x);
Serial.print(" | y: ");
Serial.print(y);
Serial.print(" | z: ");
Serial.println(z);

delay(100);//just here to slow down the serial output - Easier to read
}

so when i am keeping accelrometer still horizontally it is giving values
x=36.10
y=35.12
z=45.84
why not is is giving zero, can anybody help me what should i change in the program to get the correct value.

I don't have an Arduino yet but I can relate something you might want to try. In a previous life I used to write software for scientific instruments. One that we used required stabilising ambient oxygen readings for two minutes at a flow rate of 24l/s. That established a base rate which was used to compensate during the experiment. This got me thinking about something; base rates.

If you don't mind my asking but what readings do you get with your quad-copter stationary on the ground without the motor running and then stationary with the motor running but not lifting. Could that reveal anything useful. Sorry, that's the best I can chime-in with.

How about telling us which accelerometer you are using and/or supplying a link to the data sheet?
Accelerometers I am familiar with report in G's (gravity), not degrees.