Determining the macroscopic fundamental diagram from mixed and partial traffic data