I think Star Trek, especially in its post-TOS incarnations, tried to be too identical to contemporary US Navy rankings. It's the freaking future dammit, and doesn't have to abide with our current standards.
I sort of liked the strangeness (to Americans at least) of Gerry Anderson's Supermarionation series Fireball XL5
-- a Colonel is commanding officer of the ship, but the head guy at the Earth base is a Commander with a Lieutenant as his assistant. I don't know if that's patterned after Royal Air Force or what. I adapted Fireball
's style into my own fictional universe to keep it from looking too much like a Trek clone.