alpacago

package
v0.23.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Copyright (c) 2021-2022 observerly Ltd (michael@observerly.com), All rights reserved.

Index

Constants

View Source
const (
	ALPACA_DISCOVERY_VERSION = 1
	DEFAULT_PORT             = 11111
	DEFAULT_PORT_STR         = "11111"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ASCOMAlpacaAPIClient

type ASCOMAlpacaAPIClient struct {
	Client        *resty.Client
	UrlBase       string
	ClientId      uint32
	TransactionId uint32
	ErrorNumber   int
	ErrorMessage  string
}

func NewAlpacaAPI

func NewAlpacaAPI(clientId uint32, secure bool, domain string, ip string, port int32) *ASCOMAlpacaAPIClient

func (*ASCOMAlpacaAPIClient) GetBooleanResponse

func (a *ASCOMAlpacaAPIClient) GetBooleanResponse(deviceType string, deviceNumber uint, method string) (bool, error)

GetBooleanResponse()

Global public method to work with calls returning booleanResponse

func (*ASCOMAlpacaAPIClient) GetDescription

func (a *ASCOMAlpacaAPIClient) GetDescription(deviceType string, deviceNumber uint) (string, error)

GetDescription() common method to all ASCOM Alpaca compliant devices

@returns the description of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__description

func (*ASCOMAlpacaAPIClient) GetDriverInfo

func (a *ASCOMAlpacaAPIClient) GetDriverInfo(deviceType string, deviceNumber uint) (string, error)

GetDriverInfo() common method to all ASCOM Alpaca compliant devices

@returns the description of the driver @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__driverinfo

func (*ASCOMAlpacaAPIClient) GetDriverVersion

func (a *ASCOMAlpacaAPIClient) GetDriverVersion(deviceType string, deviceNumber uint) (string, error)

GetDriverVersion() common method to all ASCOM Alpaca compliant devices

@returns a string containing only the major and minor version of the driver. @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__driverversion

func (*ASCOMAlpacaAPIClient) GetFloat64Response

func (a *ASCOMAlpacaAPIClient) GetFloat64Response(deviceType string, deviceNumber uint, method string) (float64, error)

GetFloat64Response()

Global public method to work with calls returning float64Response

func (*ASCOMAlpacaAPIClient) GetInt32Response

func (a *ASCOMAlpacaAPIClient) GetInt32Response(deviceType string, deviceNumber uint, method string) (int32, error)

GetInt32Response()

Global public method to work with calls returning int32Response

func (*ASCOMAlpacaAPIClient) GetInterfaceVersion

func (a *ASCOMAlpacaAPIClient) GetInterfaceVersion(deviceType string, deviceNumber uint) (int32, error)

GetInterfaceVersion() common method to all ASCOM Alpaca compliant devices

@returns the version of the ASCOM device interface contract to which this device complies. Only one interface version is current at a moment in time and all new devices should be built to the latest interface version. Applications can choose which device interface versions they support and it is in their interest to support previous versions as well as the current version to ensure thay can use the largest number of devices. @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__interfaceversion

func (*ASCOMAlpacaAPIClient) GetName

func (a *ASCOMAlpacaAPIClient) GetName(deviceType string, deviceNumber uint) (string, error)

GetName() common method to all ASCOM Alpaca compliant devices

@returns the name of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__name

func (*ASCOMAlpacaAPIClient) GetStringListResponse

func (a *ASCOMAlpacaAPIClient) GetStringListResponse(deviceType string, deviceNumber uint, method string) ([]string, error)

GetStringListResponse()

Global public method to work with calls returning stringListResponse

func (*ASCOMAlpacaAPIClient) GetStringResponse

func (a *ASCOMAlpacaAPIClient) GetStringResponse(deviceType string, deviceNumber uint, method string) (string, error)

GetStringResponse()

Global public method to work with calls returning stringResponse

func (*ASCOMAlpacaAPIClient) GetSupportedActions

func (a *ASCOMAlpacaAPIClient) GetSupportedActions(deviceType string, deviceNumber uint) ([]string, error)

GetSupportedActions() common method to all ASCOM Alpaca compliant devices

@returns the list of action names supported by this driver. @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__supportedactions

func (*ASCOMAlpacaAPIClient) GetUInt32ListResponse

func (a *ASCOMAlpacaAPIClient) GetUInt32ListResponse(deviceType string, deviceNumber uint, method string) ([]uint32, error)

GetInt32ListResponse()

Global public method to work with calls returning int32listResponse

func (*ASCOMAlpacaAPIClient) GetUInt32Rank2ArrayResponse added in v0.15.0

func (a *ASCOMAlpacaAPIClient) GetUInt32Rank2ArrayResponse(deviceType string, deviceNumber uint, method string) ([][]uint32, uint32, error)

GetUInt32RankArrayResponse()

Global public method to work with calls returning a uint32Rank2ArrayResponse

func (*ASCOMAlpacaAPIClient) IsConnected

func (a *ASCOMAlpacaAPIClient) IsConnected(deviceType string, deviceNumber uint) (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connection status of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*ASCOMAlpacaAPIClient) Put

func (a *ASCOMAlpacaAPIClient) Put(deviceType string, deviceNumber uint, method string, form map[string]string) error

type AlignmentMode

type AlignmentMode int32
const (
	AlignmentAltAz AlignmentMode = iota
	AlignmentPolar
	AlignmentGermanPolar
)

func (AlignmentMode) String added in v0.21.0

func (am AlignmentMode) String() string

String returns the string representation of the AlignmentSystem value.

type AlpacaDiscoveryMessage added in v0.6.0

type AlpacaDiscoveryMessage struct {
	Fixed    []byte // for discovery, this must be 'alpacadiscovery'
	Version  byte
	Reserved []byte
}

func NewDiscoveryMessage added in v0.6.0

func NewDiscoveryMessage(version int) *AlpacaDiscoveryMessage

type AlpacaDiscoveryServer added in v0.6.0

type AlpacaDiscoveryServer struct {
	Packet        *net.PacketConn
	Address       *net.UDPAddr
	UrlBase       string
	Protocol      string
	ClientId      uint32
	TransactionId uint32
	ErrorNumber   int
	ErrorMessage  string
}

func NewDiscoveryServer added in v0.6.0

func NewDiscoveryServer(clientId uint32, protocol string, domain string, ip string, port int32) *AlpacaDiscoveryServer

func (*AlpacaDiscoveryServer) OpenSocket added in v0.6.0

func (s *AlpacaDiscoveryServer) OpenSocket()

OpenSocket()

@returns A bound open a socket for discovery on the udp4 network protocol, i.e., announce on the local network address. @see https://ascom-standards.org/Developer/ASCOM%20Alpaca%20API%20Reference.pdf

func (*AlpacaDiscoveryServer) ResolveUDPAddress added in v0.6.0

func (s *AlpacaDiscoveryServer) ResolveUDPAddress()

ResolveUDPAddress()

@returns A resolved UDP address broadcast by the server. @see https://ascom-standards.org/Developer/ASCOM%20Alpaca%20API%20Reference.pdf

type AxisRatesResponse

type AxisRatesResponse struct {
	Value               []map[string]float64 `json:"Value"`
	ClientTransactionID int32                `json:"ClientTransactionID"`
	ServerTransactionID int32                `json:"ServerTransactionID"`
	ErrorNumber         int32                `json:"ErrorNumber"`
	ErrorMessage        string               `json:"ErrorMessage"`
}

type AxisType

type AxisType int
const (
	AxisAzmRa AxisType = iota
	AxisAltDec
	AxisTertiary
)

func (AxisType) String added in v0.21.0

func (at AxisType) String() string

String returns the string representation of the AxisType value.

type CalibratorState added in v0.10.0

type CalibratorState int32
const (
	// This device does not have a calibration capability
	CalibratorNotPresent CalibratorState = iota
	// The calibrator is off
	CalibratorOff
	// The calibrator is stabilising or is not yet in the commanded state
	CalibratorNotReady
	// The calibrator is ready for use
	CalibratorReady
	// The calibrator state is unknown
	CalibratorUnknown
	// The calibrator encountered an error when changing state
	CalibratorError
)

type Camera added in v0.5.0

type Camera struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewCamera added in v0.5.0

func NewCamera(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *Camera

func (*Camera) AbortExposure added in v0.5.0

func (c *Camera) AbortExposure() error

AbortExposure()

@returns an error or nil, if nil aborts the current exposure, if any, and returns the camera to Idle state. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__abortexposure

func (*Camera) CanAbortExposure added in v0.5.0

func (c *Camera) CanAbortExposure() (bool, error)

CanAbortExposure()

@returns true if the camera can abort exposures; false if not. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__canabortexposure

func (*Camera) CanAsymmetricBin added in v0.5.0

func (c *Camera) CanAsymmetricBin() (bool, error)

CanAsymmetricBin()

@returns true if the camera supports asymmetric binning @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__canasymmetricbin

func (*Camera) CanFastReadout added in v0.5.0

func (c *Camera) CanFastReadout() (bool, error)

CanFastReadout()

@returns true if the camera has a fast readout mode. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__canfastreadout

func (*Camera) CanGetCoolerPower added in v0.5.0

func (c *Camera) CanGetCoolerPower() (bool, error)

CanGetCoolerPower()

@returns true if the camera's cooler power setting can be read. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__cangetcoolerpower

func (*Camera) CanPulseGuide added in v0.5.0

func (c *Camera) CanPulseGuide() (bool, error)

CanPulseGuide()

@returns true if the camera supports pulse guiding. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__canpulseguide

func (*Camera) CanSetCCDTemperature added in v0.5.0

func (c *Camera) CanSetCCDTemperature() (bool, error)

CanSetCCDTemperature()

@returns true if the camera supports setting the CCD temperature. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__cansetccdtemperature

func (*Camera) CanStopExposure added in v0.5.0

func (c *Camera) CanStopExposure() (bool, error)

CanStopExposure()

@returns true if the camera can stop an exposure that is in progress @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__canstopexposure

func (*Camera) DisableFastReadout added in v0.5.0

func (c *Camera) DisableFastReadout() error

DisableFastReadout()

@returns an error or nil, if nil it disables the fast readout mode @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__fastreadout

func (*Camera) EnableFastReadout added in v0.5.0

func (c *Camera) EnableFastReadout() error

EnableFastReadout()

@returns an error or nil, if nil it enables the fast readout mode @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__fastreadout

func (*Camera) GetBayerOffsetX added in v0.5.0

func (c *Camera) GetBayerOffsetX() (int32, error)

GetBayerOffsetX()

@returns the X offset of the Bayer matrix, as defined in SensorType. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__bayeroffsetx

func (*Camera) GetBayerOffsetY added in v0.5.0

func (c *Camera) GetBayerOffsetY() (int32, error)

GetBayerOffsetY()

@returns the Y offset of the Bayer matrix, as defined in SensorType. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__bayeroffsety

func (*Camera) GetBinX added in v0.5.0

func (c *Camera) GetBinX() (int32, error)

GetBinX()

@returns the binning factor for the X axis. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__binx

func (*Camera) GetBinY added in v0.5.0

func (c *Camera) GetBinY() (int32, error)

GetBinY()

@returns the binning factor for the Y axis. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__biny

func (*Camera) GetCCDSizeX added in v0.5.0

func (c *Camera) GetCCDSizeX() (int32, error)

GetCCDSizeX()

@returns the width of the CCD camera chip in unbinned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__cameraxsize

func (*Camera) GetCCDSizeY added in v0.5.0

func (c *Camera) GetCCDSizeY() (int32, error)

GetCCDSizeY()

@returns the width of the CCD camera chip in unbinned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__cameraysize

func (*Camera) GetCCDTemperature added in v0.5.0

func (c *Camera) GetCCDTemperature() (float64, error)

GetCCDTemperature()

@returns true if the camera can stop an exposure that is in progress @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__ccdtemperature

func (*Camera) GetCCDTemperatureCoolerSetPoint added in v0.5.0

func (c *Camera) GetCCDTemperatureCoolerSetPoint() (float64, error)

GetCCDTemperatureCoolerSetPoint()

@returns the current temperature setpoint of the CCD cooler in degrees Celsius. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__setccdtemperature

func (*Camera) GetCoolerPowerLevel added in v0.5.0

func (c *Camera) GetCoolerPowerLevel() (float64, error)

GetCoolerPowerLevel()

@returns the present cooler power level, in percent. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__coolerpower

func (*Camera) GetCurrentOperationPercentageComplete added in v0.5.0

func (c *Camera) GetCurrentOperationPercentageComplete() (int32, error)

GetCurrentOperationPercentageComplete()

@returns the percentage of the current operation that is complete. If valid, returns an integer between 0 and 100, where 0 indicates 0% progress (function just started) and 100 indicates 100% progress (i.e. completion). @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__percentcompleted

func (*Camera) GetExposure added in v0.15.0

func (c *Camera) GetExposure() ([][]uint32, uint32, error)

GetExposure()

@returns Returns an array of 32bit integers containing the pixel values from the last exposure. This call can return either a 2 dimension (monochrome images) or 3 dimension (colour or multi-plane images) array of size NumX * NumY or NumX * NumY * NumPlanes. Where applicable, the size of NumPlanes has to be determined by inspection of the returned Array.

Since 32bit integers are always returned by this call, the returned JSON Type value (0 = Unknown, 1 = short(16bit), 2 = int(32bit), 3 = Double) is always 2. The number of planes is given in the returned Rank value.

When de-serialising to an object it is essential to know the array Rank beforehand so that the correct data class can be used. This can be achieved through a regular expression or by direct parsing of the returned JSON string to extract the Type and Rank values before de-serialising.

@see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__imagearray

func (*Camera) GetExposureMax added in v0.5.0

func (c *Camera) GetExposureMax() (float64, error)

GetExposureMax()

@returns the maximum exposure time supported by StartExposure. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__exposuremax

func (*Camera) GetExposureMin added in v0.5.0

func (c *Camera) GetExposureMin() (float64, error)

GetExposureMin()

@returns the maximum exposure time supported by StartExposure. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__exposuremin

func (*Camera) GetExposureResolution added in v0.5.0

func (c *Camera) GetExposureResolution() (float64, error)

GetExposureResolution()

@returns the smallest increment in exposure time supported by StartExposure. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__exposureresolution

func (*Camera) GetFullWellCapacity added in v0.5.0

func (c *Camera) GetFullWellCapacity() (float64, error)

GetFullWellCapacity()

@returns the full well capacity of the camera in electrons, at the current camera settings (binning, SetupDialog settings, etc.). @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__fullwellcapacity

func (*Camera) GetGain added in v0.5.0

func (c *Camera) GetGain() (int32, error)

GetGain()

@returns the camera's gain (GAIN VALUE MODE) OR the index of the selected camera gain description in the Gains array (GAINS INDEX MODE). @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__gain

func (*Camera) GetGainInElectronsPerADUnit added in v0.5.0

func (c *Camera) GetGainInElectronsPerADUnit() (float64, error)

GetGainInElectronsPerADUnit()

@returns the gain of the camera in photoelectrons per A/D unit. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__electronsperadu

func (*Camera) GetGainMax added in v0.5.0

func (c *Camera) GetGainMax() (int32, error)

GetGainMax()

@returns the maximum value of Gain. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__gainmax

func (*Camera) GetGainMin added in v0.5.0

func (c *Camera) GetGainMin() (int32, error)

GetGainMin()

@returns the minimum value of Gain. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__gainmin

func (*Camera) GetGains added in v0.5.0

func (c *Camera) GetGains() ([]string, error)

GetGains()

@returns the Gains supported by the camera. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__gains

func (*Camera) GetHeatSinkTemperature added in v0.5.0

func (c *Camera) GetHeatSinkTemperature() (float64, error)

GetHeatSinkTemperature()

@returns the current heat sink temperature (called "ambient temperature" by some manufacturers) in degrees Celsius. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__heatsinktemperature

func (*Camera) GetLastExposureDuration added in v0.5.0

func (c *Camera) GetLastExposureDuration() (float64, error)

GetLastExposureDuration()

@returns the actual exposure duration in seconds (i.e. shutter open time). @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__lastexposureduration

func (*Camera) GetLastExposureStartTime added in v0.14.0

func (c *Camera) GetLastExposureStartTime() (*time.Time, error)

GetLastExposureStartTime()

@returns the actual exposure start in the FITS-standard CCYY-MM-DDThh:mm:ss[.sss...] format. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__lastexposurestarttime

func (*Camera) GetMaxADU added in v0.5.0

func (c *Camera) GetMaxADU() (int32, error)

GetMaxADU()

@returns the maximum ADU value the camera can produce. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__maxadu

func (*Camera) GetMaxBinX added in v0.5.0

func (c *Camera) GetMaxBinX() (int32, error)

GetMaxBinX()

@returns the maximum allowed binning for the X camera axis. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__maxbinx

func (*Camera) GetMaxBinY added in v0.5.0

func (c *Camera) GetMaxBinY() (int32, error)

GetMaxBinY()

@returns the maximum allowed binning for the Y camera axis. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__maxbiny

func (*Camera) GetOperationalState added in v0.5.0

func (c *Camera) GetOperationalState() (string, error)

GetOperationalState()

@returns the current camera operational state (CameraIdle, CameraWaiting, CameraExposing, CameraReading, CameraDownload, CameraError) The operational state is specified as an integer value from the OperationalState Enum. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__camerastate

func (*Camera) GetPixelSizeX added in v0.5.0

func (c *Camera) GetPixelSizeX() (float64, error)

GetPixelSizeX()

@returns the width of the CCD chip pixels in microns. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__pixelsizex

func (*Camera) GetPixelSizeY added in v0.5.0

func (c *Camera) GetPixelSizeY() (float64, error)

GetPixelSizeY()

@returns the width of the CCD chip pixels in microns. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__pixelsizey

func (*Camera) GetReadOutMode added in v0.5.0

func (c *Camera) GetReadOutMode() (int32, error)

GetReadOutMode()

@returns an index into the array ReadoutModes and returns the desired readout mode for the camera. Defaults to 0 if not set. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__readoutmode

func (*Camera) GetReadOutModes added in v0.5.0

func (c *Camera) GetReadOutModes() ([]string, error)

GetReadOutModes()

@returns an array of strings, each of which describes an available readout mode of the camera. At least one string must be present in the list. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__readoutmodes

func (*Camera) GetSensorName added in v0.5.0

func (c *Camera) GetSensorName() (string, error)

GetSensorName()

@returns the name of the sensor used within the camera. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__sensorname

func (*Camera) GetSensorType added in v0.5.0

func (c *Camera) GetSensorType() (SensorType, error)

GetSensorType()

@returns the sensor type, e.g., whether the sensor is monochrome, or what Bayer matrix it encodes. Where: @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__sensortype

func (*Camera) GetStartX added in v0.5.0

func (c *Camera) GetStartX() (int32, error)

GetStartX()

@returns the current subframe start X coordinate, if binning is active, value is in binned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__startx

func (*Camera) GetStartY added in v0.5.0

func (c *Camera) GetStartY() (int32, error)

GetStartY()

@returns the current subframe start Y coordinate, if binning is active, value is in binned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__starty

func (*Camera) GetSubExposureDuration added in v0.5.0

func (c *Camera) GetSubExposureDuration() (float64, error)

GetSubExposureDuration()

@returns the sub exposure duration in seconds, *only available in Camera Interface Version 3 and later. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__subexposureduration

func (*Camera) GetSubFrameHeight added in v0.5.0

func (c *Camera) GetSubFrameHeight() (int32, error)

GetSubFrameHeight()

@returns the current subframe height, if binning is active, value is in binned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__numy

func (*Camera) GetSubFrameWidth added in v0.5.0

func (c *Camera) GetSubFrameWidth() (int32, error)

GetSubFrameWidth()

@returns the current subframe width, if binning is active, value is in binned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__numx

func (*Camera) HasShutter added in v0.5.0

func (c *Camera) HasShutter() (bool, error)

HasShutter()

@returns the true if this camera has a mechanical shutter. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__hasshutter

func (*Camera) IsConnected added in v0.5.0

func (c *Camera) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*Camera) IsCoolerOn added in v0.5.0

func (c *Camera) IsCoolerOn() (bool, error)

IsCoolerOn()

@returns true if the camera cooler is one, else false @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__cooleron

func (*Camera) IsFastReadoutEnabled added in v0.5.0

func (c *Camera) IsFastReadoutEnabled() (bool, error)

IsFastReadoutEnabled()

@returns whenther Fast Readout Mode is enabled. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__fastreadout

func (*Camera) IsImageReady added in v0.5.0

func (c *Camera) IsImageReady() (bool, error)

IsImageReady()

@returns true if the image is ready to be downloaded from the camera @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__imageready

func (*Camera) IsPulseGuiding added in v0.5.0

func (c *Camera) IsPulseGuiding() (bool, error)

IsPulseGuiding()

@returns true if the the camera is currrently in a PulseGuide operation. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__ispulseguiding

func (*Camera) SetBinX added in v0.5.0

func (c *Camera) SetBinX(binX int32) error

SetBinX()

@returns an error or nil, if nil it sets the binning factor for the X axis. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__binx

func (*Camera) SetBinY added in v0.5.0

func (c *Camera) SetBinY(binY int32) error

SetBinY()

@returns an error or nil, if nil it sets the binning factor for the Y axis. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__biny

func (*Camera) SetCCDTemperatureCoolerSetPoint added in v0.5.0

func (c *Camera) SetCCDTemperatureCoolerSetPoint(temperature float64) error

SetCCDTemperatureCoolerSetPoint()

@returns an error or nil, if nil it sets the camera's cooler setpoint in degrees Celsius. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__setccdtemperature

func (*Camera) SetConnected added in v0.5.0

func (c *Camera) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*Camera) SetGain added in v0.5.0

func (c *Camera) SetGain(gain int32) error

SetGain()

@returns an error or nil, if nil it sets the gain to the specified value. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__gain

func (*Camera) SetPulseGuide added in v0.5.0

func (c *Camera) SetPulseGuide(direction Direction, duration int32) error

PulseGuide()

@returns an error or nil, if nil starts a pulse guide operation i.e., it activates the Camera's mount control system to instruct the mount to move in a particular direction for a given period of time @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__pulseguide

func (*Camera) SetReadOutMode added in v0.5.0

func (c *Camera) SetReadOutMode(readOutMode int32) error

SetReadOutMode()

@returns an error or nil, if nil sets the readout mode. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__readoutmode

func (*Camera) SetStartX added in v0.5.0

func (c *Camera) SetStartX(startX int32) error

SetStartX()

@returns an error or nil, if nil sets the subframe start X coordinate, if binning is active, value is in binned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__startx

func (*Camera) SetStartY added in v0.5.0

func (c *Camera) SetStartY(startY int32) error

SetStartY()

@returns an error or nil, if nil sets the subframe start Y coordinate, if binning is active, value is in binned pixels. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__starty

func (*Camera) SetSubExposureDuration added in v0.5.0

func (c *Camera) SetSubExposureDuration(subExposureDuration float64) error

SetSubExposureDuration()

@returns an error or nil, if nil sets the sub exposure duration in seconds, *only available in Camera Interface Version 3 and later. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__subexposureduration

func (*Camera) SetSubFrameHeight added in v0.5.0

func (c *Camera) SetSubFrameHeight(numY int32) error

SetSubFrameHeight()

@returns an error or nil, if the subframe height can be set. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__numy

func (*Camera) SetSubFrameWidth added in v0.5.0

func (c *Camera) SetSubFrameWidth(numX int32) error

SetSubFrameWidth()

@returns an error or nil, if the subframe width can be set. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/get_camera__device_number__numx

func (*Camera) StartExposure added in v0.5.0

func (c *Camera) StartExposure(duration float64, light bool) error

StartExposure()

@returns an error or nil, if nil starts an exposure (use IsImageReady to check when the exposure is complete.) @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__startexposure

func (*Camera) StopExposure added in v0.5.0

func (c *Camera) StopExposure() error

StopExposure()

@returns an error or nil, if nil stops the current exposure, if any. If an exposure is in progress, the readout process is initiated. Ignored if readout is already in process. @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__stopexposure

func (*Camera) TurnCoolerOff added in v0.5.0

func (c *Camera) TurnCoolerOff() error

TurnCoolerOff()

@returns error if there was a problem turning the cooler off @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__cooleron

func (*Camera) TurnCoolerOn added in v0.5.0

func (c *Camera) TurnCoolerOn() error

TurnCoolerOn()

@returns error if there was a problem turning the cooler on @see https://ascom-standards.org/api/#/Camera%20Specific%20Methods/put_camera__device_number__cooleron

type CoverCalibrator added in v0.10.0

type CoverCalibrator struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewCoverCalibrator added in v0.10.0

func NewCoverCalibrator(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *CoverCalibrator

func (*CoverCalibrator) CloseCover added in v0.10.0

func (c *CoverCalibrator) CloseCover() error

CloseCover()

@returns and error, or nil, if nil initiates cover closing if a cover is present. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/put_covercalibrator__device_number__closecover

func (*CoverCalibrator) GetBrightness added in v0.10.0

func (c *CoverCalibrator) GetBrightness() (float64, error)

GetBrightness()

@returns the current calibrator brightness in the range 0 (completely off) to MaxBrightness (fully on) @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/get_covercalibrator__device_number__brightness

func (*CoverCalibrator) GetCoverStatus added in v0.10.0

func (c *CoverCalibrator) GetCoverStatus() (CoverState, error)

GetCoverStatus()

@returns the state of the device cover, if present, otherwise returns "NotPresent". The cover state mode is specified as an integer value from the CoverStatus Enum. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/get_covercalibrator__device_number__coverstate @see https://ascom-standards.org/Help/Platform/html/T_ASCOM_DeviceInterface_CoverStatus.htm

func (*CoverCalibrator) GetMaxBrightness added in v0.10.0

func (c *CoverCalibrator) GetMaxBrightness() (int32, error)

GetMaxBrightness()

@returns the brightness value that makes the calibrator deliver its maximum illumination. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/get_covercalibrator__device_number__maxbrightness

func (*CoverCalibrator) GetStatus added in v0.10.0

func (c *CoverCalibrator) GetStatus() (CalibratorState, error)

GetStatus()

@returns the state of the calibration device, if present, otherwise returns "NotPresent". The calibrator state mode is specified as an integer value from the CalibratorStatus Enum. @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__calibratorstate @see https://ascom-standards.org/Help/Platform/html/T_ASCOM_DeviceInterface_CalibratorStatus.htm

func (*CoverCalibrator) HaltCover added in v0.10.0

func (c *CoverCalibrator) HaltCover() error

HaltCover()

@returns and error, or nil, if nil stops any cover movement that may be in progress if a cover is present and cover movement can be interrupted. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/put_covercalibrator__device_number__haltcover

func (*CoverCalibrator) IsConnected added in v0.10.0

func (c *CoverCalibrator) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*CoverCalibrator) OpenCover added in v0.10.0

func (c *CoverCalibrator) OpenCover() error

OpenCover()

@returns and error, or nil, if nil initiates cover opening if a cover is present. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/put_covercalibrator__device_number__opencover

func (*CoverCalibrator) SetCalibratorOff added in v0.10.0

func (c *CoverCalibrator) SetCalibratorOff() error

SetCalibratorOff()

@turns the calibrator off if the device has calibration capability. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/put_covercalibrator__device_number__calibratoroff

func (*CoverCalibrator) SetCalibratorOn added in v0.10.0

func (c *CoverCalibrator) SetCalibratorOn(brightness int32) error

SetCalibratorOn()

@returns and error, or nil, if nil the calibrator on if the device has calibration capability. @see https://ascom-standards.org/api/#/CoverCalibrator%20Specific%20Methods/put_covercalibrator__device_number__calibratoron

func (*CoverCalibrator) SetConnected added in v0.10.0

func (c *CoverCalibrator) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

type CoverState added in v0.10.0

type CoverState int32
const (
	// This device does not have a cover that can be closed independently
	CoverNotPresent CoverState = iota
	// The cover is closed
	CoverClosed
	// The cover is moving to a new position
	CoverMoving
	// The Cover is open
	CoverOpen
	// The Cover state is unknown
	CoverUnknown
	// The Cover encountered an error when changing state
	CoverError
)

type Direction added in v0.5.0

type Direction int32
const (
	North Direction = iota
	South
	East
	West
)

type Dome added in v0.7.0

type Dome struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewDome added in v0.7.0

func NewDome(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *Dome

func (*Dome) AbortSlew added in v0.7.0

func (d *Dome) AbortSlew() error

AbortSlew()

@returs error, or nil, if nil it aborts the current slew operation. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__abortslew

func (*Dome) CanFindHome added in v0.7.0

func (d *Dome) CanFindHome() (bool, error)

CanFindHome()

@returns true if the dome can move to the home position. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__canfindhome

func (*Dome) CanPark added in v0.7.0

func (d *Dome) CanPark() (bool, error)

CanPark()

@returns true if the dome is capable of programmed parking (Park() method) @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__canpark

func (*Dome) CanSetAltitude added in v0.7.0

func (d *Dome) CanSetAltitude() (bool, error)

CanSetAltitude()

@returns true if driver is capable of setting the dome altitude. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__cansetaltitude

func (*Dome) CanSetAzimuth added in v0.7.0

func (d *Dome) CanSetAzimuth() (bool, error)

CanSetAzimuth()

@returns true if driver is capable of setting the dome azimuth. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__cansetazimuth

func (*Dome) CanSetPark added in v0.7.0

func (d *Dome) CanSetPark() (bool, error)

CanSetPark()

@returns true if driver is capable of setting the dome park position. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__cansetpark

func (*Dome) CanSetShutter added in v0.7.0

func (d *Dome) CanSetShutter() (bool, error)

CanSetShutter()

@returns true if driver is capable of setting the shutter state. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__cansetshutter

func (*Dome) CanSlave added in v0.7.0

func (d *Dome) CanSlave() (bool, error)

CanSlave()

@returns true if driver is capable of slaving to a telescope. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__canslave

func (*Dome) CanSyncAzimuth added in v0.7.0

func (d *Dome) CanSyncAzimuth() (bool, error)

CanSyncAzimuth()

@returns true if driver is capable of synchronizing the dome azimuth position using the SyncToAzimuth(Double) method. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__cansyncazimuth

func (*Dome) CloseShutter added in v0.7.0

func (d *Dome) CloseShutter() error

CloseShutter()

@returns error, or nil, if nil it closes the shutter or otherwise shield telescope from the sky. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__closeshutter

func (*Dome) FindHome added in v0.7.0

func (d *Dome) FindHome() error

FindHome()

@returns error, or nil, if nil it starts operation to search for the dome home position. @effects after home position is established initializes azimuth to the default value and sets the AtHome flag. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__findhome

func (*Dome) GetAltitude added in v0.7.0

func (d *Dome) GetAltitude() (float64, error)

GetAltitude()

@returns The dome altitude (degrees, horizon zero and increasing positive to 90 zenith). @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__altitude

func (*Dome) GetAzimuth added in v0.7.0

func (d *Dome) GetAzimuth() (float64, error)

GetAzimuth()

@returns the dome azimuth (degrees, North-referenced, positive East/clockwise, i.e., 90 East, 180 South, 270 West). @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__azimuth

func (*Dome) GetShutterStatus added in v0.7.0

func (d *Dome) GetShutterStatus() (string, error)

GetShutterStatus()

@returns the status of the dome shutter or roll-off roof. 0 = Open, 1 = Closed, 2 = Opening, 3 = Closing, 4 = Shutter status error @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__shutterstatus

func (*Dome) IsAtHome added in v0.7.0

func (d *Dome) IsAtHome() (bool, error)

IsAtHome()

@returns returns true if the dome is in the home position. This is normally used following a FindHome() operation. The value is reset with any azimuth slew operation that moves the dome away from the home position. AtHome may also become true durng normal slew operations, if the dome passes through the home position and the dome controller hardware is capable of detecting that; or at the end of a slew operation if the dome comes to rest at the home position. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__athome

func (*Dome) IsAtPark added in v0.7.0

func (d *Dome) IsAtPark() (bool, error)

IsAtPark()

@returns true if the dome is in the programmed park position. Set only following a Park() operation and reset with any slew operation. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__atpark

func (*Dome) IsConnected added in v0.7.0

func (d *Dome) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*Dome) IsSlaved added in v0.7.0

func (d *Dome) IsSlaved() (bool, error)

IsSlaved()

@returns true if the dome is slaved to the telescope in its hardware, else false. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__slaved

func (*Dome) IsSlewing added in v0.7.0

func (d *Dome) IsSlewing() (bool, error)

IsSlewing()

@return true if any part of the dome is currently moving, False if all dome components are steady. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/get_dome__device_number__slewing

func (*Dome) OpenShutter added in v0.7.0

func (d *Dome) OpenShutter() error

OpenShutter()

@returns error, or nil, if nil it opens the shutter or otherwise expose telescope to the sky. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__openshutter

func (*Dome) Park added in v0.7.0

func (d *Dome) Park() error

Park()

@returns error, or nil, if nil it rotates the dome in azimuth to park position. @effects After assuming programmed park position, sets AtPark flag. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__park

func (*Dome) SetAsPark added in v0.7.0

func (d *Dome) SetAsPark() error

SetAsPark()

@returns error, or nil, if nil it sets the current azimuth, altitude position of dome to be the park position. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__setpark

func (*Dome) SetConnected added in v0.7.0

func (d *Dome) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*Dome) SetSlaved added in v0.7.0

func (d *Dome) SetSlaved(slaved bool) error

SetSlaved()

@returns error, or nil, if nil it sets the salved state of the dome. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__slaved

func (*Dome) SlewToAltitude added in v0.7.0

func (d *Dome) SlewToAltitude(altitude float64) error

SlewToAltitude()

@returns error, or nil, if nil it slews the dome to the specified altitude. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__slewtoaltitude

func (*Dome) SlewToAzimuth added in v0.7.0

func (d *Dome) SlewToAzimuth(azimuth float64) error

SlewToAzimuth()

@returns error, or nil, if nil it slews the dome to the given azimuth position. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__slewtoazimuth

func (*Dome) SyncToAzimuth added in v0.7.0

func (d *Dome) SyncToAzimuth(azimuth float64) error

SyncToAzimuth()

@returns error, or nil, if nil it synchronizes the current position of the dome to the given azimuth. @see https://ascom-standards.org/api/#/Dome%20Specific%20Methods/put_dome__device_number__synctoazimuth

type EquatorialSystem

type EquatorialSystem int
const (
	Topocentric EquatorialSystem = iota
	J2000
)

func (EquatorialSystem) String added in v0.21.0

func (es EquatorialSystem) String() string

String returns the string representation of the EquatorialSystem value.

type FilterWheel

type FilterWheel struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewFilterWheel

func NewFilterWheel(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *FilterWheel

func (*FilterWheel) GetDescription added in v0.17.0

func (f *FilterWheel) GetDescription() (string, error)

GetDescription() common method to all ASCOM Alpaca compliant devices

@returns the description of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__description

func (*FilterWheel) GetFocusOffsets

func (f *FilterWheel) GetFocusOffsets() ([]uint32, error)

GetFocusOffsets()

@returns an integer array of filter focus offsets. @see https://ascom-standards.org/api/#/FilterWheel%20Specific%20Methods/get_filterwheel__device_number__focusoffsets

func (*FilterWheel) GetNames

func (f *FilterWheel) GetNames() ([]string, error)

GetNames()

@returns the names of the filters. @see https://ascom-standards.org/api/#/FilterWheel%20Specific%20Methods/get_filterwheel__device_number__names

func (*FilterWheel) GetPosition

func (f *FilterWheel) GetPosition() (int32, error)

GetPosition()

@returns the current filter wheel position. @see https://ascom-standards.org/api/#/FilterWheel%20Specific%20Methods/get_filterwheel__device_number__position

func (*FilterWheel) IsConnected added in v0.11.0

func (f *FilterWheel) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*FilterWheel) SetConnected

func (f *FilterWheel) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*FilterWheel) SetPosition

func (f *FilterWheel) SetPosition(position int32) error

SetPosition()

@returns an error or nil, if nil it sets the filter wheel position @see https://ascom-standards.org/api/#/FilterWheel%20Specific%20Methods/put_filterwheel__device_number__position

type Focuser

type Focuser struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewFocuser

func NewFocuser(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *Focuser

func (*Focuser) GetDescription added in v0.17.0

func (f *Focuser) GetDescription() (string, error)

GetDescription() common method to all ASCOM Alpaca compliant devices

@returns the description of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__description

func (*Focuser) GetMaxIncrement

func (f *Focuser) GetMaxIncrement() (int32, error)

GetMaxIncrement()

@returns the maximum increment size allowed by the focuser; i.e. the maximum number of steps allowed in one move operation. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__maxincrement

func (*Focuser) GetMaxStep

func (f *Focuser) GetMaxStep() (int32, error)

GetMaxStep()

@returns the maximum step size allowed by the focuser; i.e. the maximum step position permitted. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__maxstep

func (*Focuser) GetPosition

func (f *Focuser) GetPosition() (int32, error)

GetPosition()

@returns the focuser's current position. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__position

func (*Focuser) GetStepSize

func (f *Focuser) GetStepSize() (float64, error)

GetStepSize()

@returns the step size (microns) for the focuser. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__stepsize

func (*Focuser) GetTemperature

func (f *Focuser) GetTemperature() (float64, error)

GetTemperature()

@returns the current ambient temperature as measured by the focuser. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__temperature

func (*Focuser) GetTemperatureCompensation

func (f *Focuser) GetTemperatureCompensation() (bool, error)

GetTemperatureCompensation()

@returns the state of temperature compensation mode (if available), else always false. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__tempcomp

func (*Focuser) IsAbsolute

func (f *Focuser) IsAbsolute() (bool, error)

IsAbsolute()

@returns true if the focuser is capable of absolute position; that is, being commanded to a specific step location. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__absolute

func (*Focuser) IsConnected added in v0.16.0

func (f *Focuser) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*Focuser) IsMoving

func (f *Focuser) IsMoving() (bool, error)

IsMoving()

@returns true if the focuser is currently moving to a new position and false if the focuser is stationary. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__ismoving

func (*Focuser) IsTemperatureCompensationAvailable

func (f *Focuser) IsTemperatureCompensationAvailable() (bool, error)

IsTemperatureCompensationAvailable()

@returns true if focuser has temperature compensation available., else always false. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/get_focuser__device_number__tempcompavailable

func (*Focuser) SetConnected

func (f *Focuser) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*Focuser) SetHalt

func (f *Focuser) SetHalt() error

SetHalt

@returns an error or nil, if nil it immediately stop any focuser motion due to a previous move() method call. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/put_focuser__device_number__halt

func (*Focuser) SetMove

func (f *Focuser) SetMove(position int32) error

SetMove

@params position int32 (step distance or absolute position, depending on the value of the absolute property.) @returns an error or nil, if nil it moves the focuser by the specified amount or to the specified position depending on the value of the Absolute property. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/put_focuser__device_number__move

func (*Focuser) SetTemperatureCompensation

func (f *Focuser) SetTemperatureCompensation(tempComp bool) error

SetTemperatureCompensation()

@params tempComp bool (set true to enable the focuser's temperature compensation mode, otherwise false for normal operation.) @returns an error or nil, if nil it sets the state of temperature compensation mode. @see https://ascom-standards.org/api/#/Focuser%20Specific%20Methods/put_focuser__device_number__tempcomp

type ObservingConditions

type ObservingConditions struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewObservingConditions

func NewObservingConditions(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *ObservingConditions

func (*ObservingConditions) GetAveragePeriod

func (c *ObservingConditions) GetAveragePeriod() (float64, error)

GetAveragePeriod()

@returns the time period over which observations will be averaged. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__averageperiod

func (*ObservingConditions) GetCloudCover

func (c *ObservingConditions) GetCloudCover() (float64, error)

GetCloudCover()

@returns the percentage of the sky obscured by cloud @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__cloudcover

func (*ObservingConditions) GetDewPoint

func (c *ObservingConditions) GetDewPoint() (float64, error)

GetDewPoint()

@returns the atmospheric dew point at the observatory reported in °C. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__dewpoint

func (*ObservingConditions) GetHumidity

func (c *ObservingConditions) GetHumidity() (float64, error)

GetHumidity()

@returns the atmospheric humidity (%) at the observatory @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__humidity

func (*ObservingConditions) GetPressure

func (c *ObservingConditions) GetPressure() (float64, error)

GetPressure()

@returns the atmospheric pressure in hectoPascals at the observatory's altitude - NOT reduced to sea level. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__pressure

func (*ObservingConditions) GetRainRate

func (c *ObservingConditions) GetRainRate() (float64, error)

GetRainRate()

@returns the rain rate (mm/hour) at the observatory. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__rainrate

func (*ObservingConditions) GetSeeingStarFWHM

func (c *ObservingConditions) GetSeeingStarFWHM() (float64, error)

GetSeeingStarFWHM()

@returns the seeing at the observatory measured as star full width half maximum (FWHM) in arc secs. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__starfwhm

func (*ObservingConditions) GetSensorDescription

func (c *ObservingConditions) GetSensorDescription(sensorName string) (string, error)

GetSensorDescription()

@returns a description of the sensor with the name specified in the SensorName parameter @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__sensordescription

func (*ObservingConditions) GetSkyBrightness

func (c *ObservingConditions) GetSkyBrightness() (float64, error)

GetSkyBrightness()

@returns the sky brightness (Lux) at the observatory @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__skybrightness

func (*ObservingConditions) GetSkyQuality

func (c *ObservingConditions) GetSkyQuality() (float64, error)

GetSkyQuality()

@returns the sky quality (magnitudes per square arc second) at the observatory. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__skyquality

func (*ObservingConditions) GetSkyTemperature

func (c *ObservingConditions) GetSkyTemperature() (float64, error)

GetSkyTemperature()

@returns the the sky temperature(°C) at the observatory. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__skytemperature

func (*ObservingConditions) GetTemperature

func (c *ObservingConditions) GetTemperature() (float64, error)

GetTemperature()

@returns the temperature(°C) at the observatory. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__temperature

func (*ObservingConditions) GetTimeSinceLastUpdate

func (c *ObservingConditions) GetTimeSinceLastUpdate(sensorName string) (float64, error)

GetTimeSinceLastUpdate()

@returns the time since the sensor specified in the SensorName parameter was last updated @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__timesincelastupdate

func (*ObservingConditions) GetWindDirection

func (c *ObservingConditions) GetWindDirection() (float64, error)

GetWindDirection()

@returns the the wind direction. The returned value must be between 0.0 and 360.0, interpreted according to the metereological standard, where a special value of 0.0 is returned when the wind speed is 0.0. Wind direction is measured clockwise from north, through east, where East=90.0, South=180.0, West=270.0 and North=360.0. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__winddirection

func (*ObservingConditions) GetWindGust

func (c *ObservingConditions) GetWindGust() (float64, error)

GetWindGust()

@returns the peak 3 second wind gust(m/s) at the observatory over the last 2 minutes. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__windgust

func (*ObservingConditions) GetWindSpeed

func (c *ObservingConditions) GetWindSpeed() (float64, error)

GetWindSpeed()

@returns the wind speed(m/s) at the observatory. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/get_observingconditions__device_number__windspeed

func (*ObservingConditions) IsConnected

func (c *ObservingConditions) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*ObservingConditions) SetConnected

func (c *ObservingConditions) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*ObservingConditions) SetRefresh

func (c *ObservingConditions) SetRefresh() error

SetRefresh()

@returns an error or nil, if forces the driver to immediately query its attached hardware to refresh sensor values. @see https://ascom-standards.org/api/#/ObservingConditions%20Specific%20Methods/put_observingconditions__device_number__refresh

type OperationalState added in v0.5.0

type OperationalState int32
const (
	CameraIdle OperationalState = iota
	CameraWaiting
	CameraExposing
	CameraReading
	CameraDownload
	CameraError
)

func (OperationalState) String added in v0.13.0

func (s OperationalState) String() string

type PierPointingMode

type PierPointingMode int32
const (
	PierUnknown PierPointingMode = -1
	PierEast    PierPointingMode = 0
	PierWest    PierPointingMode = 1
)

type Rotator

type Rotator struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewRotator

func NewRotator(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *Rotator

func (*Rotator) CanReverse

func (r *Rotator) CanReverse() (bool, error)

CanReverse()

@returns true if the Rotator supports the Reverse method. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__canreverse

func (*Rotator) GetDescription added in v0.17.0

func (r *Rotator) GetDescription() (string, error)

GetDescription() common method to all ASCOM Alpaca compliant devices

@returns the description of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__description

func (*Rotator) GetMechanicalPosition

func (r *Rotator) GetMechanicalPosition() (float64, error)

GetMechanicalPosition()

@returns the raw mechanical position of the rotator in degrees. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__mechanicalposition

func (*Rotator) GetPosition

func (r *Rotator) GetPosition() (float64, error)

GetPosition()

@returns the current instantaneous Rotator position, in degrees. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__position

func (*Rotator) GetReverse

func (r *Rotator) GetReverse() (bool, error)

GetReverse()

@returns the rotator’s reverse state. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__reverse

func (*Rotator) GetStepSize

func (r *Rotator) GetStepSize() (float64, error)

GetStepSize()

@returns the minimum step size, in degrees. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__stepsize

func (*Rotator) GetTargetPosition

func (r *Rotator) GetTargetPosition() (float64, error)

GetTargetPosition()

@returns the destination position angle for Move() and MoveAbsolute(). @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__stepsize

func (*Rotator) IsConnected added in v0.17.0

func (r *Rotator) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*Rotator) IsMoving

func (r *Rotator) IsMoving() (bool, error)

IsMoving()

@returns true if the rotator is currently moving to a new position. False if the focuser is stationary. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/get_rotator__device_number__ismoving

func (*Rotator) SetConnected

func (r *Rotator) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*Rotator) SetHalt

func (r *Rotator) SetHalt() error

SetHalt() common method to all ASCOM Alpaca compliant devices

@returns an error or nil, if nil it immediately stop any Rotator motion due to a previous Move or MoveAbsolute method call. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/put_rotator__device_number__halt

func (*Rotator) SetMove

func (r *Rotator) SetMove(position float64) error

SetMove()

@params position float64 (relative position to move in degrees from current position.) @returns an error or nil, if nil it causes the rotator to move position degrees relative to the current Position value. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/put_rotator__device_number__move

func (*Rotator) SetMoveAbsolute

func (r *Rotator) SetMoveAbsolute(position float64) error

SetMoveAbsolute()

@params position float64 (absolute position in degrees.) @returns an error or nil, if nil it causes the rotator to move the absolute position of Position degrees. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/put_rotator__device_number__moveabsolute

func (*Rotator) SetMoveMechanical

func (r *Rotator) SetMoveMechanical(position float64) error

SetMoveMechanical()

@params position float64 (absolute position in degrees.) @returns an error or nil, if nil it causes the rotator to move the mechanical position of Position degrees. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/put_rotator__device_number__movemechanical

func (*Rotator) SetReverse

func (r *Rotator) SetReverse(reverse bool) error

SetReverse

@returns an error or nil, if nil it sets the rotator’s reverse state. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/put_rotator__device_number__reverse

func (*Rotator) SetSync

func (r *Rotator) SetSync(position float64) error

SetSync()

@params position float64 (absolute position in degrees.) @returns an error or nil, if nil it causes the rotator to sync to the position of Position degrees. @see https://ascom-standards.org/api/#/Rotator%20Specific%20Methods/put_rotator__device_number__sync

type SafetyMonitor added in v0.8.0

type SafetyMonitor struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
}

func NewSafetyMonitor added in v0.8.0

func NewSafetyMonitor(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint) *SafetyMonitor

func (*SafetyMonitor) GetDescription added in v0.17.0

func (m *SafetyMonitor) GetDescription() (string, error)

GetDescription() common method to all ASCOM Alpaca compliant devices

@returns the description of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__description

func (*SafetyMonitor) IsConnected added in v0.8.0

func (m *SafetyMonitor) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*SafetyMonitor) IsSafe added in v0.8.0

func (m *SafetyMonitor) IsSafe() (bool, error)

IsSafe()

@returns true if the state is safe, false if it is unsafe. Indicates whether the monitored state is safe for use. @see https://ascom-standards.org/api/#/SafetyMonitor%20Specific%20Methods/get_safetymonitor__device_number__issafe

func (*SafetyMonitor) SetConnected added in v0.8.0

func (m *SafetyMonitor) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

type SensorType added in v0.5.0

type SensorType int32
const (
	Monochrome SensorType = iota
	ColourNotRequiringDecoding
	RGGBBayerEncoding
	CMYGBayerEncoding
	CMYG2BayerEncoding
	LRGBTRUESENSEBayerEncoding
)

func (SensorType) String added in v0.15.0

func (s SensorType) String() string

type ShutterStatus added in v0.7.0

type ShutterStatus int32
const (
	Open ShutterStatus = iota
	Closed
	Opening
	Closing
	Error
)

func (ShutterStatus) String added in v0.12.0

func (s ShutterStatus) String() string

type Telescope

type Telescope struct {
	Alpaca       *ASCOMAlpacaAPIClient
	DeviceNumber uint
	Tracking     TrackingMode
}

func NewTelescope

func NewTelescope(clientId uint32, secure bool, domain string, ip string, port int32, deviceNumber uint, tm TrackingMode) *Telescope

func (*Telescope) CanFindHome

func (t *Telescope) CanFindHome() (bool, error)

CanFindHome()

@returns true if this telescope is capable of programmed finding its home position (FindHome() method). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canfindhome

func (*Telescope) CanMoveAxis

func (t *Telescope) CanMoveAxis(axis AxisType) (bool, error)

CanMoveAxis()

@returns true if this telescope can move the requested axis. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canmoveaxis

func (*Telescope) CanPark

func (t *Telescope) CanPark() (bool, error)

CanPark()

@returns true if this telescope is capable of programmed parking (Park() method) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canpark

func (*Telescope) CanPulseGuide

func (t *Telescope) CanPulseGuide() (bool, error)

CanPulseGuide()

@returns true if this telescope is capable of software-pulsed guiding (via the PulseGuide(GuideDirections, Int32) method) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canpulseguide

func (*Telescope) CanSetDeclinationRate

func (t *Telescope) CanSetDeclinationRate() (bool, error)

CanSetDeclinationRate()

@returns true if the DeclinationRate property can be changed to provide offset tracking in the declination axis. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansetdeclinationrate

func (*Telescope) CanSetGuideRates

func (t *Telescope) CanSetGuideRates() (bool, error)

CanSetGuideRates()

@returns true if the guide rate properties used for PulseGuide(GuideDirections, Int32) can ba adjusted. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansetguiderates

func (*Telescope) CanSetPark

func (t *Telescope) CanSetPark() (bool, error)

CanSetPark()

@returns true if this telescope is capable of programmed parking (Park() method) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansetpark

func (*Telescope) CanSetPierSide

func (t *Telescope) CanSetPierSide() (bool, error)

CanSetPierSide()

@returns true if the SideOfPier property can be set, meaning that the mount can be forced to flip. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansetpierside

func (*Telescope) CanSetRightAscensionRate

func (t *Telescope) CanSetRightAscensionRate() (bool, error)

CanSetRightAscensionRate()

@returns true if the RightAscensionRate property can be changed to provide offset tracking in the right ascension axis. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansetrightascensionrate

func (*Telescope) CanSetTracking

func (t *Telescope) CanSetTracking() (bool, error)

CanSetTracking()

@returns true if the Tracking property can be changed, turning telescope sidereal tracking on and off. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansettracking

func (*Telescope) CanSlew

func (t *Telescope) CanSlew() (bool, error)

CanSlew()

@returns true if this telescope is capable of programmed slewing (synchronous or asynchronous) to equatorial coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canslew

func (*Telescope) CanSlewAltAz

func (t *Telescope) CanSlewAltAz() (bool, error)

CanSlewAltAz()

@returns true if this telescope is capable of programmed slewing (synchronous or asynchronous) to local horizontal coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canslewaltaz

func (*Telescope) CanSlewAltAzAsync

func (t *Telescope) CanSlewAltAzAsync() (bool, error)

CanSlewAltAzAsync()

@returns true if this telescope is capable of programmed asynchronous slewing to local horizontal coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canslewaltazasync

func (*Telescope) CanSlewAsync

func (t *Telescope) CanSlewAsync() (bool, error)

CanSlewAsync()

@returns true if this telescope is capable of programmed asynchronous slewing to equatorial coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canslewasync

func (*Telescope) CanSync

func (t *Telescope) CanSync() (bool, error)

CanSync()

@returns true if this telescope is capable of programmed synching to equatorial coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansync

func (*Telescope) CanSyncAltAz

func (t *Telescope) CanSyncAltAz() (bool, error)

CanSyncAltAz()

@returns true if this telescope is capable of programmed synching to local horizontal coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__cansyncaltaz

func (*Telescope) CanUnPark

func (t *Telescope) CanUnPark() (bool, error)

CanUnPark()

@returns true if this telescope is capable of programmed unparking (UnPark() method) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__canunpark

func (*Telescope) DoesRefraction

func (t *Telescope) DoesRefraction() (bool, error)

DoesRefraction()

@returns true if the telescope or driver applies atmospheric refraction to coordinates @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__doesrefraction

func (*Telescope) FindHome added in v0.20.0

func (t *Telescope) FindHome() error

FindHome()

@returns an error or nil, if nil it puts the telescope into the homed state. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__findhome

func (*Telescope) GetAlignmentMode

func (t *Telescope) GetAlignmentMode() (string, error)

GetAlignmentMode()

@returns the alignment mode of the mount (Alt/Az, Polar, German Polar). The alignment mode is specified as an integer value from the AlignmentModes Enum. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__alignmentmode

func (*Telescope) GetAltitude

func (t *Telescope) GetAltitude() (float64, error)

GetAltitude()

@returns the altitude above the local horizon of the mount's current position (degrees, positive up) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__altitude

func (*Telescope) GetApertureArea

func (t *Telescope) GetApertureArea() (float64, error)

GetApertureArea()

@returns the area of the telescope's aperture, taking into account any obstructions (square meters) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__aperturearea

func (*Telescope) GetApertureDiameter

func (t *Telescope) GetApertureDiameter() (float64, error)

GetApertureDiameter()

@returns the telescope's effective aperture diameter (meters) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__aperturediameter

func (*Telescope) GetAxisRates

func (t *Telescope) GetAxisRates(axis AxisType) (map[string]float64, error)

GetAxisRates()

@returns the rates at which the telescope may be moved about the specified axis by the MoveAxis(TelescopeAxes, Double) method. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__axisrates

func (*Telescope) GetAzimuth

func (t *Telescope) GetAzimuth() (float64, error)

GetAzimuth()

@returns the azimuth at the local horizon of the mount's current position (degrees, North-referenced, positive East/clockwise). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__azimuth

func (*Telescope) GetDeclination

func (t *Telescope) GetDeclination() (float64, error)

GetDeclination()

@returns the declination (degrees) of the mount's current equatorial coordinates, in the coordinate system given by the EquatorialSystem property. Reading the property will raise an error if the value is unavailable. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__declination

func (*Telescope) GetDeclinationRate

func (t *Telescope) GetDeclinationRate() (float64, error)

GetDeclinationRate()

@returns the declination tracking rate (arcseconds per second, default = 0.0) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__declinationrate

func (*Telescope) GetDescription added in v0.17.0

func (t *Telescope) GetDescription() (string, error)

GetDescription() common method to all ASCOM Alpaca compliant devices

@returns the description of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__description

func (*Telescope) GetEquatorialSystem

func (t *Telescope) GetEquatorialSystem() (string, error)

GetEquatorialSystem()

@returns the current equatorial coordinate system used by this telescope (e.g. Topocentric or J2000). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__equatorialsystem

func (*Telescope) GetFocalLength

func (t *Telescope) GetFocalLength() (float64, error)

GetFocalLength()

@returns the telescope's focal length in meters @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__focallength

func (*Telescope) GetRightAscension

func (t *Telescope) GetRightAscension() (float64, error)

GetRightAscension()

@returns the right ascension (hours) of the mount's current equatorial coordinates, in the coordinate system given by the EquatorialSystem property @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__rightascension

func (*Telescope) GetRightAscensionRate

func (t *Telescope) GetRightAscensionRate() (float64, error)

GetRightAscensionRate()

@returns the right ascension tracking rate (arcseconds per second, default = 0.0) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__rightascensionrate

func (*Telescope) GetSideOfPier

func (t *Telescope) GetSideOfPier() (PierPointingMode, error)

GetSideOfPier()

@returns the pointing state of the mount. 0 = pierEast, 1 = pierWest, -1= pierUnknown @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__sideofpier

func (*Telescope) GetSiderealTime

func (t *Telescope) GetSiderealTime() (float64, error)

GetSiderealTime()

@returns the local apparent sidereal time from the telescope's internal clock (hours, sidereal). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__siderealtime

func (*Telescope) GetSiteElevation

func (t *Telescope) GetSiteElevation() (float64, error)

GetSiteElevation()

@returns the elevation above mean sea level (meters) of the site at which the telescope is located. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__siteelevation

func (*Telescope) GetSiteLatitude

func (t *Telescope) GetSiteLatitude() (float64, error)

GetSiteLatitude()

@returns the geodetic(map) latitude (degrees, positive North, WGS84) of the site at which the telescope is located. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__sitelatitude

func (*Telescope) GetSiteLongitude

func (t *Telescope) GetSiteLongitude() (float64, error)

GetSiteLongitude()

@returns the geodetic(map) longitude (degrees, positive East, WGS84) of the site at which the telescope is located. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__sitelongitude

func (*Telescope) GetSlewSettleTime

func (t *Telescope) GetSlewSettleTime() (int32, error)

GetSlewSettleTime()

@returns the post-slew settling time (in seconds). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__slewsettletime

func (*Telescope) GetTargetDeclination

func (t *Telescope) GetTargetDeclination() (float64, error)

GetTargetDeclination()

@returns the declination (degrees, positive North) for the target of an equatorial slew or sync operation. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__targetdeclination

func (*Telescope) GetTargetRightAscension

func (t *Telescope) GetTargetRightAscension() (float64, error)

GetTargetRightAscension()

@returns the right ascension (hours) for the target of an equatorial slew or sync operation @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__targetrightascension

func (*Telescope) GetTrackingRate

func (t *Telescope) GetTrackingRate() (int32, error)

GetTrackingRate()

@returns the current tracking rate of the telescope's sidereal drive. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__trackingrate

func (*Telescope) GetUTCDate

func (t *Telescope) GetUTCDate() (time.Time, error)

GetUTCDate()

