Repository navigation
Capture guided results from free driving, keep the samples behind them, and guard against a slow sample rate - #143
Merged
Merged
Conversation
…te recording a no A draft held only the verdict of each guided test and a sentence about it. When the automatic-blip detector turned out to read the driver's carried throttle as a blip, nothing in the drafts could be re-read, so 84 records were flagged for a second drive. The drive now keeps the last six seconds (at most 300 samples) behind every result the driver accepts, with the channels as SimHub published them and the resting throttle and clutch, and the draft stores them under an optional `telemetry` block, one sample to a line. A stored trace fed back through the detector reproduces its answer, which the .NET tests assert. The gear count has no trace, and retried or skipped attempts are not kept. The importer stages exactly what it did before; a Python test holds it to that. The detector also never asked how fast samples were arriving. An automatic blip or an ignition cut lasts about a tenth of a second, so at ten samples a second one can pass between two samples, and its absence was still recorded as "no automatic blip". The drive now measures the median rate per attempt and for the whole drive. Below 20 samples a second an unseen blip is `unknown` rather than `no`, and the cut and blip method text says why. A spike that was sampled still counts at any rate, and a rate is only reported from eight or more intervals. The plugin adapter change is four lines carrying the telemetry from the guided results into the saved draft. It was not compiled here: that needs the SimHub SDK. The core and its tests were built with Mono as C# 5. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
…it settles Every flat upshift and every off-throttle downshift in ordinary driving is already one of the scripted tests, taken without being asked. The gear-count step now asks the driver to drive normally up to top gear and watches each shift on the way, using the scripted detector's own thresholds. Three or more like shifts stand in for the scripted test, so a car that takes flat upshifts and off-throttle downshifts finishes the drive after this step instead of four more, on several shifts' evidence rather than one. The overlay shows the counts as they register and the result line says which tests remain. Free driving can only see what the gearbox accepted; a refusal looks the same as a shift never tried. So it never records that a lift, a blip or the clutch is required, and the scripted two-stage test still runs for anything it did not settle. A shift with clutch input is set aside. A lifted upshift is counted but settles nothing. Flat upshifts without a torque collapse leave the cut unknown, never no. Downshifts that disagree about a throttle spike settle nothing, because a driver who blipped on some looks the same. A lower gear that never took drive is not counted. The slow-sample-rate rule applies here as it does to the scripted test. The counts are stored under telemetry.free_drive and the trace kept for a test settled this way is the most recent shift that counted. Also drops the sentence telling the driver a licensed SimHub is fast enough. It rested on an unlicensed update rate nobody here can observe. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
The first live drive of free driving, a TS050 in Project Motor Racing 2.3.0.3, settled nothing and fell through to the scripted tests. Its draft showed why: six shifts set aside as clutched and none counted. PMR's clutch channel reads 100% with the car stopped and 100% again through every downshift, as the car works its own clutch, so every downshift was filed as the driver's. The scripted test accepts such a shift with a caution; free driving now does the same when the channel already read above 20% at rest, stores how many counted shifts moved the channel, and attaches that caution to the result. The upshifts matched nothing at all. PMR's published throttle drops to 80% for the last few samples before the gear index changes, which after the simulator's resting offset fell under the 70% the detector required right up to the change. The driver's throttle is now read from before the last 150 ms, and those last moments only have to not be a lift. The downshift's engagement baseline is taken from the same earlier point, before a blip raises it. Shifts that are none of the tests are now counted as other_shifts, so a draft says when shifts were seen and why they settled nothing. A scripted trace ended on the sample that settled it, which for an upshift is the gear change itself. It now runs up to half a second past it. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
PMR's 15% idle offset was applied whenever the resting reading was not above 5%, which included a reading of zero. A TS050 in PMR 2.3.0.3 read 0% at rest in four drafts, so full throttle read 85% and the channel was treated as not following the pedal. Free driving then saw a throttle spike on 13 of 13 downshifts and recorded the blip as unknown. A reading taken with the car stopped now always decides the offset. PMR's 15% remains the fallback only for a drive that never saw the car at rest, which the existing rolling-start test still covers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
A gear had to hold 600 ms before its shift counted, and a shift that was followed sooner was dropped outright, so a quick run down the gears counted only its last step. A gear held 300 ms before the next shift began is now judged on what it showed in that time, with the clutch, torque and blip windows ending there so the next shift's blip is not attributed to it. In a run of coast downshifts the throttle only has to have closed again after the previous blip. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
A flat clutchless upshift on an H-pattern box leaves the engine with no gear driving it. It runs up to the limiter and its torque falls away, then returns once the next gear takes drive. Free driving counted that as an automatic cut on every upshift of a live March GTP drive. A collapse during which engine speed climbed is now recorded as engine_ran_free and measures nothing about a cut, so the cut stays unknown. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
The coast and manual-blip tests confirm a downshift when the lower gear holds the engine at a higher speed than the gear before it. When the driver shifted up to set the test up, that baseline was taken from the first sample in the higher gear, with the engine still falling from the gear below, so it read as high as the gear the driver then went back down to. A live drive had a downshift that plainly took drive go unconfirmed and recorded as refused. The baseline is now the lowest ratio seen in the gear, which is the one it actually holds. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
Shifted at the limiter, an unloaded engine has nowhere left to climb, so the rising-speed check missed it and a live H-pattern drive still showed two upshifts with a torque cut. A collapse while the box passed through neutral and the engine held its speed is now set aside the same way. The method text also says when too few upshifts were measured, rather than that a collapse on all of them does not establish a cut. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by Jason · project thread
Before you merge
simhub\build.ps1, 14,166 assertions at the head) passed on the maintainer's PC and was installed there. In Project Motor Racing 2.3.0.3 a Toyota TS050 (paddles) and a March GTP (H-pattern) both completed the drive from free driving and saved drafts. No other simulator has been driven. The last commit (limiter in neutral) was built and tested but not yet driven.FreeDriveShiftsToSettledecides how many like shifts stand in for a scripted test.unknownwhere it used to beno.telemetryblock that the schema onmainrejects at intake, so [Observation]: Project Motor Racing - TS050 #145 and [Observation]: Project Motor Racing - March GTP #148 only go through once this is merged and the reviewing checkout is updated.What changed
Free driving. The second step (formerly "Forward gears") asks the driver to drive normally up to top gear, and watches every shift on the way with the scripted detector's own thresholds:
It only sees what the gearbox accepted, so it never records that a lift, a blip or the clutch is required. Lifted upshifts are counted but settle nothing. Downshifts that disagree about a spike settle nothing and the scripted test runs.
Recorded telemetry. A draft stores, under an optional
telemetryblock, the samples behind each accepted result (up to six seconds or 300 samples, plus half a second after), the resting throttle and clutch, the sample rate, and the free-driving counts, including shifts that matched no test.Sample rate. Below 20 samples a second the absence of a blip is
unknown, and the cut and blip method text says why. A spike that was sampled still counts.Fixes from the live drives
engine_ran_freeand leaves the cutunknown.Noticed, not changed
Not included
Checks
python -m as_driven_db validate: passedpython -m unittest discover -s tests: passed, 2 skippedgit diff --check: clean🤖 Generated with Claude Code
https://claude.ai/code/session_0114SHKuGF14miYjDXrsrGx5