Wednesday, March 04, 2026

Traveller System Update 30 - Orbits Part 1

I decided to next calculate the year (orbital period) for the planets in our system. Asked AI and realized I may need to add a bit more to some of the tables. But that is easy, and adding the orbital period is not hard. As it is a calculated field, I may just generate it on the fly as needed vs saving it.

To get the math formulas to work, I added some scripts to my theme's HTML. And yes, AI gave me the answers to that after a couple false starts. MathJax-script is the javascript library behind that.

I've added a new table that incorporates the stellar data such as luminosity, mass and so on. Then realized there more tables on the next page. And we also need the orbits table that indicates the AU and distance. But I figured 8+ hours of work mostly in .NET (a good bit of Rails review to see what I screwed up in translating the code, and yes, *think* I found it) an hour or so getting the basic table up if not functional is a good step. The stellar type and size need to be drop downs to save off the correct foreign keys. Not sure when I'll get back to this - running the Corsairs game this weekend and while I spent almost an hour doing some brainstorming, I still need to work on some more details. But some progress at least! I should be able to add the other table and data fields possibly this weekend. And the generated code for the controller and views is technically not AI but a scaffolded process that a number of frameworks have to help with the basic grunt work for those things. All I do is select the model and it will create the controller and views for me. And as I (finally!) thought to use the DisplayName tag in the models, the labels are much nicer than the field names.


AI response to me asking how to calculate the period. Despite having the book sitting right next to me. I worry I am outsourcing my thinking now.

You picked a good rabbit hole here—Book 6 is quietly pretty crunchy under the hood.

1. Get the orbital radius from the orbit number

In Book 6: Scouts, look up the radius \(a\) in AU for the given orbit number.

2. Get the star’s mass

Look up \(M_\star\) for that star (in units of \(M_\odot\)).

3. Use the Kepler-style Traveller formula

Book 6 uses Kepler’s third law:

$$P_{\text{years}} = \sqrt{\dfrac{a^3}{M_\star}}$$

4. Convert to days

$$P_{\text{days}} = P_{\text{years}} \times 365$$


5. Worked example (Orbit 5)

If \(a = 2.8\text{ AU}\) and \(M_\star = 1.0\):

$$P_{\text{years}} = \sqrt{\dfrac{2.8^3}{1.0}} \approx 4.69\text{ years}$$

$$P_{\text{days}} \approx 1710\text{ days}$$