コード例 #1
0
def test_geodeticCopyConstructor():
    coord1 = gnssShadowing.Geodetic()
    coord1.latitude = 1
    coord1.longitude = 2
    coord1.altitude = 3
    coord1.julianDate = 4
    coord2 = gnssShadowing.Geodetic(coord1)
    assert coord2.latitude == 1
    assert coord2.longitude == 2
    assert coord2.altitude == 3
    assert coord2.julianDate == 4
コード例 #2
0
def test_availableSats():
    sats = gnssShadowing.SatStore("data/current.tle")
    deg2rad = gnssShadowing.deg2rad
    observer = gnssShadowing.Geodetic(deg2rad(52), deg2rad(11), 0, 0)
    availableSats = gnssShadowing.AvailableSats(sats, observer, deg2rad(5))
    availableSats.update(gnssShadowing.unixTimeInSeconds())
    assert availableSats.getNumSats() > 0
コード例 #3
0
def test_geodeticDataMembers():
    coord = gnssShadowing.Geodetic()
    coord.latitude = 1
    coord.longitude = 2
    coord.altitude = 3
    coord.julianDate = 4
    assert coord.latitude == 1
    assert coord.longitude == 2
    assert coord.altitude == 3
    assert coord.julianDate == 4
コード例 #4
0
def _test_geodeticDefaultConstructor():
    try:
        coord = gnssShadowing.Geodetic()
    except:
        pytest.fail("Could not 'coord = gnssShadowing.Geodetic()'")
コード例 #5
0
def test_geodeticToECEF():
    coord = gnssShadowing.Geodetic(1, 2, 3, 4)
    ecef = coord.toECEF()
    assert type(ecef) == gnssShadowing.ECEF
コード例 #6
0
def test_geodeticValueConstructor():
    coord = gnssShadowing.Geodetic(1, 2, 3, 4)
    assert coord.latitude == 1
    assert coord.longitude == 2
    assert coord.altitude == 3
    assert coord.julianDate == 4
コード例 #7
0
def test_ecefToSEZ():
    geodetic = gnssShadowing.Geodetic()
    coord = gnssShadowing.ECEF()
    sez = coord.toSEZ(geodetic)
    assert type(sez) == gnssShadowing.SEZ
コード例 #8
0
def test_ecefToENU():
    geodetic = gnssShadowing.Geodetic()
    coord = gnssShadowing.ECEF()
    enu = coord.toENU(geodetic)
    assert type(enu) == gnssShadowing.ENU
コード例 #9
0
def test_sezECEFTransformation():
    geodetic = gnssShadowing.Geodetic()
    mat1 = gnssShadowing.SEZ.SEZ_ECEF(geodetic)
    assert type(mat1) == np.ndarray
    mat2 = gnssShadowing.SEZ.ECEF_SEZ(geodetic)
    assert type(mat2) == np.ndarray
コード例 #10
0
def test_enuECEFTransformation():
    geodetic = gnssShadowing.Geodetic()
    mat1 = gnssShadowing.ENU.ENU_ECEF(geodetic)
    assert type(mat1) == np.ndarray
    mat2 = gnssShadowing.ENU.ECEF_ENU(geodetic)
    assert type(mat2) == np.ndarray