Or possibly Heinlein was thinking of US naval history. “Passed midshipman” was never officially a rank in the RN, it was just a description of those midshipmen who had passed the exam for lieutenant. But in the USN from 1819 to 1882 it was the official rank of temporary junior officers who had completed their academic training and passed their exams, and who were serving at sea as officers on probation. “Passed midshipman” was replaced by “ensign” in 1882, which is I think when the USN changed the title of its flag officers from “commodore” to “admiral”.
I have thought of using three grades of commodore at O-7 to O-9, and then using “vice-admiral”, “admiral”, and “grand admiral” instead of “vice-marshal”, “marshal”, and “chief marshal”. In the end I decided rather to keep admirals equal to generals.