Wire M10.7b interpolation and the stale loss view into the client
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (client) (push) Successful in 12m27s
Foundation / checks (network) (push) Successful in 12m46s
Foundation / checks (tsan) (push) Successful in 7m59s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 25m13s
Foundation / checks (postgres) (push) Canceled after 12m48s
Foundation / checks (deploy) (push) Successful in 5s
Foundation / checks (ecs) (push) Successful in 1m55s
Foundation / checks (client) (push) Successful in 12m27s
Foundation / checks (network) (push) Successful in 12m46s
Foundation / checks (tsan) (push) Successful in 7m59s
Foundation / postgres-tools (push) Canceled after 0s
Foundation / server-image (push) Canceled after 0s
Foundation / image (push) Canceled after 0s
Foundation / checks (checks) (push) Canceled after 25m13s
Foundation / checks (postgres) (push) Canceled after 12m48s
ADR-0095. The engineering client times presentation with the tick clock: its own marker between ticks, other markers interpolated a few ticks behind (grey when stale). Silence beyond 3 ticks and long-gap holds are stale. A lost session leaves its last view frozen and labelled stale until the reconnect's fresh baseline; nothing is predicted or sent meanwhile. evo-motion-trace --remote measures remote-marker error between two clients through the relay, with a 1.5 s outage (motion-trace-remote-smoke CTest). Prediction errors are recorded only for ticks inputs are scheduled for. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -55,11 +55,14 @@ class MotionPredictor {
|
||||
// nothing before the first authoritative state.
|
||||
[[nodiscard]] std::optional<network::motion::State> predict(std::uint64_t tick);
|
||||
// M10.7 (ADR-0095): the position `fraction` (0..1) of the way from tick to tick + 1, for
|
||||
// presentation between ticks; records the prediction for `tick` like predict().
|
||||
// presentation between ticks. With `record`, the prediction for `tick` is kept to measure
|
||||
// errors like predict(); a caller presenting beyond the tick it schedules inputs for passes
|
||||
// false (inputs for that tick may still come).
|
||||
struct Point {
|
||||
double x{}, y{}; // Micrometres.
|
||||
};
|
||||
[[nodiscard]] std::optional<Point> predict_between(std::uint64_t tick, double fraction);
|
||||
[[nodiscard]] std::optional<Point> predict_between(std::uint64_t tick, double fraction,
|
||||
bool record = true);
|
||||
// The jump rebasing made to the newest prediction (old minus new), since the last call.
|
||||
struct Offset {
|
||||
std::int64_t x{}, y{};
|
||||
@@ -82,6 +85,7 @@ class MotionPredictor {
|
||||
}
|
||||
|
||||
private:
|
||||
[[nodiscard]] std::optional<network::motion::State> predict(std::uint64_t tick, bool record);
|
||||
[[nodiscard]] std::optional<network::motion::State> replay(std::uint64_t tick);
|
||||
// Re-predicts the newest presented tick after a change and accumulates the jump.
|
||||
void rebase(const std::optional<network::motion::State>& before);
|
||||
|
||||
Reference in New Issue
Block a user