Next dumb question - how does dome simulator get its az from Indi? #37946
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.
Next dumb question - how does dome simulator get its az from Indi? #37947
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.
Next dumb question - how does dome simulator get its az from Indi? #37964
Ah I think I'm catching on a little more now.
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.
Next dumb question - how does dome simulator get its az from Indi? #37965
Ahha! The light comes on!
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?
Next dumb question - how does dome simulator get its az from Indi? #38005
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.