Skip to content

Commit 1bf1393

Browse files
committed
Expand Mars chapter with scaling and bit-budget discussion
1 parent 78f17a7 commit 1bf1393

File tree

1 file changed

+105
-0
lines changed

1 file changed

+105
-0
lines changed

book/part4_applications/chapter14_mars_exploration_and_settlement.md

Lines changed: 105 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,111 @@ Rather than forcing time into the index itself, a common pattern is:
8383

8484
This keeps the BCC index strictly 3D while still supporting 4D reasoning through time-stamped containers and time-aware frames.
8585

86+
### 14.2.1 Bit Budgets, Scale, and Mars
87+
88+
Under the hood, OctaIndex3D uses several identifier types whose **bit layouts** control how far you can see and how finely you can resolve detail:
89+
90+
- `Galactic128`:
91+
- 32-bit signed coordinates `x, y, z` (bits 95–0).
92+
- 6 bits of **LOD**, 2 bits of **scale tier**, and 8 bits of **scale mantissa**.
93+
- Additional bits for **frame ID** and attributes.
94+
- `Index64`:
95+
- 48-bit Morton code (effectively ~16 bits per axis) for compact database keys.
96+
- 4 bits of **LOD**, 2 bits of **scale tier**, and 8 bits of **frame ID`.
97+
- `Route64`:
98+
- 20-bit signed coordinates per axis (about ±524k steps) for **local routing**.
99+
- 2 bits of **scale tier**.
100+
101+
You are free to choose how these discrete steps map to meters; the key is that the **same BCC lattice** can represent:
102+
103+
- Fine-grained detail around a landing site.
104+
- Global context across the entire planet.
105+
- Interplanetary distances during cruise.
106+
107+
Two practical design patterns for Mars missions are:
108+
109+
1. **Global and interplanetary context with `Galactic128`**
110+
2. **Near-surface mapping with `Index64` and `Route64`**
111+
112+
#### Global and Interplanetary Context with `Galactic128`
113+
114+
Because `Galactic128` stores full 32-bit coordinates, it can cover very large distances:
115+
116+
- A 32-bit signed axis ranges from roughly `-2.1×10⁹` to `+2.1×10⁹` steps.
117+
- If one step is **1 km**, you can represent positions across about **4.3 billion km** along each axis—comfortably spanning multiple astronomical units.
118+
119+
This is more than enough to:
120+
121+
- Track a spacecraft from **Earth–Mars transfer** through capture and operations.
122+
- Maintain a single **Mars-centered inertial frame** that includes:
123+
- Mars itself (~3,400 km radius).
124+
- The local orbital environment (tens of thousands of km).
125+
- The interplanetary corridor out to several hundred million km.
126+
127+
In this regime:
128+
129+
- `scale_tier` and `scale_mant` encode **how big one lattice step is** (for example, 1 km vs 10 km).
130+
- `lod` can represent additional hierarchical detail (for example, sub-kilometer refinement near Mars while keeping coarser resolution farther away).
131+
132+
You might, for example:
133+
134+
- Use `scale_tier = 3`, `scale_mant` ≈ 1 to mean **1 km per lattice step**.
135+
- Place the origin at Mars’ center of mass.
136+
- Express spacecraft trajectory waypoints, relay satellites, and other celestial bodies in the same coordinate system.
137+
138+
Even at this coarse scale, BCC connectivity still pays off for:
139+
140+
- Radiation and dust-environment fields along the transfer corridor.
141+
- Line-of-sight and occlusion calculations between spacecraft, Mars, and the Sun.
142+
143+
#### Mars Surface and Near-Surface Mapping with `Index64` and `Route64`
144+
145+
Closer to the surface, you typically want **much higher resolution** but within a **limited spatial extent**. This is where `Index64` and `Route64` shine:
146+
147+
- `Index64` exposes:
148+
- 48 bits of Morton code → about `2¹⁶ = 65,536` discrete positions per axis at a given LOD.
149+
- 4 bits of LOD → 16 hierarchical levels of refinement.
150+
- `Route64` exposes:
151+
- 20-bit signed coordinates → a local cube about **1,000,000 cells per axis** centered on a rover or settlement.
152+
153+
Suppose you dedicate an `Index64` frame to a Mars-fixed body frame and choose:
154+
155+
- A bounding cube of ~**6,800 km** across (slightly larger than Mars’ diameter).
156+
- 16 bits per axis for the Morton code.
157+
158+
Then, at a given LOD:
159+
160+
- One lattice step corresponds to roughly `6,800,000 m / 65,536 ≈ 104 m`.
161+
- Coarser LODs aggregate these cells (hundreds of meters to kilometers).
162+
163+
You can push to **finer effective resolution** in two ways:
164+
165+
- Use a **smaller spatial extent** for a given frame (for example, a 200 km region around a landing site), yielding cell sizes of a few meters.
166+
- Use **higher LODs** to subdivide coarse cells in regions of interest (for example, landing ellipses, rover workspaces, or base footprints).
167+
168+
For truly local operations—like routing an EVA around a habitat or maneuvering a rover in a cluttered yard—you may switch to `Route64`:
169+
170+
- With 20-bit signed coordinates and a scale of **0.1 m per step**, a single `Route64` frame can cover:
171+
- About `1,000,000 steps × 0.1 m ≈ 100 km` per axis.
172+
- More than enough for any near-base or within-settlement activity.
173+
174+
The important point is that **all three ID types interoperate**:
175+
176+
- `Galactic128` gives you **global and interplanetary** positions for Mars and spacecraft.
177+
- `Index64` gives you **planet-wide tiling** suitable for DEMs, atmospheric models, and hazard grids.
178+
- `Route64` gives you **high-fidelity local coordinates** for navigation and manipulation near the surface.
179+
180+
For Mars missions, you might adopt a workflow like:
181+
182+
1. Use `Galactic128` to represent the spacecraft trajectory and key waypoints in a Mars-centric inertial frame.
183+
2. Project those positions into a Mars-fixed surface frame and sample into `Index64` containers for global maps (terrain, atmosphere, resources).
184+
3. Around landing sites and bases, down-convert into `Route64` coordinates for local planners and controllers.
185+
186+
Because each layer preserves **parity and BCC structure**, moving between scales is mostly a matter of:
187+
188+
- Changing scale fields (tier, mantissa) and LOD.
189+
- Reusing the same underlying neighbor and container machinery.
190+
86191
Transformations between frames let you:
87192

88193
- Convert orbital products (e.g., ephemerides, occultation geometry) into surface-relative contexts.

0 commit comments

Comments
 (0)