Пример #1
0
def test_cartesianToSpherical_3():
    alt, az, ra = transform.cartesianToSpherical(0, 1, 0)
    assert round(alt, 6) == 0
    assert round(az, 6) == round(np.radians(90), 6)
    assert round(ra, 6) == 1
Пример #2
0
def test_cartesianToSpherical_4():
    alt, az, ra = transform.cartesianToSpherical(0.707107, 0.707107, 0)
    assert round(alt, 6) == 0
    assert round(az, 6) == round(np.radians(45), 6)
    assert round(ra, 6) == 1
Пример #3
0
def test_cartesianToSpherical_2():
    alt, az, ra = transform.cartesianToSpherical(1, 0, 0)
    assert round(alt, 6) == 0
    assert round(az, 6) == 0
    assert round(ra, 6) == 1