- Analysis window {fmtMin(win.start_s)} – {fmtMin(Math.min(win.end_s, period))} of {fmtMin(period)} (min:s); {derived.rows.length} bearings go to the solver. Drag either end; the solve runs on release.
+ Analysis window {fmtMin(win.start_s)} – {fmtMin(Math.min(win.end_s, period))} of {fmtMin(period)} (min:s); {derived.received} bearings go to the solver{derived.received < derived.rows.length ? ` (${derived.rows.length - derived.received} lost in ownship's turns)` : ""}. Drag either end; the solve runs on release.
diff --git a/site/static/demo-data/demo-scenario.schema.json b/site/static/demo-data/demo-scenario.schema.json
index 7f3b7283..d8231373 100644
--- a/site/static/demo-data/demo-scenario.schema.json
+++ b/site/static/demo-data/demo-scenario.schema.json
@@ -146,6 +146,15 @@
"target": {
"$ref": "#/$defs/DemoTrack"
},
+ "turn_loss_s": {
+ "description": "Owner 2026-11-22: bearings are lost while ownship turns and for this many seconds after each turn ends (default 120); null keeps every bearing.",
+ "maximum": 1800,
+ "minimum": 0,
+ "type": [
+ "number",
+ "null"
+ ]
+ },
"window": {
"$ref": "#/$defs/DemoWindow"
}
@@ -162,5 +171,5 @@
],
"title": "DemoScenario",
"type": "object",
- "version": "0.39.0"
+ "version": "0.40.0"
}
diff --git a/site/static/demo-data/js/metrics.js b/site/static/demo-data/js/metrics.js
index f67916a8..3858957f 100644
--- a/site/static/demo-data/js/metrics.js
+++ b/site/static/demo-data/js/metrics.js
@@ -19,7 +19,7 @@ export const OBS_AMBER = 0.25;
// Cramér-Rao bound for the target's track over the window rows, the manoeuvre times known:
// parameters are position and velocity at the window start plus one velocity increment at the
// middle of each target manoeuvre in the window; information from the window's bearings at the
-// truth. Returns per-row sds of range (m), bearing (rad), course (rad) and speed (m/s), and the
+// truth (lost bearings, b.valid 0, carry none). Returns per-row sds of range (m), bearing (rad), course (rad) and speed (m/s), and the
// condition number of the scaled information.
export function crb(b, rows, knotsAbs, sigma) {
const t0 = b.t[rows[0]];
@@ -29,6 +29,7 @@ export function crb(b, rows, knotsAbs, sigma) {
const row = new Float64Array(P);
const w = 1 / (sigma * sigma);
for (const i of rows) {
+ if (b.valid && !b.valid[i]) continue;
const tau = b.t[i] - t0;
const dx = b.tx[i] - b.ox[i], dy = b.ty[i] - b.oy[i];
const r2 = dx * dx + dy * dy;
@@ -102,6 +103,7 @@ export function evaluate(sc, b, rows, origin, t0, sol, knotsAbs) {
if (i === undefined) continue;
const pred = wrap2pi(Math.atan2(out.ex[k] - b.ox[i], out.ey[k] - b.oy[i]));
out.predicted.push([out.t[k], pred]);
+ if (b.valid && !b.valid[i]) continue; // a lost bearing has no residual
out.residual.push([out.t[k], sigma > 0 ? wrapPi(b.z[i] - pred) / sigma : NaN]);
}
const bound = crb(b, rows, knotsAbs, Math.max(sigma, 1e-9));
diff --git a/site/static/demo-data/js/presets.js b/site/static/demo-data/js/presets.js
index eb35fcfe..1ba1331b 100644
--- a/site/static/demo-data/js/presets.js
+++ b/site/static/demo-data/js/presets.js
@@ -1,13 +1,13 @@
// Spec 035 FR-041: preset scenarios (generic and unclassified, NFR-5). Distances in NM from an
// arbitrary origin, two-hour engagements, bearings every 5 s at 1 degree.
-import { SCHEMA_VERSION } from "./scenario.js";
+import { SCHEMA_VERSION, TURN_LOSS_S } from "./scenario.js";
import { LEGACY_SOLVERS } from "./solver-info.js";
const leg = (course_deg, speed_kt, minutes, turn_rate_dps = 1) => ({ course_deg, speed_kt, duration_s: minutes * 60, turn_rate_dps });
const zigzag = () => ({ start_x_nm: 0, start_y_nm: 0, legs: [leg(0, 8, 30), leg(60, 8, 30), leg(330, 8, 30), leg(60, 8, 30)] });
const base = (name, ownship, target, extra = {}) => ({
schema_version: SCHEMA_VERSION, name, ownship, target,
- sigma_deg: 1, interval_s: 5, seed: 1, window: { start_s: 0, end_s: 7140 }, solver: "ls-js", show_ellipses: false, ...extra,
+ sigma_deg: 1, interval_s: 5, turn_loss_s: TURN_LOSS_S, seed: 1, window: { start_s: 0, end_s: 7140 }, solver: "ls-js", show_ellipses: false, ...extra,
});
export const PRESETS = [
@@ -63,5 +63,8 @@ export function normaliseScenario(sc) {
out.splitter = splitter;
}
if (!out.splitter) out.splitter = "none";
+ // owner, 2026-11-22: bearings are lost in ownship's turns and two minutes after; a scenario
+ // saved before then takes the default
+ if (out.turn_loss_s === undefined) out.turn_loss_s = TURN_LOSS_S;
return out;
}
diff --git a/site/static/demo-data/js/scenario.js b/site/static/demo-data/js/scenario.js
index 32fe4460..a4b86cb9 100644
--- a/site/static/demo-data/js/scenario.js
+++ b/site/static/demo-data/js/scenario.js
@@ -4,7 +4,21 @@
// same bearings whatever the window.
import { buildPath, stateAt, manoeuvres, DEG } from "./track.js";
-export const SCHEMA_VERSION = "0.39.0";
+export const SCHEMA_VERSION = "0.40.0";
+
+// Owner, 2026-11-22: bearings are lost while ownship turns and for two minutes after each turn
+// is complete. A scenario's turn_loss_s is that tail in seconds (null: bearings kept through
+// turns); a scenario without the field takes the default.
+export const TURN_LOSS_S = 120;
+export const turnLossOf = (sc) => (sc.turn_loss_s === undefined ? TURN_LOSS_S : sc.turn_loss_s);
+
+// [t0, t1] intervals (s) in which no bearing is received: each ownship course change from its
+// start to its end plus the scenario's tail
+export function lossIntervals(sc, ownPath) {
+ const tail = turnLossOf(sc);
+ if (tail === null || !(tail >= 0)) return [];
+ return manoeuvres(ownPath).filter((m) => m.course).map((m) => [m.t0, m.t1 + tail]);
+}
const TWO_PI = 2 * Math.PI;
export const wrap2pi = (a) => {
const w = a % TWO_PI;
@@ -58,6 +72,8 @@ export function period(sc, paths = null) {
}
// The whole scenario's truth and bearings: arrays over t = 0, dt, ... up to the period.
+// `valid[i]` is 0 where the bearing is lost (an ownship turn and its tail); the noise is drawn
+// for every row all the same, so the kept bearings do not change with the loss setting.
export function bearings(sc) {
const own = buildPath(sc.ownship), tgt = buildPath(sc.target);
const T = Math.min(own.end, tgt.end);
@@ -70,6 +86,7 @@ export function bearings(sc) {
t: new Float64Array(n), z: new Float64Array(n), truth: new Float64Array(n),
ox: new Float64Array(n), oy: new Float64Array(n), ovx: new Float64Array(n), ovy: new Float64Array(n),
tx: new Float64Array(n), ty: new Float64Array(n), tvx: new Float64Array(n), tvy: new Float64Array(n),
+ valid: new Uint8Array(n).fill(1), lost: lossIntervals(sc, own),
};
for (let i = 0; i < n; i++) {
const t = i * dt;
@@ -80,11 +97,13 @@ export function bearings(sc) {
const b = wrap2pi(Math.atan2(q.x - o.x, q.y - o.y));
out.truth[i] = b;
out.z[i] = wrap2pi(b + sig * g.gauss());
+ for (const [a, e] of out.lost) if (t >= a - 1e-9 && t <= e + 1e-9) out.valid[i] = 0;
}
return out;
}
-// indices of the bearings inside the window [start, end]
+// indices of the bearing rows inside the window [start, end]; lost bearings keep their row (the
+// solvers' grids are regular) and are flagged invalid in the problem
export function windowRows(sc, b) {
const a = Math.max(0, sc.window.start_s), e = Math.min(sc.window.end_s, b.period);
const rows = [];
@@ -103,7 +122,7 @@ export function problemOf(sc, b, rows) {
const p = {
t_s: new Array(n), bearing_rad: new Array(n), own_x_m: new Array(n), own_y_m: new Array(n),
own_course_rad: new Array(n), own_speed_mps: new Array(n),
- sigma_rad: sc.sigma_deg * DEG, knots: [],
+ sigma_rad: sc.sigma_deg * DEG, knots: [], bearing_valid: new Array(n),
};
rows.forEach((i, k) => {
p.t_s[k] = b.t[i] - t0;
@@ -112,6 +131,7 @@ export function problemOf(sc, b, rows) {
p.own_y_m[k] = b.oy[i] - origin[1];
p.own_course_rad[k] = wrap2pi(Math.atan2(b.ovx[i], b.ovy[i]));
p.own_speed_mps[k] = Math.hypot(b.ovx[i], b.ovy[i]);
+ p.bearing_valid[k] = b.valid[i];
});
const tEnd = b.t[rows[n - 1]];
for (const m of manoeuvres(b.paths.tgt)) {
@@ -135,3 +155,10 @@ export function ownTurnsIn(sc, b) {
const a = sc.window.start_s, e = Math.min(sc.window.end_s, b.period);
return manoeuvres(b.paths.own).filter((m) => m.course && m.t1 >= a && m.t0 <= e);
}
+
+// the number of bearings received (not lost) among `rows`
+export function validCount(b, rows) {
+ let n = 0;
+ for (const i of rows) n += b.valid[i];
+ return n;
+}
diff --git a/site/static/demo-data/js/solver-info.js b/site/static/demo-data/js/solver-info.js
index 336df80f..7a1033d5 100644
--- a/site/static/demo-data/js/solver-info.js
+++ b/site/static/demo-data/js/solver-info.js
@@ -14,7 +14,7 @@ export const INFO = {
export const SOLVER_LIST = [INFO.lsJs, INFO.layer, INFO.tlm1, INFO.tlm2, INFO.tlm3];
export const LEGACY_SOLVERS = { "layer-cv": ["layer", "none"], "layer-oracle": ["layer", "truth"] };
-// Spec 036: the leg splitters (DemoSplitterInfo, schema 0.38.0)
+// Spec 036: the leg splitters (DemoSplitterInfo, schema 0.39.0)
export const SPLITTER_INFO = {
none: { name: "none", label: "None (one leg)", version: "none", assumptions: "No manoeuvre: one constant-velocity leg over the window.", told_truth: false, detects_target: false, detects_ownship: false },
truth: { name: "truth", label: "Told the true manoeuvres (oracle)", version: "truth", assumptions: "The page tells it the target's true manoeuvre spans and their kinds (a course-only change gets the layer's speed-continuity prior; a speed change does not): a ceiling for any splitter, not a system. Every other splitter's spans are treated as course changes, C's convention.", told_truth: true, detects_target: true, detects_ownship: false },
diff --git a/site/static/demo-data/js/solvers.js b/site/static/demo-data/js/solvers.js
index fb64e983..98f2a554 100644
--- a/site/static/demo-data/js/solvers.js
+++ b/site/static/demo-data/js/solvers.js
@@ -12,6 +12,9 @@ import * as TLM from "./tlm.js";
const DEG = Math.PI / 180;
const MIN_SIGMA = 0.1 * DEG; // the physics layer's and C's floor: a noise-free run still divides by sigma
+// bearings received among the problem's rows (spec 035 problems without the flag: all of them)
+const nValid = (p) => (p.bearing_valid ? p.bearing_valid.reduce((a, v) => a + (v ? 1 : 0), 0) : p.t_s.length);
+
const now = () => (typeof performance !== "undefined" ? performance.now() : Date.now());
// the problem as spec 021's scenario arrays, every `stride`-th bearing
@@ -23,6 +26,7 @@ function scenarioArrays(p, stride = 1, sigmaFloor = 0) {
const s = { n, t: new Float64Array(n), ox: new Float64Array(n), oy: new Float64Array(n), z: new Float64Array(n), valid: new Uint8Array(n).fill(1), course: new Float64Array(n), speed: new Float64Array(n), sigma: Math.max(p.sigma_rad, sigmaFloor), zigIndex: 0, idx };
idx.forEach((i, k) => {
s.t[k] = p.t_s[i];
+ if (p.bearing_valid) s.valid[k] = p.bearing_valid[i] ? 1 : 0;
s.ox[k] = p.own_x_m[i];
s.oy[k] = p.own_y_m[i];
s.z[k] = p.bearing_rad[i];
@@ -41,6 +45,7 @@ function cvInformation(p, th, sigma) {
const I = Array.from({ length: 4 }, () => new Float64Array(4));
const w = 1 / (sigma * sigma);
for (let i = 0; i < p.t_s.length; i++) {
+ if (p.bearing_valid && !p.bearing_valid[i]) continue;
const t = p.t_s[i];
const dx = th[0] + th[2] * t - p.own_x_m[i], dy = th[1] + th[3] * t - p.own_y_m[i];
const r2 = dx * dx + dy * dy;
@@ -68,7 +73,7 @@ export const lsJs = {
async solve(p) {
const t0 = now();
const s = scenarioArrays(p);
- if (s.n < 4) return failed(this.info, t0, "fewer than four bearings in the window");
+ if (nValid(p) < 4) return failed(this.info, t0, "fewer than four bearings in the window");
const r = solveBatch(s, s.n);
if (r === null || !Array.from(r.theta).every(Number.isFinite)) return failed(this.info, t0, "no solution");
const th = r.theta;
@@ -110,7 +115,7 @@ function layerSolver(mode) {
const stride = Math.max(1, Math.ceil(p.t_s.length / ROWS));
const s = scenarioArrays(p, stride, MIN_SIGMA);
if (s.n > ROWS) return failed(info, t0, "too many bearings for the graph");
- if (s.n < 4) return failed(info, t0, "fewer than four bearings in the window");
+ if (nValid(p) < 4) return failed(info, t0, "fewer than four bearings in the window");
const k = s.n - 1;
let trs = [];
let courseOnly = null;
@@ -182,8 +187,9 @@ function tlmSolver(seed) {
const dt = n > 1 ? p.t_s[1] - p.t_s[0] : 0;
if (Math.abs(dt - TLM.DT) > 1e-6) return failed(info, t0, "the learned model reads 5-second bearings: set the interval to 5 s");
if (n > TLM.MAX_ROWS) return failed(info, t0, "the learned model reads at most two hours (1,440 bearings): narrow the window");
- if (n < 2 * TLM.PATCH) return failed(info, t0, "fewer than twelve bearings in the window");
- const { f, mask, th } = TLM.periodFeatures(p.t_s, p.own_x_m, p.own_y_m, p.bearing_rad, Math.max(p.sigma_rad, 1e-6));
+ if (n < 2 * TLM.PATCH || nValid(p) < 2 * TLM.PATCH) return failed(info, t0, "fewer than twelve bearings in the window");
+ const valid = p.bearing_valid || new Uint8Array(n).fill(1);
+ const { f, mask, th } = TLM.periodFeatures(p.t_s, p.own_x_m, p.own_y_m, p.bearing_rad, Math.max(p.sigma_rad, 1e-6), valid);
if (ctx.progress) ctx.progress({ stage: "running the network" });
const o = await ctx.run(`tlm-s${seed}`, {
features: { dtype: "float32", shape: [1, TLM.MAX_ROWS, TLM.N_FEATURES], data: f },
@@ -194,7 +200,7 @@ function tlmSolver(seed) {
const mean = [];
for (let j = 0; j < T; j++) mean.push([o.mean[3 * j], o.mean[3 * j + 1], o.mean[3 * j + 2]]);
if (!mean.flat().every(Number.isFinite)) return failed(info, t0, "non-finite output");
- const tr = TLM.directTrack(mean, p.own_x_m, p.own_y_m, p.bearing_rad, th);
+ const tr = TLM.directTrack(mean, p.own_x_m, p.own_y_m, p.bearing_rad, th, valid);
const out = { solver: info.name, solver_version: info.version, status: "converged", t_s: [], x_m: [], y_m: [], vx_mps: [], vy_mps: [] };
for (let k = 0; k < n; k++) {
out.t_s.push(p.t_s[k]);
diff --git a/site/static/demo-data/js/splitters.js b/site/static/demo-data/js/splitters.js
index 102eceec..155ea7a1 100644
--- a/site/static/demo-data/js/splitters.js
+++ b/site/static/demo-data/js/splitters.js
@@ -1,7 +1,7 @@
// Spec 036: the demonstrator's leg splitters. A splitter reads the window's bearings and ownship's
// track and states where it thinks the target manoeuvred, as time spans; a TMA solver that accepts
// knots (the ONNX physics layer) then fits constant-velocity legs joined across those spans.
-// Each splitter declares a DemoSplitterInfo (schema 0.38.0) and `split(problem, ctx)` →
+// Each splitter declares a DemoSplitterInfo (schema 0.39.0) and `split(problem, ctx)` →
// {spans: [{start_s, end_s, stat}], rows_dt_s, runtime_ms, message}.
//
// Only the "truth" splitter is shown the problem's true manoeuvre spans; the worker strips them
@@ -33,6 +33,7 @@ export function splitterArrays(p, targetDt = 10, maxRows = ROWS) {
const s = { n, stride, idx, t: new Float64Array(n), ox: new Float64Array(n), oy: new Float64Array(n), z: new Float64Array(n), valid: new Uint8Array(n).fill(1), course: new Float64Array(n), speed: new Float64Array(n), sigma: Math.max(p.sigma_rad, MIN_SIGMA), zigIndex: 0 };
idx.forEach((i, k) => {
s.t[k] = p.t_s[i];
+ if (p.bearing_valid) s.valid[k] = p.bearing_valid[i] ? 1 : 0;
s.ox[k] = p.own_x_m[i];
s.oy[k] = p.own_y_m[i];
s.z[k] = p.bearing_rad[i];
diff --git a/site/static/demo-data/js/tlm.js b/site/static/demo-data/js/tlm.js
index 66f0b1a1..9a63668a 100644
--- a/site/static/demo-data/js/tlm.js
+++ b/site/static/demo-data/js/tlm.js
@@ -12,25 +12,33 @@ const DEG = Math.PI / 180;
const L_UNIT = 1.0e4, V_UNIT = 10.0, D_UNIT = 100.0, T_UNIT = 7200.0;
const SMOOTH_ROWS = 7;
-// [MAX_ROWS * 9] float32 features and the [MAX_ROWS] row mask; every bearing is valid here
-export function periodFeatures(t, ox, oy, z, sigma) {
+// [MAX_ROWS * 9] float32 features and the [MAX_ROWS] row mask (frame.features): a row without a
+// bearing (`valid[k]` 0, a bearing lost in ownship's turn) keeps its ownship and time features and
+// zeros its bearing features; the frame turns to the first valid bearing
+const allValid = (n) => new Uint8Array(n).fill(1);
+export function firstValid(z, valid) {
+ for (let k = 0; k < z.length; k++) if (valid[k]) return z[k];
+ return 0;
+}
+export function periodFeatures(t, ox, oy, z, sigma, valid = allValid(t.length)) {
const n = t.length;
const f = new Float32Array(MAX_ROWS * N_FEATURES);
const mask = new Uint8Array(MAX_ROWS);
- const th = z[0];
+ const th = firstValid(z, valid);
const c = Math.cos(th), s = Math.sin(th);
const lsig = Math.log(Math.max(sigma, 1e-6) / DEG);
for (let k = 0; k < n; k++) {
const tk = k * DT; // the model's clock: rows from 0 at its own spacing
const dx = k ? ox[k] - ox[k - 1] : 0, dy = k ? oy[k] - oy[k - 1] : 0;
const dt = k ? tk - (k - 1) * DT : 0;
+ const ok = valid[k] ? 1 : 0;
const b = z[k] - th;
const o = k * N_FEATURES;
- f[o] = Math.sin(b);
- f[o + 1] = Math.cos(b);
+ f[o] = Math.sin(b) * ok;
+ f[o + 1] = Math.cos(b) * ok;
f[o + 2] = (dx * c - dy * s) / D_UNIT;
f[o + 3] = (dy * c + dx * s) / D_UNIT;
- f[o + 4] = 1;
+ f[o + 4] = ok;
f[o + 5] = lsig;
f[o + 6] = dt / 10.0;
f[o + 7] = tk / T_UNIT;
@@ -60,11 +68,16 @@ function unwrap(z) {
return out;
}
-// learned.smoothed_bearing with every bearing valid: unwrap, then a centred running median of
-// seven rows with the ends repeated
-export function smoothedBearing(z) {
- const u = unwrap(z);
- const h = SMOOTH_ROWS >> 1, n = u.length;
+// learned.smoothed_bearing: valid bearings unwrapped, interpolated over the rows without one,
+// then a centred running median of seven rows with the ends repeated
+export function smoothedBearing(z, valid = allValid(z.length)) {
+ const n = z.length;
+ const ks = [];
+ for (let k = 0; k < n; k++) if (valid[k]) ks.push(k);
+ if (!ks.length) return new Float64Array(n).fill(NaN);
+ const uk = unwrap(Float64Array.from(ks, (k) => z[k]));
+ const u = ks.length === n ? uk : interp(n, ks, Array.from(uk));
+ const h = SMOOTH_ROWS >> 1;
const out = new Float64Array(n);
const win = new Float64Array(SMOOTH_ROWS);
for (let i = 0; i < n; i++) {
@@ -90,7 +103,7 @@ function interp(n, xs, ys) {
// learned.direct_track: the model's own track at every row (x, y, vx, vy), from its per-token
// means ([T][3]); position is the stated range along the smoothed measured bearing
-export function directTrack(mean, ox, oy, z, th) {
+export function directTrack(mean, ox, oy, z, th, valid = allValid(z.length)) {
const n = z.length;
const last = tokenRows(n);
const col = (c) => last.map((_, j) => mean[j][c]);
@@ -100,7 +113,7 @@ export function directTrack(mean, ox, oy, z, th) {
for (let k = 0; k < last[0]; k++) lnR[k] = mean[0][0] + slope * (k - last[0]);
}
const c = Math.cos(th), s = Math.sin(th);
- const zs = smoothedBearing(z);
+ const zs = smoothedBearing(z, valid);
const out = [];
for (let k = 0; k < n; k++) {
const r = L_UNIT * Math.exp(lnR[k]);
diff --git a/src/tma2/types/generated/tma.py b/src/tma2/types/generated/tma.py
index e470a8cc..31ae8ba8 100644
--- a/src/tma2/types/generated/tma.py
+++ b/src/tma2/types/generated/tma.py
@@ -31,7 +31,7 @@
metamodel_version = "1.12.0"
-version = "0.39.0"
+version = "0.40.0"
class ConfiguredBaseModel(BaseModel):
@@ -3993,6 +3993,7 @@ class DemoScenario(ConfiguredBaseModel):
target: DemoTrack = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['Scenario', 'DemoScenario']} })
sigma_deg: float = Field(default=..., description="""Standard deviation of the zero-mean Gaussian bearing noise (FR-011).""", ge=0, le=5, json_schema_extra = { "linkml_meta": {'domain_of': ['DemoScenario']} })
interval_s: float = Field(default=..., description="""Bearing sample interval (FR-010).""", ge=1, le=120, json_schema_extra = { "linkml_meta": {'domain_of': ['DemoScenario']} })
+ turn_loss_s: Optional[float] = Field(default=None, description="""Owner 2026-11-22: bearings are lost while ownship turns and for this many seconds after each turn ends (default 120); null keeps every bearing.""", ge=0, le=1800, json_schema_extra = { "linkml_meta": {'domain_of': ['DemoScenario']} })
seed: int = Field(default=..., description="""Seed of the noise generator; the same seed and scenario give identical bearings.""", ge=0, le=4294967295, json_schema_extra = { "linkml_meta": {'domain_of': ['ScenarioMetadata',
'PhysicsModelConfig',
'DetectorConfig',
@@ -4034,6 +4035,7 @@ class TmaProblem(ConfiguredBaseModel):
own_course_rad: Optional[list[float]] = Field(default=None, description="""Ownship course at each bearing (the learned model reads ownship legs from it).""", json_schema_extra = { "linkml_meta": {'domain_of': ['TmaProblem']} })
own_speed_mps: Optional[list[float]] = Field(default=None, json_schema_extra = { "linkml_meta": {'domain_of': ['TmaProblem']} })
sigma_rad: float = Field(default=..., json_schema_extra = { "linkml_meta": {'domain_of': ['TmaProblem']} })
+ bearing_valid: Optional[list[int]] = Field(default=None, description="""1 where the bearing was received, 0 where it was lost (an ownship turn and its tail); absent: every bearing received. Lost rows keep their place so the time grid stays regular.""", json_schema_extra = { "linkml_meta": {'domain_of': ['TmaProblem']} })
knots: Optional[list[DemoSpan]] = Field(default=None, description="""Manoeuvre spans a solver may use when it accepts knots (the oracle is told the truth's).""", json_schema_extra = { "linkml_meta": {'domain_of': ['DetectorConfig',
'KnotSet',
'EModelConfig',
diff --git a/src/tma2/types/generated/tma.schema.json b/src/tma2/types/generated/tma.schema.json
index 78b4f1ba..bc0e393b 100644
--- a/src/tma2/types/generated/tma.schema.json
+++ b/src/tma2/types/generated/tma.schema.json
@@ -874,6 +874,15 @@
"target": {
"$ref": "#/$defs/DemoTrack"
},
+ "turn_loss_s": {
+ "description": "Owner 2026-11-22: bearings are lost while ownship turns and for this many seconds after each turn ends (default 120); null keeps every bearing.",
+ "maximum": 1800,
+ "minimum": 0,
+ "type": [
+ "number",
+ "null"
+ ]
+ },
"window": {
"$ref": "#/$defs/DemoWindow"
}
@@ -5788,6 +5797,16 @@
},
"type": "array"
},
+ "bearing_valid": {
+ "description": "1 where the bearing was received, 0 where it was lost (an ownship turn and its tail); absent: every bearing received. Lost rows keep their place so the time grid stays regular.",
+ "items": {
+ "type": "integer"
+ },
+ "type": [
+ "array",
+ "null"
+ ]
+ },
"knots": {
"description": "Manoeuvre spans a solver may use when it accepts knots (the oracle is told the truth's).",
"items": {
@@ -6360,6 +6379,6 @@
],
"title": "tma",
"type": "object",
- "version": "0.39.0"
+ "version": "0.40.0"
}
diff --git a/src/tma2/types/generated/version.py b/src/tma2/types/generated/version.py
index c6a41d35..6abc4222 100644
--- a/src/tma2/types/generated/version.py
+++ b/src/tma2/types/generated/version.py
@@ -1,2 +1,2 @@
# Generated from schema/tma.yaml by scripts/gen_types.py. Do not edit.
-SCHEMA_VERSION = "0.39.0"
+SCHEMA_VERSION = "0.40.0"
diff --git a/tests/unit/test_demo_schema.py b/tests/unit/test_demo_schema.py
index 82fabc64..eb0f80db 100644
--- a/tests/unit/test_demo_schema.py
+++ b/tests/unit/test_demo_schema.py
@@ -30,7 +30,7 @@ def test_pydantic_accepts_a_scenario() -> None:
leg = {"course_deg": 10.0, "speed_kt": 8.0, "duration_s": 600.0, "turn_rate_dps": 1.0}
sc = DemoScenario.model_validate(
{
- "schema_version": "0.39.0",
+ "schema_version": "0.40.0",
"ownship": {"start_x_nm": 0.0, "start_y_nm": 0.0, "legs": [leg]},
"target": {"start_x_nm": 1.0, "start_y_nm": 9.0, "legs": [leg]},
"sigma_deg": 1.0,
diff --git a/tests/unit/test_types.py b/tests/unit/test_types.py
index 893dea46..3015cb72 100644
--- a/tests/unit/test_types.py
+++ b/tests/unit/test_types.py
@@ -13,7 +13,7 @@
def test_schema_version_reads_gitma_files() -> None:
from tma2.data.versions import compatible
- assert SCHEMA_VERSION == "0.39.0"
+ assert SCHEMA_VERSION == "0.40.0"
assert compatible("0.16.0", SCHEMA_VERSION)