The movie is not really based on any book. But it has great resemblance with two German books. One of them the novel from Prechtl (Titanensturz) and Titanic by Joseph Pelz von Felinau.
Felinau got in contact with Max Dittmar-Pittmann who claimed to have been the German 2nd Officer on board Titanic. He met Captain Smith in London and so he got on board Titanic. In the 1920s & 1930s he retold his story several times and got in contact with Felinau who was writing a book about the Titanic. After finding out that Dittmar-Pittmann was a liar, he chanced his book and the German Officer Max Dittmar-Pittmann became the Danish Officer Hans Erik Petersen.
In the movie, it is the German Officer Petersen.
It is some time ago I read both books but there you have also the story of the "blue Diamond", the race for the blue ribbon, the bad Mr. Ismay, shooting among the passengers and many more....