Headline:Adventures in Numbering Schemes
Date:Friday, April 26, 2019
Posted By:Plaid Hatter Games

I'm in the process of converting the data in my excel spreadsheets into something my game engine can use as a map. And I've discovered a problem (or is this yet another problem?) with my mapping system. My track/sector system ignores hallways. While I could go off an devise some way around that, given the very early stage of the project it is best to just go ahead and fix the fundamentals of the system. (Even if I do have to go off and Re-Zone everything.)

For your typical house layout, we often think of a hallway as means to an end. Bedrooms get named for who sleeps there. The Kitchen is the Kitchen. The Living Room is the Living Room. Whatever rooms are in the basement (if one even has a basement) are named something functional. But hallways usually get ignored. Or if there is some confusion, we'll call one the "Upstairs Hallway" or "The Bedroom Hallway."

The problem is that, at least when building a navigation plan, hallways are actually more important than the rooms they connect. For that reason, and because they often take up a lot of room, hallways on ships are numbered just like the compartments. I forgot that little gem, and it bit me in the butt today.

Another item that was I was going to have to deal with later is that treating my decks as a integer sequence of unbroken levels was... stupid. In real ship construction, we have to deal with things like "half decks". And it's a mess if you constrain yourself to the idea that a deck is a plane that passes through the entire length of the ship. I was also running into cases where I may have wanted a deck to actually occupy the vertical space of 2 or more levels. There may also be cases where a deck is added or removed, and going with an absolute measurement means I don't need to renumber everything. (Or at least renumber it... again.)

So instead of treating the sphere like an giant office building with floors, I am switching to a Cylindrical Coordinate System.

Numbers in a compartment ID will correspond to real physical distances. The floor number is going to be replaced with the axial distance, the height from the bottom-most point of the sphere of the boundary that is closest to be bottom of the sphere. The track number is going to be replaced with the radial distance (in meters). The "sector" number is the same number it was before, we will simply call it the Azimuth.

I also need to address parts of the ship that are not contained in a sphere. There are two major areas to consider outside of the spheres: The spine and the ring. And it turns out the a cylindrical coordinate system is helpful in both of those areas too.

Spine

The spine is the central part of the vessel that doesn't rotate to create gravity. The coordinate system is based on when the vessel is thrusting, and that section has a definite a definite up and down. Up is the direction away from the prevailing direction of thrust. Down is the opposite of up. The upmost point of the vessel we will call the "Zenith." The downmost portion is the "Nadir."

Spine compartments also use cylindrical coordinates. Compartments in the spine get a prefix S.

S-axial-radial-azimuth

The axial component is a distance measured, in meteres, from the nadir of the vessel. For compartment designators, axial is the lowest boundary rounded to the nearest whole number with the floor()
The radial component is a distance, in meters, from the center of the axis. For compartment designators, radial is the lowest boundary rounded to the nearest whole number using the floor() function to make it conform to the nearest meter.
The azimuth component is the compass heading from the center (in degrees) from 0-359. For compartment designators, the azimuth is the clockwise-most boundary, using the floor() function to make it conform to the nearest degree. Azimuth will always be three digits with leading zeros

Ring

The spheres are held in a ring. The ring is coaxial to the spine. For areas inside the ring, but not inside a sphere, we will use a system with a prefix "R".

R-axial-radial-azimuth

The axial component is a distance in meters measured from the nadir-most boundary of the disc. For compartment designators, axial is the lowest boundary rounded to the nearest whole number with the floor().
The radial component is a distance, in meters, from the center of the axis. For compartment designators, radial is the lowest boundary rounded to the nearest whole number using the floor() function to make it conform to the nearest meter.
The azimuth component is the compass heading from the center (in degrees) from 0-359. For compartment designators, the azimuth is the clockwise-most boundary, using the floor() function to make it conform to the nearest degree. Azimuth will always be three digits with leading zeros

Sphere

The inhabited portions of the vessel are divided into 6 spheres. Each sphere has its own coordinate system, and thus, prefix. Spheres are lettered from A to F. Coordinates in the sphere are also cylindrical.

A|B|C|D|E|F-axial-radial-azimuth

The axial component is a distance in meters measured from the designated bottom of the sphere. For compartment designators, axial is the lowest boundary rounded to the nearest whole number with the floor()

