def test_SingleAxisTracker_tracking():
    system = tracking.SingleAxisTracker(max_angle=90, axis_tilt=30,
                                        axis_azimuth=180, gcr=2.0/7.0,
                                        backtrack=True)

    apparent_zenith = pd.Series([30])
    apparent_azimuth = pd.Series([135])

    tracker_data = system.singleaxis(apparent_zenith, apparent_azimuth)
    
    expect = pd.DataFrame({'aoi': 7.286245, 'surface_azimuth': 142.65730 ,
                           'surface_tilt': 35.98741, 'tracker_theta': -20.88121},
                           index=[0], dtype=np.float64)
    
    assert_frame_equal(expect, tracker_data)

    ### results calculated using PVsyst
    pvsyst_solar_azimuth = 7.1609
    pvsyst_solar_height = 27.315
    pvsyst_axis_tilt = 20.
    pvsyst_axis_azimuth = 20.
    pvsyst_system = tracking.SingleAxisTracker(max_angle=60.,
                                               axis_tilt=pvsyst_axis_tilt,
                                               axis_azimuth=180+pvsyst_axis_azimuth,
                                               backtrack=False)
    # the definition of azimuth is different from PYsyst
    apparent_azimuth = pd.Series([180+pvsyst_solar_azimuth])
    apparent_zenith = pd.Series([90-pvsyst_solar_height])
    tracker_data = pvsyst_system.singleaxis(apparent_zenith, apparent_azimuth)
    expect = pd.DataFrame({'aoi': 41.07852 , 'surface_azimuth': 180-18.432 ,
                           'surface_tilt': 24.92122 , 'tracker_theta': -15.18391},
                           index=[0], dtype=np.float64)

    assert_frame_equal(expect, tracker_data)
dataset/ETHPy150Open pvlib/pvlib-python/pvlib/test/test_tracking.py/test_SingleAxisTracker_tracking/original