Err.. afraid I must respectfully disagree..
"The president is the commander-in-chief of the armed forces, but if he's onboard a Navy vessel, the captain has the right to order even the President around if the captain chooses the exercise his command authority."
At which point the President says: "You are hereby relieved of command by direction." The (former) Captain is now a passenger. Understand, that there is NO higher authority in the US Military than POTUS. None. Under NO circumstances is he "outranked". Not on a plane, train or automobile and sure as heck not on a Naval vessel.
He is THE Executive Authority for the United States Government.
Regards,
-Bouncer-