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

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


  }

  // 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


    String hjdStr = getNumToPrecision(hjd, PRECISION);
    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

    String hjdStr = getNumToPrecision(hjd, PRECISION);
    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

  }

  // Test cases.
 
  public void testRAToDegrees1() {
    RAInfo ra = new RAInfo(EPOCH, 0, 0, 0);
    assertEquals(0.0, ra.toDegrees());
  }
View Full Code Here

    RAInfo ra = new RAInfo(EPOCH, 0, 0, 0);
    assertEquals(0.0, ra.toDegrees());
  }

  public void testRAToDegrees2() {
    RAInfo ra = new RAInfo(EPOCH, 15, 2, 3.6);
    assertEquals(225.515, ra.toDegrees());
  }
View Full Code Here

    RAInfo ra = new RAInfo(EPOCH, 15, 2, 3.6);
    assertEquals(225.515, ra.toDegrees());
  }

  public void testRAToDegrees3() {
    RAInfo ra = new RAInfo(EPOCH, -12, 0, 0);
    assertEquals(-180.0, ra.toDegrees());
  }
View Full Code Here

    Double period = null;
    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);
View Full Code Here

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

    raH = getPossiblyNullIntegerValue(rs, "o_rah1950");
    raM = getPossiblyNullIntegerValue(rs, "o_ram1950");
    raS = getPossiblyNullDoubleValue(rs, "o_ras1950");

    RAInfo ra = null;
    if (raH != null && raM != null && raS != null) {
      ra = new RAInfo(RADEC_EPOCH, raH, raM, raS);
    }

    return ra;
  }
View Full Code Here

        Double epoch = getPossiblyNullDoubleValue("epoch");
        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 {
View Full Code Here

TOP

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

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.