We show how the virial theorem can be applied to the hot gas in clusters of galaxies to obtain a yardstick , which could then be used to determine cosmological parameters . This yardstick relies on the assumptions of hydrostatic equilibrium and that the gas fraction is approximately constant . The constancy is checked empirically from a local population of clusters . By using the observed parameters consisting of temperature , surface brightness and radial profile \beta , one can calculate the expected core radius . Comparing it to the observed angular size , one can in principle calibrate the cosmological deceleration parameter q _ { 0 } . We test this method on a small sample of 6 clusters , and show its promise and accuracy . The preliminary implications would be to suggest q _ { 0 } \approx 0.85 \pm 0.29 with 1 - \sigma statistical error bars , with several systematic uncertainties remaining . Taken at face value , this would argue against a cosmological constant . The method is robust to errors in the measurement of the core radius as long as the product of the central density and the core radius squared \rho _ { 0 } r _ { c } ^ { 2 } are well determined . New lensing and X-ray data can dramatically improve on the statistics .