A methodology for determining spacecraft attitude and autonomous calibration of star camera, both independent of each other, is presented. In this paper, both attitude estimation and star camera calibration is done together, independent of each other, by directly utilizing the star coordinate in image plane and corresponding star vector in inertial coordinate frame. Both radial and decentering distortion of lens accounted in the analysis. Satellite attitude, camera principal point, focal length (in pixel), lens distortion coefficients are found by a simple three step method. In the first step, camera intrinsic parameters are estimated using a closed-form solution assuming lens is distortion free. In the second step lens radial distortion coefficient is estimated by linear least squares method using the solution of the first step to be used in the camera model that incorporates only radial distortion. These steps are applied in an iterative manner until the radial distortion coefficient converges. In third step, lens decentering distortion coefficients are calculated using the estimated camera parameters and lens radial coefficient estimated in the previous steps. The whole procedure is fast enough for onboard implementation.