Skip to content

ASCOM mount support#10

Open
rkinnett wants to merge 2 commits into
esa:masterfrom
rkinnett:ascom-mount-support
Open

ASCOM mount support#10
rkinnett wants to merge 2 commits into
esa:masterfrom
rkinnett:ascom-mount-support

Conversation

@rkinnett

Copy link
Copy Markdown

Adds ASCOM mount support. Tested with ASCOM Scope Simulator V2 configured as alt/az type mount.

This implementation does not preclude equatorial mounts, but perhaps it should. If used with an equatorial mount, this implementation will drive the RA/Dec axes using rate commands which pypogs intended for alt/az axes. I don't see an ASCOM-specific way to check whether a mount is equatorial or alt/az.

This PR builds on PR #9 which split hardware.py into separate camera, mount, and receiver interfaces files and updated the camera interfaces file to add ASCOM camera support.

@gustavmpettersson gustavmpettersson left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See some specific code comments

Note that several workarounds were added in the celestron code to manage the slow interface, notably state caching and internal init tracking. If possible, these should not be repeated for ascom.

Comment thread pypogs/hardware_mounts.py
if self.model == 'celestron':
return self._is_init
elif self.model.lower() == 'ascom':
return self._is_init

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does the ascom API provide any method to check if a device is initialised? The ptgrey solution is not ideal

Comment thread pypogs/hardware_mounts.py
self._debug_folder = path

@property
def state_cache(self):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a fast method to get the state from ascom? If yes should be implemented here

Comment thread pypogs/hardware_mounts.py
Comment on lines +237 to +238
- For model *ascom* this can either be left blank to invoke the ASCOM telescope selection menu, or may specify
a specific installed ASCOM driver by name (case sensitive) (e.g. DeviceHub, Celestron, Simulator, SkyWatcher, etc).

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any way of identifying specific hardware resources? Unlikely to have more than one mount connected but still

Comment thread pypogs/hardware_mounts.py
+ ' rate_control=' + str(rate_control))
self._logger.debug('Stopping mount first')
self.stop()
if self.model == 'celestron' or self.model.lower() == "ascom":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if self.model.lower() in ('celestron', 'ascom'):

Comment thread pypogs/hardware_mounts.py
self._ascom_telescope.MoveAxis(self._ascom_scope_alt_axis, alt)
self._ascom_telescope.MoveAxis(self._ascom_scope_azi_axis, azi)
success[0] = True
except:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix catch-all try-except

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants