Drive control

The classes described here are used to control the radio telescope’s drives via an Arduino Due-based controller which runs qp (https://bitbucket.org/nxg/qp) by Norman Gray.

Configuration

The configuration settings for the drive class are checked for in the main settings.cfg used for the entire package.

Earth location should be given as latitude and longitude, in degrees, and elevation, in metres.

Drive

class acreroad_1420.drive.Drive(device, baud, timeout=3, simulate=0, calibration=None, location=None, persist=True)[source]

Attributes

current_time
current_time_local

Methods

calibrate
goto
home
move
panic
parse
setLocation
setTime
set_status_cadence
set_status_message
skycoord
slewSuccess
status
stow
track
calibrate(values=None)[source]

Carries-out a calibration run, returning two numbers which are offsets, or sets the calibration if known values are provided.

Parameters:

values : str

The calibration values produced by a previous calibration run of the telescope, provided in the format “nnn nnn”

current_time

Return the current UTC time as an AstroPy time object.

current_time_local

return the current local time

goto(skycoord, track=True)[source]

Moves the telescope to point at a given sky location, and then commands the drive to track the point.

Parameters:

skycoord : astropy.SkyCoord object

An astropy SkyCoord object which contains the sky location to slew to. This can also be a list of locations which the telescope will slew to sequentially.

home()[source]

Slews the telescope to the home position.

move(direction)[source]

Start moving the telescope in a specified direction.

Parameters:

direction : {left, right, up, down}

Direction to move the telescope.

panic()[source]

Stops the telescope drives.

setLocation(location=None, dlat=0, dlon=0, azimuth=None, altitude=None)[source]

Sets the location of the telescope.

Parameters:

location : astropy.coordinates.EarthLocation object

The observatory location

azimuth : float

The azimuth location in radians of the home position

altitude : float

The altitude location in radians of the home position

setTime()[source]

Sets the time on the drive controller’s clock to the current system time.

set_status_cadence(interval)[source]

Sets the cadence of the status messages from the controller.

set_status_message(message)[source]

Determines the output of the status messages produced by the controller.

slewSuccess(targetPos)[source]
status()[source]

Returns a dictionary describing the status of the telescope (e.g. its location).

Returns:

dict

A dictionary containing the right ascension, declination, altitude, and azimuth of the telescope.

Examples

>>> from astropy.coordinates import SkyCoord
>>> from astropy.coordinates import ICRS, 
>>> c = SkyCoord(frame="galactic", l="1h12m43.2s", b="+1d12m43s")
>>> self.connection.goto(c)
>>> ra = self.connection.status()['ra'].value
stow()[source]

Slews the telescope to the stowing position (pointed at the zenith)