Rent low-orbit satellite capacity from Starblink (#83)

A Starblink gateway on a teleport at a POP on your fiber (level 5, within
56 degrees of the equator) rents LEO circuits of 5 to 50 Gbps to small
islands and remote towns within 1,200 km: a bent pipe 550 km up, about
30 ms round trip, 3% of the service counted as bad, and no selective
network refuses it. LEO puts GEO and MEO circuits on the same pair on
standby and waits beside a cable. The gateway's Infra section shows its
POP's forwarding load and the fiber out of the city, the islands'
bottleneck. A rare solar storm (and Pie's own) puts LEO in safe mode for
a day or two. Once your own crust carries traffic Starblink sells nothing
new. Rule O8. Hooks for island Wi-Fi: leoReachLL, leoKmLL, leoMsLL.
This commit is contained in:
jvanvik 2026-11-12 01:34:46 +01:00
parent 08eb349d87
commit 7967a29083
25 changed files with 692 additions and 46 deletions

View file

@ -733,6 +733,32 @@ test('O7: a fresh Tier 1 cannot afford a full Shortcrust in its first year', ()
// O7's other half (a full lasered Shortcrust pays back in 5 to 10 years, never sooner) is played through the game loop
// in tests/pie-balance.test.js, so it counts launches, aging, incidents, churn and every running cost.
test('O8: rented LEO reaches only near a gateway on your fiber under its shell, stops selling once your crust carries, and costs more than a subsea wave', () => {
const g = load();
g.ev("ACT.start({});if(UI.pendGame)ACT.pitchSkip();S.cash=1e9;S.lvl=SAT_ORB.leo.lv;S.nextFail=S.nextEvent=1e9;UI.speed=0;S.rules=makeRules('freeze')");
// Every pair the bird is sold on: at most km apart, both ends under the shell.
fail('O8', JSON.parse(g.ev("JSON.stringify((()=>{const O=SAT_ORB.leo,out=[];for(const A of CITIES)for(const B of CITIES){if(A.id>=B.id||!satPairOk(LEO_BIRD,A.id,B.id))continue;if(kmBetween(A.id,B.id)>O.km||Math.abs(A.lat)>O.lat||Math.abs(B.lat)>O.lat)out.push(A.id+'-'+B.id+' '+kmBetween(A.id,B.id)+' km');}return out;})())")),
'a LEO circuit beyond one satellite\'s bent pipe: keep SAT_ORB.leo.km and lat in satPairOk');
assert.ok(g.ev("Object.keys(SATS).filter(id=>SATS[id].orb==='leo').join()===LEO_BIRD"), 'O8: one rented LEO bird');
// The gateway sits on your fiber: an island only a satellite reaches cannot host one; beyond the shell, nobody can.
g.ev("ACT.buildPop({city:'suv'});ACT.teleBuild({city:'suv'});ACT.buildPop({city:'anc'});S.pops.anc.tele=1;ACT.buildPop({city:'ccs'});ACT.teleBuild({city:'ccs'})");
assert.notEqual(g.ev("leoGwWhy('suv')"), '', 'O8: a gateway on an island off your fiber');
assert.notEqual(g.ev("leoGwWhy('anc')"), '', 'O8: a gateway beyond the shell');
assert.notEqual(g.ev("satWhy('ccs','cur',LEO_BIRD,10)"), '', 'O8: a LEO circuit without a gateway');
g.ev("ACT.teleLeo({city:'ccs'});ACT.buySat({a:'ccs',b:'cur',bird:LEO_BIRD,g:10});closeModal();ACT.buyTransit({city:'ccs',net:'drz',tier:1});ACT.launchBB({city:'cur'});closeModal()");
assert.equal(g.ev('S.links.filter(l=>l.bird===LEO_BIRD).length'), 1, 'O8: a gateway on the mainland sells');
// Your own crust carries: nothing new from Starblink, not even growth; what you rent keeps running.
g.ev('S.pieV=1;pieInit();S.pie.crusts.short.cohorts=[{n:CRUSTS.short.full,day:S.day,las:false}];S.day=S.links.find(l=>l.bird===LEO_BIRD).ready;compute()');
assert.ok(g.ev('Object.keys(CRUSTS).some(id=>pieCarry(id)>0)'), 'a crust carries');
for (const x of ["satWhy('ccs','gnd',LEO_BIRD,10)", "leoGwWhy('ccs')", 'leoGrowWhy(S.links.find(l=>l.bird===LEO_BIRD))']) assert.notEqual(g.ev(x), '', `O8: ${x} once your own constellation carries`);
assert.equal(g.ev("leoReachLL('ccs',CITY.cur.lat,CITY.cur.lon)"), false, 'O8: no WISP reach either');
assert.ok(g.ev('R.load[S.links.find(l=>l.bird===LEO_BIRD).id]') > 0, 'O8: a circuit you rent keeps carrying');
// Dearer per Gbps than any subsea wave over its whole reach, so a cable is always the better buy where one can go.
const dear = JSON.parse(g.ev('JSON.stringify(SAT_ORB.leo.g.flatMap(n=>LT.map((t,i)=>[n,t.g,satMo(LEO_BIRD,n)/n,waveMo(SAT_ORB.leo.km,true,i)/t.g])))'));
fail('O8', dear.filter((x) => x[2] <= x[3]).map((x) => `${x[0]}G LEO at ${Math.round(x[2])}/G is no dearer than a ${x[1]}G subsea wave at ${Math.round(x[3])}/G`), 'raise SAT_PROV.sbk.pg');
assert.deepEqual(g.errors, []);
});
test('no page errors while checking the rules', () => {
assert.deepEqual(errors, []);
});