Main Page   Alphabetical List   Compound List   File List   Compound Members  

LX200 Class Reference

Provides control over LX200 and Autostar based telescopes. More...

#include <lx200.h>

List of all members.

Public Types

enum  TSlew { CENTER, GUIDE, MOVE, SLEW }
enum  TAlign { ALTAZ, GERMAN, LAND, POLAR }
enum  TDirection { EAST, NORTH, SOUTH, WEST }
enum  TFormat { LX200SHORT, LX200LONG, LX200UNDEFINED }
enum  TTelescope { LX200CLASSIC, LX200AUTOSTAR }
enum  TFocus {
  FOCUSIN, FOCUSOUT, QUITFOCUS, FOCUSFAST,
  FOCUSSLOW
}
enum  TTime { TWELVEHOUR, TWENTYFOURHOUR }
enum  TObjects { CNGC, IC, UGC }
enum  TLibrary { STAR, SAO, GCVS }
enum  TFreq { MANUAL, QUARTZ, INCREMENT, DECREMENT }

Public Methods

 LX200 ()
 ~LX200 ()
bool Connect ()
bool Connect (const char *portID)
char ACK ()
int getHourMode ()
double getLX200RA ()
double getLX200DEC ()
double getObjRA ()
double getObjDEC ()
double getLX200Alt ()
double getLX200Az ()
double getSideralTime ()
char * getCalenderDate ()
double getSiteLaitude ()
double getSiteLongitude ()
double getLocalTime (int timeFormat)
bool isFINDTypeSelected ()
char * getFINDQuality ()
int getFINDBoundaryLimit (int boundary)
double getFINDMagnitudeLimit (int boundary)
int getFINDSizeLimit (int boundary)
int getFIELDRadius ()
char * getSiteName (int siteNum)
int getUCTOffset ()
double getCurrentTrackFreq ()
char * getVersionDate ()
char * getVersionTime ()
char * getFullVersion ()
char * getVersionNumber ()
char * getProductName ()
int getNumberOfBars ()
TFormat getLX200Format ()
bool setObjAlt (int degrees, int minutes)
bool setObjAz (int degrees, int minutes)
bool setCalendarDate (int dd, int mm, int yy)
bool setSiteLongitude (int degrees, int minutes)
bool setSiteLatitude (int degrees, int minutes)
bool setUTCOffset (int hours)
bool setLocalTime (int hours, int minutes, int seconds)
bool setSiteName (int siteNum, const char *siteName)
bool setObjDEC (int degrees, int minutes, int seconds)
bool setObjRA (int hours, int minutes, int seconds)
bool setSiderealTime (int hours, int minutes, int seconds)
bool setTrackFreq (double Freq)
bool setMaxSlewRate (int slewRate)
void setAlignmentMode (TAlign alignMode)
void setHourMode (TTime hMode)
void setTrackingRate (TFreq tRate)
void selectSite (int siteNum)
bool setFINDMagnitudeLimit (int boundary, double magnitude)
bool setFINDBoundaryLimit (int boundary, int degrees)
bool setFINDSizeLimit (int boundary, int size)
bool setFINDStringType ()
bool setFIELDRadius (int radius)
void increaseReticleBrightness ()
void descreaseReticleBrightness ()
void setReticleFlashingMode (int fMode)
void setLX200Format (TFormat format)
void slewToAltAz ()
void move (TDirection dir)
int slewToObj ()
void abortMove (TDirection dir)
void abortSlew ()
void libraryPrevObj ()
void libraryNextObj ()
void libraryStartFind ()
char * libraryObjInfo ()
char * libraryFieldInfo ()
void libraryFindCNGC (int identifier)
void libraryFindMessier (int identifier)
void libraryFindStarType (int identifer)
bool librarySetNGCType (TObjects ID)
bool librarySetSTARType (TLibrary ID)
char * Sync ()
void turnFanOn ()
void turnFanOff ()
void startHomeSearch (int SaveSetOption)
int HomeSearchResult ()
void fieldDeRotator (bool turnOn)
void focusControl (TFocus fMode)
bool highPrecision ()
void toggleSmartDrive (int cToggle)

Protected Methods

int openPort (const char *portID)
int portWrite (const char *buf)
int portRead (char *buf, int nbytes)
bool queryData ()


Detailed Description

Provides control over LX200 and Autostar based telescopes.

