wose / satnogs-monitor

Terminal UI monitor for your SatNOGS ground station.
GNU General Public License v3.0
78 stars 5 forks source link

RotCtl delay needed #26

Closed jwcutler closed 3 years ago

jwcutler commented 3 years ago

I had to slow down the update rate for RotCtl for proper rotator position queries. It might be useful to make the sleep duration an argument. Thanks!

index fe7f924..3802236 100644
--- a/monitor/src/main.rs
+++ b/monitor/src/main.rs
@@ -117,7 +117,7 @@ fn run() -> Result<()> {
             while let Ok(pos) = client.position() {
                 log::trace!("RotCtl: {} / {}", pos.0, pos.1);
                 match tx.send(Event::RotatorPosition(pos.0, pos.1)) {
-                    Ok(_) => thread::sleep(std::time::Duration::new(1, 0)),
+                    Ok(_) => thread::sleep(std::time::Duration::new(3, 0)),
                     Err(e) => {
                         log::error!("Failed to send rotator position: {}", e);
                         break;
wose commented 3 years ago

Hi,

thx for reporting this. Have you any insight on what's the bottleneck here? Is it rotctld itself? Are you getting an error when polling too fast?

AdamKrovina commented 3 years ago

Hi, I am using SPID RAS rotator and I believe I'm having the same issue. I'd need to slow down the polling of position. I've tried querying position via rotctl manually during an observation and sometimes I even got an error. The response of rotctl is noticeably slow (almost a second) when idle. God knows what's happening in there when the observation is running. I've tried setting up rust, but I could not get it running. I'll give it a shot some other day.

wose commented 3 years ago

@AdamKrovina: thx for the infos, I'll try to fix this within the next days.