On the possibility of determining the parallax of certain eclipsing variables and spectroscopic binaries