The LX200 Control class provides low level access to the LX200 command set. Both LX200 classic telescopes and Autostar based telescopes are supported.
The class communicates with the telescope via the RS232 interface. It can search and query telescopes connected to the serial port automatically.

There are difference on how the LX200 classic telescopes and LX200 Autostar-based telescopes handle and process the command set. Therefore, whenever such a difference arises, a case-specifc explanation is provided.

For more information, please check the LX200 Command Set reference.

The class provides full access to the following command groupings:

  • Alignment.
  • Reticle Control.
  • Sync Control.
  • Fan Control.
  • Focus Control.
  • Home Position.
  • Library Commands.
  • Movement Commands.
  • High Precision.
  • Smart Drive Control.
  • Field De-rotator.
  • Rate Control.
  • Tracking Frequency.
  • User Format Control.
  • Waypoint (site) query.

    Author:
    Jasem Mutlaq
    Version:
    0.1


    Member Enumeration Documentation

    enum LX200::TAlign
     

    Alignment modes

    enum LX200::TDirection
     

    Directions

    enum LX200::TFocus
     

    Focus operation

    enum LX200::TFormat
     

    Formats of Right ascention and Declenation
    LX200SHORT NN*NN.N
    LX200LONG NN:NN:NN

    enum LX200::TFreq
     

    Frequency mode

    enum LX200::TLibrary
     

    Star-type Library catalogs

    enum LX200::TObjects
     

    NGC-type Library catalogs

    enum LX200::TSlew
     

    Slew modes

    enum LX200::TTelescope
     

    Telscope type

    enum LX200::TTime
     

    Time format


    Member Function Documentation

    void LX200::abortMove TDirection    dir
     

    Aborts movement in the requested direction.

    Parameters:
    dir  can be either NORTH, EAST, SOUTH, or WEST.

    void LX200::abortSlew  
     

    Aborts slew in any direction.

    char LX200::ACK  
     

    ACK queries the telescope for alignment mode. Alignment mode can be one of the following:

  • AltAz (A)
  • German (G)
  • Land (L)
  • Polar (P)

    Returns :
    a char indicating alignment mode
  • bool LX200::Connect const char *    portID
     

    Connect searches for LX200-based telescopes connected via the serial port. It is an overloaded function that specifically search for a telescope on a specific port.
    When a telescope is found, it is queried for basic data to determine the telescope type and other internal parameters.

    Parameters:
    portID  a string to the port device name. e.g. "/dev/ttyS0"
    Returns :
    true if a telescope is found and was successfully connected

    bool LX200::Connect  
     

    Connect searches for LX200-based telescopes connected via the serial port. It begins search at COM1 and ends at COM4.
    When a telescope is found, it is queried for basic data to determine the telescope type and other internal parameters.

    Returns :
    true if a telescope is found and was successfully connected

    void LX200::descreaseReticleBrightness  
     

    Decreases reticle brightness

    void LX200::fieldDeRotator bool    turnOn
     

    Turns the field derotator On or Off. This command applies only to 16" LX200.

    Parameters:
    turnOn  if turnOn is true, the derotator is turned on, otherwise, it is turned off.

    void LX200::focusControl TFocus    fMode
     

    Sets FOCUS mode.

    Parameters:
    fMode  can be either FOCUSIN, FOCUSOUT, QUITFOCUS, FOCUSFAST, or FOCUSSLOW

    char* LX200::getCalenderDate  
     

    Returns :
    Calendar date in mm/dd/yy format

    double LX200::getCurrentTrackFreq  
     

    Returns :
    Tracking freqency

    int LX200::getFIELDRadius  
     

    Returns :
    FILED radius

    int LX200::getFINDBoundaryLimit int    boundary
     

    Gets FIND operation LOWER or HIGHER limit.

    Parameters:
    boundary  0 indicates LOWER and 1 indicates HIGHER.
    Returns :
    FIND operation limit

    double LX200::getFINDMagnitudeLimit int    boundary
     

    Gets FIND operation FAINTER or BRIGHTER magnitude limit.

    Parameters:
    boundary  0 indicates FAINTER and 1 indicates BRIGHTER.
    Returns :
    FIND operation manitude limit

    char* LX200::getFINDQuality  
     

    Gets FIND operation quality.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    Returns :
    A string indicating FIND quality. The string can be any of the following:
  • SU (Super)
  • EX (Excellent)
  • VG (Very good)
  • GD (Good)
  • FR (Fair)
  • PR (Poor)
  • VP (Very poor)
  • int LX200::getFINDSizeLimit int    boundary
     

    Gets FIND operation SMALLER or LARGER size limit.

    Parameters:
    boundary  0 indicates SMALLER, and 1 indicates LARGER.
    Returns :
    FIND operation size limit

    char* LX200::getFullVersion  
     

    Returns :
    A string contianing a full description of the version

    int LX200::getHourMode  
     

    Gets internal hour format. Autostar based telescope always return 24

    Returns :
    12 or 24

    double LX200::getLocalTime int    timeFormat
     

    Gets local time. The local time is computed in the same way as getLX200RA()

    Returns :
    local time

    double LX200::getLX200Alt  
     

    Gets LX200 Altitude. The Alt is computed in the same way as getLX200DEC()

    Returns :
    Telescope's altitude

    double LX200::getLX200Az  
     

    Gets LX200 Azimuth. The Az is computed in the same way as getLX200RA()

    Returns :
    Telescope's azimith

    double LX200::getLX200DEC  
     

    Gets LX200 Declination in a double format. The DEC is calculated using the following formula:


    Returns :
    Telescope's Declination

    TFormat LX200::getLX200Format  
     

    Gets LX200 internal coordinates format.

    Returns :
    LX200SHORT for short format, and LX200LONG for long format.

    double LX200::getLX200RA  
     

    Gets LX200 Right Ascension in a double format. The RA is calculated using the following formula:


    Returns :
    Telescope's Right Ascension

    int LX200::getNumberOfBars  
     

    Gets number of bars on display unit.

    LX200 Autostar specific: Autostar returns 1 when slewing, otherwise 0.

    Returns :
    number of bars.

    double LX200::getObjDEC  
     

    Gets Current object Declination. The DEC is computed in the same way as getLX200DEC()

    Returns :
    Objects's Right Ascension

    double LX200::getObjRA  
     

    Gets Current object Right Ascension. The RA is computed in the same way as getLX200RA()

    Returns :
    Objects's Right Ascension

    char* LX200::getProductName  
     

    Returns :
    product name

    double LX200::getSideralTime  
     

    Gets Sidereal time. The ST is computed in the same way as getLX200RA()

    Returns :
    Sideral time

    double LX200::getSiteLaitude  
     

    Gets current site latitude. The latitude is computed in the same way as getLX200DEC()

    Returns :
    Current site latitude

    double LX200::getSiteLongitude  
     

    Gets current site longitude. The long. is computed in the same way as getLX200RA()

    Returns :
    Current site longitude

    char* LX200::getSiteName int    siteNum
     

    Parameters:
    siteNum  site 1, 2, 3, or 4
    Returns :
    name of requested site

    int LX200::getUCTOffset  
     

    Returns :
    Current site's UTC offset

    char* LX200::getVersionDate  
     

    Returns :
    A string contianing version date

    char* LX200::getVersionNumber  
     

    Returns :
    A string contianing version number (major.minor)

    char* LX200::getVersionTime  
     

    Returns :
    A string contianing version time

    bool LX200::highPrecision  
     

    Checks if current precision mode is high precision.

    Returns :
    true if mode is high precision. Autostar always return true.

    int LX200::HomeSearchResult  
     

    Starts a home search. This command applies only to 16" LX200.

    Returns :
    One of the following values:
  • 0 if home search failed.
  • 1 if home search found.
  • 2 if home search in progress
  • void LX200::increaseReticleBrightness  
     

    Increases reticle brightness

    bool LX200::isFINDTypeSelected  
     

    Returns :
    true if FIND string type is active

    char* LX200::libraryFieldInfo  
     

    Returns :
    A string containing a list of objects available in the FIELD. Autostar always returns "Objects: 0"

    void LX200::libraryFindCNGC int    identifier
     

    Find CNGC type object.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    Parameters:
    identifier  is a four digit NNNN object identifier.

    void LX200::libraryFindMessier int    identifier
     

    Find Messier type object.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    Parameters:
    identifier  is a four digit NNNN object identifier. Valid values are 1...110

    void LX200::libraryFindStarType int    identifer
     

    Find STAR type object.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    Parameters:
    identifier  is a four digit NNNN object identifier. The planets are STAR 901...909.

    void LX200::libraryNextObj  
     

    Go to next object in FIND.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    char* LX200::libraryObjInfo  
     

    Retrives current object information.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes. Autosar always return the same string "M31 EX GAL MAG 3.5 SZ178.0'#".

    Returns :
    A string containing object information

    void LX200::libraryPrevObj  
     

    Go to previous object in FIND.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    bool LX200::librarySetNGCType TObjects    ID
     

    Sets NGC type catalog.

    Parameters:
    ID  can be either CNGC, IC, or UGC.
    Returns :
    true if library catalog was successfully set

    bool LX200::librarySetSTARType TLibrary    ID
     

    Sets STAR type catalog.

    Parameters:
    ID  can be either STAR, SAO, or GCVS.
    Returns :
    true if library catalog was successfully set

    void LX200::libraryStartFind  
     

    Starts a FIND operation.

    LX200 classic Specific: This operation is avaiable only to LX200 classic telescopes.

    void LX200::move TDirection    dir
     

    Moves the telescope in the requested direction.

    Parameters:
    dir  can be either NORTH, EAST, SOUTH, or WEST.

    int LX200::openPort const char *    portID [protected]
     

    Opens a terminal port for read/write

    Parameters:
    portID  is a terminated string to a terminal device. e.g. "/dev/ttyS0"
    Returns :
    the file descriptor number if successful, or -1 on failure.

    int LX200::portRead char *    buf,
    int    nbytes
    [protected]
     

    Reads from a port

    Parameters:
    buf  is a pointer to the buffer to be written to.
    nbytes  is the number of bytes to be read. In case of -1, the function will read until it encounters a hash-mark #
    Returns :
    the number of bytes remaining to be read if nbytes > 0. If nbytes is -1 then it returns the number of bytes read.

    int LX200::portWrite const char *    buf [protected]
     

    Writes to a port

    Parameters:
    buf  is a pointer to the buffer to be written. The buffer string must be a terminated.
    Returns :
    the number of bytes remaining to be written. That is, if successful, the function will return 0.

    bool LX200::queryData   [protected]
     

    Queries basic data from the telescope. The function attempts to determine the time and coordinates format, and the type of telescope being connected to. It stores the data in internal class members.

    Returns :
    true if the query operation was successful

    void LX200::selectSite int    siteNum
     

    Selects and sets active site.

    Parameters:
    siteNum  is the site identified. It can be either 1, 2, 3, or 4.

    void LX200::setAlignmentMode TAlign    alignMode
     

    Sets Alignment mode.

    Parameters:
    alignMode  can be either ALTAZ, LAND, or POLAR.

    bool LX200::setCalendarDate int    dd,
    int    mm,
    int    yy
     

    Sets calendar date.

    Returns :
    true if date is valid and was successfully set.

    bool LX200::setFIELDRadius int    radius
     

    Sets FIELD radius

    Parameters:
    radius  is FIELD's radius in degrees.
    Returns :
    true if FIELD's radius was successfully set

    bool LX200::setFINDBoundaryLimit int    boundary,
    int    degrees
     

    Sets FIND operation boundary limit

    Parameters:
    boundary  0 indicates LOWER, 1 indicates HIGHER.
    degrees  is the limiting search scope for FIND operation
    Returns :
    true if boundary limit was successfully set

    bool LX200::setFINDMagnitudeLimit int    boundary,
    double    magnitude
     

    Sets FIND operation magnitude search limit

    Parameters:
    boundary  0 indicates FAINTER, 1 indicates BRIGHTER.
    magnitude  is the limiting magnitude of the FIND operation
    Returns :
    true if magnitude limit was successfully set

    bool LX200::setFINDSizeLimit int    boundary,
    int    size
     

    Sets FIND operation size limit

    Parameters:
    boundary  0 indicates SMALLER, 1 indicates LARGER.
    size  is the limiting number of objects searched via the FIND operation
    Returns :
    true is size limit was successfully set

    bool LX200::setFINDStringType  
     

    Sets FIND operation string (I really don't know what this does!!, I'll ask)

    Returns :
    true if I know what it does!!

    void LX200::setHourMode TTime    hMode
     

    Sets Internal hour mode.

    Parameters:
    hMode  can be either TWELVEHOUR or TWENTYFOURHOUR

    bool LX200::setLocalTime int    hours,
    int    minutes,
    int    seconds
     

    Sets Local time.

    Returns :
    true if local time was successfully set.

    void LX200::setLX200Format TFormat    format
     

    Sets LX200 internal coordinates format

    Parameters:
    format  can be either LX200SHORT or LX200LONG.

    bool LX200::setMaxSlewRate int    slewRate
     

    Sets Maximum slew rate (degrees/second).

    LX200 Autostar specific: Autostar maps the slew rate to resemble that of the controller keys:

  • 2 is slowest (0 Key)
  • 3 is medium (5 Key)
  • 4 is fast (9 key)

    Parameters:
    slewRate  2, 3, or 4 degrees/second for LX200 classic telescopes. Autostar maps the rates as explained above.
    Returns :
    true if slew rate was successfully set.
  • bool LX200::setObjAlt int    degrees,
    int    minutes
     

    Sets object Altitude.

    Returns :
    true if object's altitude is successfully set.

    bool LX200::setObjAz int    degrees,
    int    minutes
     

    Sets object Azimuth.

    Returns :
    true if object's azimuth is successfully set.

    bool LX200::setObjDEC int    degrees,
    int    minutes,
    int    seconds
     

    Sets object's declination.

    Returns :
    true if object's DEC was successfully set.

    bool LX200::setObjRA int    hours,
    int    minutes,
    int    seconds
     

    Sets object's right ascension.

    Returns :
    true if object's RA was successfully set.

    void LX200::setReticleFlashingMode int    fMode
     

    Sets Reticle flashing mode

    Parameters:
    fMode  specifes flashing mode. Valid values are from 1...5.

    bool LX200::setSiderealTime int    hours,
    int    minutes,
    int    seconds
     

    Sets Sidereal time.

    Returns :
    true if SD was successfully set.

    bool LX200::setSiteLatitude int    degrees,
    int    minutes
     

    Sets current site latitude.

    Returns :
    true if current site latitude is successfully set.

    bool LX200::setSiteLongitude int    degrees,
    int    minutes
     

    Sets current site longitude.

    Returns :
    true if current site longitude is successfully set.

    bool LX200::setSiteName int    siteNum,
    const char *    siteName
     

    Sets a site name.

    Parameters:
    siteNum  Site identifier. It can be either 1, 2, 3, or 4.
    siteName  A terminated string containing a site name. Must be equal or less than 16 characters long.
    Returns :
    true if site name was successfully set.

    bool LX200::setTrackFreq double    Freq
     

    Sets Tracking frequency.

    Parameters:
    Freq  Tracking frequency in Hz.
    Returns :
    true if tracking frequncy was successfully set.

    void LX200::setTrackingRate TFreq    tRate
     

    Sets Tracking rate.

    Parameters:
    hMode  can be either MANUAL, QUARTZ, INCREMENT, DECREMENT

    bool LX200::setUTCOffset int    hours
     

    Sets UTC offset from local time.

    Parameters:
    hours  Offset ranging from -12 hours to +12 hours.
    Returns :
    true if UTC offset successfully set.

    void LX200::slewToAltAz  
     

    Slews to AltAz. This command applies only to 16" LX200.

    int LX200::slewToObj  
     

    Slews to the current object

    Returns :
    one of the following values:
  • 0 if slew is possible.
  • 1 if object is below the horizon.
  • 2 if object is below HIGHER. Autostar never returns 2.
  • void LX200::startHomeSearch int    SaveSetOption
     

    Starts a home search. This command applies only to 16" LX200.

    Parameters:
    SaveSetOption  is the start search mode. 0 searches and saves the current position. 1 searches and sets the saved position

    char* LX200::Sync  
     

    Synchronizes telescope coordinates to the object's coordinates.

    Returns :
    which objects coordinates were used. Autostar always return the same string " M31 EX GAL MAG 3.5 SZ178.0'#"

    void LX200::toggleSmartDrive int    cToggle
     

    Changes smart drive status.

    LX200 classic specific: This operation is avaiable only to LX200 classic telescopes.

    Parameters:
    cToggle  is the smart drive status identifier. Valid values are from 1...5.

    void LX200::turnFanOff  
     

    Turns fan off. This command applies only to 16" LX200.

    void LX200::turnFanOn  
     

    Turns fan on. This command applies only to 16" LX200.


    The documentation for this class was generated from the following file:
    Generated on Wed Nov 6 06:54:31 2002 for KTelescope by doxygen1.2.17