edu.udayton.udri.asset.canon.ipcamera/src/edu/udayton/udri/asset/canon/ipcamera/IpCameraAsset.java
private double handleGetTilt() throws CommandExecutionException
    {
        final URL tiltUrl;
        try
        {
            tiltUrl = new URL(m_Url + INFOURL);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the Tilt info URL");
            throw new CommandExecutionException(ex);
        }
        final URLConnection urlCon = getUrlConnection(tiltUrl);
        final InputStream infoInput = getInputStream(urlCon);
        final Properties infoProp = new Properties();
        try
        {
            infoProp.load(infoInput);
        }
        catch (final IOException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating properties file");
            throw new CommandExecutionException(ex);
        }
        final String tiltString = "c.1.tilt";
        final int cutOff = infoProp.getProperty(tiltString).lastIndexOf('=');
        return  (Double.parseDouble(infoProp.getProperty(tiltString)
                .substring(cutOff + 1))) / TILT_ADJUST; //Used to adjust the tilt value to the correct number
    }
/**
     * Method used to get the tilt value for the sync function.
     * @return double
     *     current tilt value of the camera
     * @throws CommandExecutionException
     *     an error connecting to the IP camera.
     */
Method used to get the tilt value for the sync function.
@return double
current tilt value of the camera
@throws CommandExecutionException
an error connecting to the IP camera.
Method used to get the tilt value for the sync function . @return double current tilt value of the camera @throws CommandExecutionException an error connecting to the IP camera .
private double handleGetTilt() throws CommandExecutionException
    {
        final URL tiltUrl;
        try
        {
            tiltUrl = new URL(m_Url + INFOURL);
        }
        catch (final MalformedURLException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating the Tilt info URL");
            throw new CommandExecutionException(ex);
        }
        final URLConnection urlCon = getUrlConnection(tiltUrl);
        final InputStream infoInput = getInputStream(urlCon);
        final Properties infoProp = new Properties();
        try
        {
            infoProp.load(infoInput);
        }
        catch (final IOException ex)
        {
            Logging.log(LogService.LOG_ERROR, ex, "Error creating properties file");
            throw new CommandExecutionException(ex);
        }
        final String tiltString = "c.1.tilt";
        final int cutOff = infoProp.getProperty(tiltString).lastIndexOf('=');
        return  (Double.parseDouble(infoProp.getProperty(tiltString)
                .substring(cutOff + 1))) / TILT_ADJUST; 
    }
private double handleGetTilt ( ) throws CommandExecutionException { final URL tiltUrl ; try { tiltUrl = new URL ( m_Url + INFOURL ) ; } catch ( final MalformedURLException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Error creating the Tilt info URL" ) ; throw new CommandExecutionException ( ex ) ; } final URLConnection urlCon = getUrlConnection ( tiltUrl ) ; final InputStream infoInput = getInputStream ( urlCon ) ; final Properties infoProp = new Properties ( ) ; try { infoProp . load ( infoInput ) ; } catch ( final IOException ex ) { Logging . log ( LogService . LOG_ERROR , ex , "Error creating properties file" ) ; throw new CommandExecutionException ( ex ) ; } final String tiltString = "c.1.tilt" ; final int cutOff = infoProp . getProperty ( tiltString ) . lastIndexOf ( '=' ) ; return ( Double . parseDouble ( infoProp . getProperty ( tiltString ) . substring ( cutOff + 1 ) ) ) / TILT_ADJUST ; }
Method used to get the tilt value for the sync function.
Method used to get the tilt value for the sync function .
//Used to adjust the tilt value to the correct number