Context : The measurement of the scale of the baryon acoustic oscillations ( BAO ) in the galaxy power spectrum as a function of redshift is a promising method to constrain the equation-of-state parameter of the dark energy w . Aims : To measure the scale of the BAO precisely , a substantial volume of space must be surveyed . We test whether light-cone effects are important and whether the scaling relations used to compensate for an incorrect reference cosmology are in this case sufficiently accurate . We investigate the degeneracies in the cosmological parameters and the benefits of using the two-dimensional anisotropic power spectrum . Finally , we estimate the uncertainty with which w can be measured by proposed surveys at redshifts of about z = 3 and z = 1 , respectively . Methods : Our data is generated by cosmological N-body simulations of the standard \Lambda CDM scenario . We construct galaxy catalogs by “ observing ” the redshifts of different numbers of mock galaxies on a light cone at redshifts of about z = 3 and z = 1 . From the “ observed ” redshifts , we calculate the distances , assuming a reference cosmology that depends on w _ { ref } . We do this for w _ { ref } = -0.8 , -1.0 , and -1.2 holding the other cosmological parameters fixed . By fitting the corresponding ( an ) isotropic power spectra , we determine the apparent scale of the BAO and the corresponding w . Results : In the simulated survey we find that light-cone effects are small and that the simple scaling relations used to correct for the cosmological distortion work fairly well even for large survey volumes . The analysis of the two-dimensional anisotropic power spectra enables an independent determination to be made of the apparent scale of the BAO , perpendicular and parallel to the line of sight . This is essential for two-parameter w -models , such as the redshift-dependent dark energy model w = w _ { 0 } + ( 1 - a ) w _ { a } . Using Planck priors for the matter and baryon density and \Delta H _ { 0 } = 5 \% for the Hubble constant , we estimate that the BAO measurements of future surveys around z = 3 and z = 1 will be able to constrain , independently of other cosmological probes , a constant w to \sim 12 \% and \sim 11 \% ( 68 % c.l . ) , respectively . Conclusions :