num_estimates = timesteps + max(ais_meas_rate, radar_meas_rate)

generate_scenario_3(seed=seed,
                    permanent_save=False,
                    radar_meas_rate=radar_meas_rate,
                    ais_meas_rate=ais_meas_rate,
                    sigma_process=sigma_process,
                    sigma_meas_radar=sigma_meas_radar,
                    sigma_meas_ais=sigma_meas_ais,
                    timesteps=timesteps)
folder = "temp"  # temp instead of seed, as it is not a permanent save

# load ground truth and the measurements
data_folder = "../scenarios/scenario3/" + folder + "/"
ground_truth = open_object.open_object(data_folder + "ground_truth.pk1")
measurements_radar = open_object.open_object(data_folder +
                                             "measurements_radar.pk1")
measurements_ais = open_object.open_object(data_folder +
                                           "measurements_ais.pk1")

# load start_time
start_time = open_object.open_object(data_folder + "start_time.pk1")

# prior
prior = GaussianState([0, 1, 0, 1],
                      np.diag([1.5, 0.5, 1.5, 0.5])**2,
                      timestamp=start_time)

kf_independent_fusion = kalman_filter_independent_fusion(
    start_time,
from stonesoup.models.transition.linear import CombinedLinearGaussianTransitionModel, ConstantVelocity
from stonesoup.predictor.kalman import KalmanPredictor
from stonesoup.types.state import GaussianState
from stonesoup.updater.kalman import KalmanUpdater
from stonesoup.types.hypothesis import SingleHypothesis
from stonesoup.types.track import Track

from utils import open_object

from data_fusion import track_to_track_association
from data_fusion import track_to_track_fusion

from trackers.calc_cross_cov_estimate_error import calc_cross_cov_estimate_error

# load ground truth and the measurements
ground_truth = open_object.open_object(
    "../scenarios/scenario2/ground_truth.pk1")
measurements_radar = open_object.open_object(
    "../scenarios/scenario2/measurements_radar.pk1")
measurements_ais = open_object.open_object(
    "../scenarios/scenario2/measurements_ais.pk1")

# load start_time
start_time = open_object.open_object("../scenarios/scenario2/start_time.pk1")

# same transition models (radar uses same as original)
transition_model_radar = CombinedLinearGaussianTransitionModel(
    [ConstantVelocity(0.01), ConstantVelocity(0.01)])
transition_model_ais = CombinedLinearGaussianTransitionModel(
    [ConstantVelocity(0.01), ConstantVelocity(0.01)])

# same measurement models as used when generating the measurements