@returns the UTC date/time of the telescope's internal clock in ISO 8601 format including fractional seconds. The general format (in Microsoft custom date format style) is yyyy-MM-ddTHH:mm:ss.fffffffZ e.g. 2016-03-04T17:45:31.1234567Z or 2016-11-14T07:03:08.1234567Z Please note the compulsary trailing Z indicating the 'Zulu', UTC time zone. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__utcdate

func (*Telescope) IsAtHome

func (t *Telescope) IsAtHome() (bool, error)

IsAtHome()

@returns true if the mount is stopped in the Home position. This property will alwayts be false if the telescope does not support homing. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__athome

func (*Telescope) IsAtPark

func (t *Telescope) IsAtPark() (bool, error)

IsAtPark()

@returns true if the telescope has been put into the parked state by the seee Park() method. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__atpark

func (*Telescope) IsConnected added in v0.9.0

func (t *Telescope) IsConnected() (bool, error)

IsConnected() common method to all ASCOM Alpaca compliant devices

@returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/get__device_type___device_number__connected

func (*Telescope) IsPulseGuiding

func (t *Telescope) IsPulseGuiding() (bool, error)

IsPulseGuiding()

@returns true if a PulseGuide(GuideDirections, Int32) command is in progress, false otherwise @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__ispulseguiding

func (*Telescope) IsSlewing

func (t *Telescope) IsSlewing() (bool, error)

IsSlewing()

@returns true if telescope is currently moving in response to one of the Slew methods or the MoveAxis(TelescopeAxes, Double) method, false at all other times. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__slewing

func (*Telescope) IsTracking

func (t *Telescope) IsTracking() (bool, error)

IsTracking()

@returns the state of the telescope's sidereal tracking drive. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/get_telescope__device_number__tracking

func (*Telescope) SetAbortSlew

func (t *Telescope) SetAbortSlew() error

SetAbortSlew()

@returns an error or nil, if nil immediately Stops a slew in progress. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__abortslew

func (*Telescope) SetConnected added in v0.9.0

func (t *Telescope) SetConnected(connected bool) error

SetConnected() common method to all ASCOM Alpaca compliant devices

@param connected bool (set True to connect to the device hardware, set false to disconnect from the device hardware) @returns the connected state of the device @see https://ascom-standards.org/api/#/ASCOM%20Methods%20Common%20To%20All%20Devices/put__device_type___device_number__connected

func (*Telescope) SetDeclinationRate

func (t *Telescope) SetDeclinationRate(declinationRate float64) error

SetDeclinationRate()

@returns an error or nil, if nil it sets the declination tracking rate (arcseconds per second) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__declinationrate

func (*Telescope) SetDoesRefraction

func (t *Telescope) SetDoesRefraction(doesRefraction bool) error

SetDoesRefraction()

Determines whether atmospheric refraction is applied to coordinates.

@returns an error or nil, if nil causes the rotator to move Position degrees relative to the current position value. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__doesrefraction

func (*Telescope) SetPark added in v0.19.0

func (t *Telescope) SetPark() error

SetPark()

@returns an error or nil, if nil it takes telescope out of the Parked state. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__unpark

func (*Telescope) SetRightAscensionRate

func (t *Telescope) SetRightAscensionRate(rightAscensionRate float64) error

SetRightAscensionRate()

@returns an error or nil, if nil it sets the right ascension tracking rate (arcseconds per second) @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__rightascensionrate

func (*Telescope) SetSideOfPier

func (t *Telescope) SetSideOfPier(sideOfPier PierPointingMode) error

SetSideOfPier()

@returns an error or nil, if nil it sets the pointing state of the mount. 0 = pierEast, 1 = pierWest @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__sideofpier

func (*Telescope) SetSiteElevation

func (t *Telescope) SetSiteElevation(siteElevation float64) error

SetSiteElevation()

@params siteElevation - the site elevation above mean sea level (metres). @returns an error or nil, if nil it sets the elevation above mean sea level (metres) of the site at which the telescope is located. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__siteelevation

func (*Telescope) SetSiteLatitude

func (t *Telescope) SetSiteLatitude(siteLatitude float64) error

SetSiteLatitude()

@returns an error or nil, if nil it sets the observing site's latitude (degrees). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__sitelatitude

func (*Telescope) SetSiteLongitude

func (t *Telescope) SetSiteLongitude(siteLongitude float64) error

SetSiteLongitude()

@returns an error or nil, if nil it sets the observing site's longitude (degrees, positive East, WGS84). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__sitelongitude

func (*Telescope) SetSlewSettleTime

func (t *Telescope) SetSlewSettleTime(slewSettleTime int32) error

SetSlewSettleTime()

@returns an error or nil, if nil it sets the post-slew settling time (integer sec.). @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewsettletime

func (*Telescope) SetSlewToAltAz

func (t *Telescope) SetSlewToAltAz(altitude float64, azimuth float64) error

SetSlewToAltAz

@returns an error or nil, if nil it moves the telescope to the given local horizontal coordinates, return when slew is complete @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewtoaltaz

func (*Telescope) SetSlewToAltAzAsync

func (t *Telescope) SetSlewToAltAzAsync(altitude float64, azimuth float64) error

SetSlewToAltAzAsync

@returns an error or nil, if nil it moves the telescope to the given local horizontal coordinates, return immediately after the slew starts. The client can poll the Slewing method to determine when the mount reaches the intended coordinates. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewtoaltazasync

func (*Telescope) SetSlewToCoordinates

func (t *Telescope) SetSlewToCoordinates(rightAscension float64, declination float64) error

SetSlewToCoordinates

@returns an error or nil, if nil it moves the telescope to the given local horizontal coordinates, return immediately after the slew starts. The client can poll the Slewing method to determine when the mount reaches the intended coordinates. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewtocoordinates

func (*Telescope) SetSlewToCoordinatesAsync

func (t *Telescope) SetSlewToCoordinatesAsync(rightAscension float64, declination float64) error

SetSlewToCoordinatesAsync

@returns an error or nil, if nil it moves the telescope to the given equatorial coordinates, return immediately after the slew starts. The client can poll the Slewing method to determine when the mount reaches the intended coordinates. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewtocoordinatesasync

func (*Telescope) SetSlewToTarget

func (t *Telescope) SetSlewToTarget() error

SetSlewToTarget

@returns an error or nil, if nil it moves the telescope to the TargetRightAscension and TargetDeclination equatorial coordinates, return when slew is complete @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewtotarget

func (*Telescope) SetSlewToTargetAsync

func (t *Telescope) SetSlewToTargetAsync() error

SetSlewToTargetAsync

@returns an error or nil, if nil it moves the telescope to the TargetRightAscension and TargetDeclination equatorial coordinates, return immediately after the slew starts. The client can poll the Slewing method to determine when the mount reaches the intended coordinates. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__slewtotargetasync

func (*Telescope) SetTargetDeclination

func (t *Telescope) SetTargetDeclination(targetDeclination float64) error

SetTargetDeclination()

@returns an error or nil, if nil it sets the declination (degrees, positive North) for the target of an equatorial slew or sync operation. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__targetdeclination

func (*Telescope) SetTargetRightAscension

func (t *Telescope) SetTargetRightAscension(targetRightAscension float64) error

SetTargetRightAscension()

@returns an error or nil, if nil it the right ascension (hours) for the target of an equatorial slew or sync operation @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__targetrightascension

func (*Telescope) SetTracking

func (t *Telescope) SetTracking(tracking bool) error

SetTracking()

@returns an error or nil, if nil it sets the state of the telescope's sidereal tracking drive. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__tracking

func (*Telescope) SetUTCDate

func (t *Telescope) SetUTCDate(UTCDate time.Time) error

SetUTCDate()

@returns an error or nil, if nil it sets the UTC date/time of the telescope's internal clock in ISO 8601 format including fractional seconds. The general format (in Microsoft custom date format style) is yyyy-MM-ddTHH:mm:ss.fffffffZ e.g. 2016-03-04T17:45:31.1234567Z or 2016-11-14T07:03:08.1234567Z Please note the compulsary trailing Z indicating the 'Zulu', UTC time zone. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__utcdate

func (*Telescope) SetUnPark

func (t *Telescope) SetUnPark() error

/* SetUnPark()

@returns an error or nil, if nil it takes telescope out of the Parked state. @see https://ascom-standards.org/api/#/Telescope%20Specific%20Methods/put_telescope__device_number__unpark

type TrackingMode

type TrackingMode int
const (
	NotTracking TrackingMode = iota
	Alt_Az
	EQ_North
	EQ_South
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL