Just trying to suss out how Indi works. I'm looking through all the dome examples and drivers and reading the manual but I just can't seem to find the part where domes get their Az handed to them...
I thought it would be snoop since you have to tell a dome to snoop on a scope before it can track it but I can't find the snoop code in any of the domes so I guess that's not it. What am I missing?
INDI Dome base class snoops the telescope coordinates and calculates the needed dome azimuth in GetTargetAz function which is then set to the dome via driver's MoveAbs function. The code is in Dome::UpdateAutoSync() in indidome.cpp.
The dome azimuth can be different to the mount azimuth because the mount may be offset from the centre of the dome and in the case of a German Equatorial mount (The one with the telescope and a counterweight on opposite sides) will vary depending on the pier side.
What happens is that the dome azimuth is calculated from the mount ra and Dec, pier side, time, location and mount position in the dome. This is all dome in the base dome implementation, which all dome drivers are based on, so you won't see it in the individual dome drivers.
The following user(s) said Thank You: Jasem Mutlaq
I knew that Indi calculated the dome azimuth based on the scope and dome geometries, I just can't figure out how that value was getting to the child dome driver. It's probably my unfamiliarity with real C++ (Only used the Arduino version).
I'm looking at dome::MoveAbs() in Indidome which I imagine is what tells the child to do but I'm not seeing anything that looks like it calls the child's MoveAbs() method or sets the az in it.
Indidome::MoveAbs() doesn't call the child MoveAbs() or pass the az along because its a virtual method that has been overridden by the child's MoveAbs().
Sorry. The name "virtual" seems completely inappropriate for what it does. Why didn't they use "Overridable" since that's what it really means and you even use "override" to specify you're overriding the virtual method?
What my base problem was is that I've never actually used inheritance to expand or modify a class so I my brain was stuck on thinking of the parent as a calling class and I was trying to find where it calls the dome driver. I knew about inheritance but it just wasn't reaching surface thoughts.