Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/entities/spot/sim-stream-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ export type SimMapAnchor = {
category?: string;
confidence?: number;
match_reason?: string;
/** Actual/public POI anchor metadata when provided by contextBuilder. */
poi_id?: string;
poi_name?: string;
poi_category?: string;
address?: string | null;
};

export type SimHotspotSignal = {
Expand Down
9 changes: 8 additions & 1 deletion src/features/simulation/model/use-sim-run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@ function loopPeriodTicks(manifest: SimManifest): number {
}

function dataWindowTicks(manifest: SimManifest): number {
const loopPeriod = loopPeriodTicks(manifest);
const declaredMaxProjected = manifest.max_projected_tick;
const tailMaxProjected =
manifest.projection_tail_ticks != null
? loopPeriod + manifest.projection_tail_ticks - 1
: null;
return Math.max(
manifest.total_ticks,
(manifest.max_projected_tick ?? manifest.total_ticks - 1) + 1,
(declaredMaxProjected ?? manifest.total_ticks - 1) + 1,
tailMaxProjected != null ? tailMaxProjected + 1 : 0,
);
}

Expand Down
Loading