Package org.aavso.tools.vstar.util.coords

Examples of org.aavso.tools.vstar.util.coords.DecInfo


  }

  // Test cases.
 
  public void testDecToDegrees1() {
    DecInfo dec = new DecInfo(EPOCH, 0, 0, 0);
    assertEquals(0.0, dec.toDegrees());
  }
View Full Code Here


    DecInfo dec = new DecInfo(EPOCH, 0, 0, 0);
    assertEquals(0.0, dec.toDegrees());
  }

  public void testDecToDegrees2() {
    DecInfo dec = new DecInfo(EPOCH, -25, 45, 3);
    String decStr = getNumToPrecision(dec.toDegrees(), PRECISION);
    assertEquals(getNumToPrecision(-25.7508333333333, PRECISION), decStr);
  }
View Full Code Here

    String decStr = getNumToPrecision(dec.toDegrees(), PRECISION);
    assertEquals(getNumToPrecision(-25.7508333333333, PRECISION), decStr);
  }

  public void testDecToDegrees3() {
    DecInfo dec = new DecInfo(EPOCH, 2, 0, 0);
    assertEquals(2.0, dec.toDegrees());
  }
View Full Code Here

  // Test cases

  public void testConversion1() {
    RAInfo ra = new RAInfo(1950, 0, 0, 0);
    DecInfo dec = new DecInfo(1950, 0, 0, 0);
    double hjd = HJDConverter.convert(JD, ra, dec);
    String hjdStr = getNumToPrecision(hjd, PRECISION);
    assertEquals(getNumToPrecision(2445239.40578294, PRECISION), hjdStr);
  }
View Full Code Here

    assertEquals(getNumToPrecision(2445239.40578294, PRECISION), hjdStr);
  }

  public void testConversion2() {
    RAInfo ra = new RAInfo(1950, 15, 2, 3.6);
    DecInfo dec = new DecInfo(1950, -25, 45, 3);
    double hjd = HJDConverter.convert(JD, ra, dec);
    String hjdStr = getNumToPrecision(hjd, PRECISION);
    assertEquals(getNumToPrecision(2445239.39611801, PRECISION), hjdStr);
  }
View Full Code Here

    assertEquals(getNumToPrecision(2445239.39611801, PRECISION), hjdStr);
  }

  public void testConversion3() {
    RAInfo ra = new RAInfo(1950, 12, 0, 0);
    DecInfo dec = new DecInfo(1950, 2, 0, 0);
    double hjd = HJDConverter.convert(JD, ra, dec);
    String hjdStr = getNumToPrecision(hjd, PRECISION);
    assertEquals(getNumToPrecision(2445239.39422482, PRECISION), hjdStr);
  }
View Full Code Here

    Double epoch = null;
    String varType = null;
    String spectralType = null;
    String discoverer = null;
    RAInfo ra = null;
    DecInfo dec = null;

    createFindAUIDFromNameStatement(connection);
    findAUIDFromNameStatement.setString(1, name);
    findAUIDFromNameStatement.setString(2, name);
    findAUIDFromNameStatement.setString(3, name);
View Full Code Here

    Double epoch = null;
    String varType = null;
    String spectralType = null;
    String discoverer = null;
    RAInfo ra = null;
    DecInfo dec = null;
   
    createFindStarNameFromAUIDStatement(connection);
    findStarNameFromAUID.setString(1, auid);

    ResultSet rs = findStarNameFromAUID.executeQuery();
View Full Code Here

    decD = getPossiblyNullIntegerValue(rs, "o_ded1950");
    decM = getPossiblyNullIntegerValue(rs, "o_dem1950");
    decS = getPossiblyNullDoubleValue(rs, "o_des1950");
    decSign = getDecSign(rs);

    DecInfo dec = null;
    if (decD != null && decM != null && decS != null && decSign != null) {
      dec = new DecInfo(RADEC_EPOCH, decSign * decD, decM, decS);
    }

    return dec;
  }
View Full Code Here

        String varType = data.get(fieldId2DataIndexMap.get("varType"));
        String spectralType = data.get(fieldId2DataIndexMap
            .get("specType"));
        String discoverer = data.get(fieldId2DataIndexMap.get("disc"));
        RAInfo ra = new RAInfo(2000, getCoord(Coord.RA));
        DecInfo dec = new DecInfo(2000, getCoord(Coord.Dec));

        info = new StarInfo(name, auid, period, epoch, varType,
            spectralType, discoverer, ra, dec);
      } else {
        throw new SQLException("Unable to obtain information for " + id);
View Full Code Here

TOP

Related Classes of org.aavso.tools.vstar.util.coords.DecInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.