A battalion of naval militia shall be considered the equivalent of a battalion of land militia, and a division of naval militia shall be considered the equivalent of a company of land militia and equal in the state service, and they shall be entitled to equal rights, privileges, and allowances when not inconsistent with law.