A GENERALIZED METHOD OF COMPUTING SECOND DERIVATIVE OF GRAVITY FIELD