Logo Search packages:      
Sourcecode: hamlib version File versions  Download package

int HAMLIB_API rot_get_position ( ROT rot,
azimuth_t azimuth,
elevation_t elevation 
)

get the azimuth and elevation of the rotator

Parameters:
rot The rot handle
azimuth The location where to store the current azimuth
elevation The location where to store the current elevation
Retrieves the current azimuth and elevation of the rotator.

Returns:
RIG_OK if the operation has been sucessful, otherwise a negative value if an error occured (in which case, cause is set appropriately).
See also:
rot_set_position()

Definition at line 576 of file rotator.c.

References rot::caps, rot_caps::get_position, RIG_EINVAL, and RIG_ENAVAIL.

{
      const struct rot_caps *caps;

      if (CHECK_ROT_ARG(rot) || !azimuth || !elevation)
            return -RIG_EINVAL;

      caps = rot->caps;

      if (caps->get_position == NULL)
            return -RIG_ENAVAIL;

      return caps->get_position(rot, azimuth, elevation);
}


Generated by  Doxygen 1.6.0   Back to index