The radial component is a distance, in meters, from the center of the axis. For compartment designators, radial is the lowest boundary rounded to the nearest whole number using the floor() function to make it conform to the nearest meter.
The azimuth component is the compass heading from the center (in degrees) from 0-359. For compartment designators, the azimuth is the clockwise-most boundary, using the floor() function to make it conform to the nearest degree. Azimuth will always be three digits with leading zeros

Oddballs

In a sane design, we should never encounter a negative number. But... just in case, if a negative number is required it should be prefixed with an N, to distinguish the sign indication from the - in the delimiter. The only cases I can think where this would happen is post-refit, on the spine, if a vessel is stretched in the aft direction. The original design nadir would be considered zero, and numbers would count upward as the extension marched its way aft.

Usage Markings

On naval drawings, it is sometimes useful to bake a usage code into a compartment numbering scheme. The following letter codes can be added to a compartment designation if one wishes to express a purpose to the compartment:

Subdivisions

Some compartments on board are sub-divided into discrete units. These divisions may be ephemeral. The divisions may be permanent. Sometimes that division is simply logical. If a compartment is divided further, that division is marked after the coordinate (if not usage given) or usage (if given), with a decimal point. After the decimal point can come whatever pattern of letters and or numbers makes sense for how the space is organized. Use letters if the division is largely logical. Use numbers if the divisions are structural.

The dividing line between whether to break a compartment up into separate compartments or break it up as sub-compartments is largely a matter of taste and the nature of the division.

Examples:

A large agricultural field with no physical walls: Break into individual compartments if larger than 1 parcel unit in size (314m^2.) If smaller than 1 parcel, use letter codes:

A-40-31-145-A.A (Lettuce), A-40-31-145-A.B (Carrots)

A gymnasium with room dividers. Mark the gymnasium as a whole with the the standard compartment code. Letter each discrete floor area with a letter. If an event require the entire undivided gymnasium, the event refers to the compartment code for the entire space. If an event requires one partition, it can address the letter code for the individual space.

B-50-45-000-R (Gym as a whole). B-50-45-000-R.A (Front section of the three room divider).

Single Bedroom Housing. The layout of an Single Bedroom Housing Unit could have a floor plan that makes maintaining a the global compartment numbering scheme a challenge. Rather that try to force the standard on individual units or rooms, we stop the compartment numbering scheme at the parcel. Each unit with it's own entrance is marked individually. Rooms beyond that entrance are not designated:

E-45-90-252-H.1 (Unit 1 in building E-45-90-252-H) E-45-90-252-H.2 (Unit 2 in building E-45-90-252-H)

To assist with emergency response, any building that is sub-divided must have a map on the inside door or the door with the internal room layout.

Special Rules for Housing Spaces

It is optional, but recommended, to highlight with stickers, paint, or grease pencil, any rooms that are likely locations for sleeping individuals, particularly children or the elderly. Any space (compartment, sub-compartment, or otherwise) that contains sleeping quarters must conspicuously mark the number of inhabitants on the outside door. Those marking must be removed if the space becomes uninhabited. It is the job of the inhabitants of the unit to maintain the markings on the door. The Housing department must inspect every housing doorway to ensure that markings are up to date, and remove markings from uninhabited spaces.

The Housing Department must also ensure that each exit from a housing unit contains an up-to-date evacuation guide, and sufficient emergency breathing devices at each exit to for twice the number or expected inhabitants. Emergency breathing devices should be located in a drawer that can be opened from both inside and outside of the housing unit, yet maintain a hermetic seal to a full vacuum. Each housing unit must have two exits to two different passageways. Each exit must resist fire, smoke, and vacuum.

Manned Spaces and Unmanned Spaces

Any compartment that begins with a usage code starting with the letters V-Z are unmanned spaces. Anyone entering such a space requires special clearance, special training, and most likely, special equipment. The are not intended for habitation by human beings. An uncleared individual entering one of these spaces risks injury, disruption of shipboard operations, and/or damage to vital equipment.

Robots operating in W spaces are not required to be monitor for human presence! Every W and X space has yellow lines marking the safe zone for humans to not interfere with equipment. Keep in mind that "interfering" with most industrial machines largely involves being shredded to a pulp, crushed, electrocuted, or otherwise sprayed across the deck in a fine mist. Be courteous to your shipmates, don't be a mess.