varenius / salsa

Code developed for the 2.3m radio telescopes SALSA in Onsala, Sweden
MIT License
16 stars 6 forks source link

Simple tab: Observing while slewing is allowed #72

Closed maltesk closed 2 years ago

maltesk commented 2 years ago

Describe the bug In the Simple tab, I can make a measurement on the fly while slewing, and the results can be confusing.

To Reproduce From the Simple tab, choose different targets and click GO. Start a measurement using the Start button. A spectrum is shown. Check the result of the measurement. A measurement has been carried out, but is wrongly labelled. If I'm slewing to the Sun. the label is the Sun with its position. If I'm slewing to a galactic 140 or 100 deg, the label is the current position at the end (I think) of the observation

Expected behavior Either this should not possible or I get an error message saying it's not.

Desktop (please complete the following information): Windows 10, Chrome 95.0.4638.69

varenius commented 2 years ago

I think this was originally seen as a hand-on "feature", i.e. that it is up to the user to only measure while tracking. But I can see this is a problem, especially after deciding that "Stop" should not be warning-colored as per #73. I think it makes sense to restrict so that one can only start a measurement while tracking.

varenius commented 2 years ago

I think that to solve this, we also need some indication of the telescope status. I propose adding a text-field to the Advanced tab to show "Telescope status: ____" where the status can be "IDLE" = not doing anything, "SLEWING"=moving to target, and "TRACKING"= on source. Then, the "Measure" can be enabled by the UI timer only when status == tracking.

varenius commented 2 years ago

Proposed solution implemented in 4052da8. Should work.