The Doctor has built a machine designed to predict the future, and it shows the Brigadier murdering him and Jo.
The Doctor has developed a tool aimed at anticipating the future, and this tool foretells that the Brigadier will assassinate him and Jo.