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
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
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
def _test_geodeticDefaultConstructor(): try: coord = gnssShadowing.Geodetic() except: pytest.fail("Could not 'coord = gnssShadowing.Geodetic()'")
def test_geodeticToECEF(): coord = gnssShadowing.Geodetic(1, 2, 3, 4) ecef = coord.toECEF() assert type(ecef) == gnssShadowing.ECEF
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
def test_ecefToSEZ(): geodetic = gnssShadowing.Geodetic() coord = gnssShadowing.ECEF() sez = coord.toSEZ(geodetic) assert type(sez) == gnssShadowing.SEZ
def test_ecefToENU(): geodetic = gnssShadowing.Geodetic() coord = gnssShadowing.ECEF() enu = coord.toENU(geodetic) assert type(enu) == gnssShadowing.ENU
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
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