How was each Space Shuttle contingency rescue missions numbered?

Reading the wikipedia article on STS-3xx, I noticed that the numbering does not seem consistent.

Space Shuttle contingency rescue missions were all numbered in the 300s with the exception of STS-400, as that was a special case.

STS-300 and -301 seem to have been numbered sequentially as the first contingency missions.

STS-300 (Atlantis) was planned for both STS-114 and STS-121 (both Discovery). This numbering also skipped 5 regular missions which ended up happening later, two of which were also by Discovery.

STS-317 and -318 seem to have been numbered after the mission their crews and orbiters were planned to fly. (If STS-117 had needed the contingency mission, a subset of the crew of STS-118 would have flown as STS-318 to rescue STS-117)

But after that the numbers seem to go a bit astray.

The orbiters assigned aren't always the same as the regular missions that share the last two digits too.

How were the numbers and orbiters of the contingency missions assigned?

Here is a mission designation table for STS-3xx flights, taken from Wikipedia

+---------------------+---------------------+
|       Flight        |    Rescue Flight    |
+---------------------+---------------------+
| STS-114 (Discovery) | STS-300 (Atlantis)  |
| STS-121 (Discovery) | STS-300 (Atlantis)  |
| STS-115 (Atlantis)  | STS-301 (Discovery) |
| STS-116 (Discovery) | STS-317 (Atlantis)  |
| STS-117 (Atlantis)  | STS-318 (Endeavour) |
| STS-118 (Endeavour) | STS-322 (Discovery) |
| STS-120 (Discovery) | STS-320 (Atlantis)  |
| STS-122 (Atlantis)  | STS-323 (Discovery) |
| STS-123 (Endeavour) | STS-324 (Discovery) |
| STS-124 (Discovery) | STS-326 (Endeavour) |
| STS-125 (Atlantis)  | STS-400 (Endeavour) |
| STS-134 (Endeavour) | STS-335 (Atlantis)  |
+---------------------+---------------------+


After STS-115, the rescue mission designations were based on the corresponding regular mission that would be replaced should the rescue mission be needed.

Wikipedia

Here's an example of how that worked out, using a manifest dated November 2006.

This chart has a horizontal line for each Orbiter. The date shown above the blue Orbiter symbol is the planned launch date. Time progresses left to right across the charts.

The little orange Orbiter is the rescue mission that would take place if the launch before it needed to be rescued.

So we can see that for STS-116, the next scheduled mission was STS-117. Thus the orange rescue mission is STS-317, and the orange dashed line points to the mission it would be rescuing.

Moving down the line:

• the rescue mission for STS-117 would have been STS-318 (based on STS-118)
• the rescue mission for STS-118 would have been STS-320 (based on STS-120)
• the rescue mission for STS-120 would have been STS-322 (based on STS-122)
• the rescue mission for STS-122 would have been STS-323 (based on STS-123)

And so on.

The chart in the question contains some obvious errors and omissions. STS-120 could not have rescued itself! And several missions are not listed at all - 126 through 133.

• The wikipedia articles for the individual missions seem to think the weird numbering is correct though. See en.wikipedia.org/wiki/STS-118#Contingency_mission and en.wikipedia.org/wiki/STS-120#Contingency_mission – Speedphoenix Aug 10 at 20:42
• "STS-322 was the designation given to the Contingency Shuttle Crew Support mission which would have been launched in the event Endeavour had become disabled during STS-118. It would have been a modified version of the STS-120 mission, which would have involved the launch date being brought forward. If it had been needed, it would have been launched no earlier than 22 September 2007. The crew for this mission would have been a four-person subset of the full STS-120 crew." – Speedphoenix Aug 10 at 20:42
• I'd go with the NASA schedule document over the wikipedia article. – Organic Marble Aug 10 at 20:43
• The wikipedia info was taken from this Nasa Spaceflight article, which does look like it was manually copied, and would be prone to errors. – Speedphoenix Aug 10 at 20:48
• I'm looking for additional schedules but I haven't found them yet. It's possible the order of missions might have swapped and added some confusion. – Organic Marble Aug 10 at 21:09