react-afv-metrics
react-afv-metrics computes scoring, per-group question breakdowns, and cognitive load for each gunner in an AFV Recognition (AFVR) session. It runs downstream of react-data-preprocess and feeds react-dashboard-transform for legacy v1 dashboard widgets.
Summary
For each gunner found in the preprocessed data, the node:
- Groups
QUESTIONS_COMPLETEinteraction events by question set into per-group scores. - Computes an overall score across groups.
- Builds a per-question breakdown (correct/partial/incorrect) for the results widget.
- Runs the cognitive load model over the gunner’s bio data, when present.
AFVR level scoring
An AFVR session belongs to a curriculum level (1 through 5), resolved during preprocessing from the scenario UUID lookup table. When the session’s level is known, the overall score is sized against a fixed question total and pass mark for that level, not against however many questions the trainee actually reached:
| Level | Total questions | Pass mark |
|---|---|---|
| 1 | 40 | 37.5 |
| 2 | 25 | 22.5 |
| 3 | 25 | 22.5 |
| 4 | 15 | 13.5 |
| 5 | 15 | 13.5 |
This table is a fixed lookup for this training programme’s curriculum. It is not a generic, configurable platform mechanism, and it is not derived from the captured data.
A score of 0 on any single question (per the AFVR marking scheme: correct friend/foe and category but wrong vehicle scores 0.5, anything else scores 0) fails the session outright, regardless of how high the total score is against the pass mark above. This zero-tolerance rule only applies when the level is known.
When the level is unknown (for example, a session captured before the scenario lookup carried level data, or a scenario UUID outside this table), the node falls back to sizing the total against however many questions the gunner actually answered, and no pass or fail is computed.
Output shape
The node returns a dictionary keyed by gunner user ID. Each entry includes:
| Field | Description |
|---|---|
GroupScoreSummary | List of per-group records: Group, TotalQuestions (answered in that group), TotalScore, Percentage, TimeToConfirmSecs, GroupComplete. |
OverallScore | Single record: TotalQuestions and PassMark from the level table when the level is known (otherwise summed from GroupScoreSummary and PassMark is null), TotalScore, OverallPercentage, TotalTimeSecs, Level, Pass (true/false when a level is known, otherwise null). Pass is false whenever any question scored 0, even if TotalScore clears PassMark. |
QuestionBreakdown | Per-group list of individual questions with QuestionIndex, UserAnswer, CorrectAnswer, Score, and Status (Green, Amber, Red). |
CognitiveLoad | AverageScore and Class for the gunner’s session. |
CognitiveLoadTimeline | Windowed cognitive load points over the session. |
Limitations
- Requires
react-data-preprocessoutput; suspends if the resolved scenario type is not an AFV Recognition scenario. GroupScoreSummary[].TotalQuestionsreflects only the questions actually answered within that group. Only the overall score is sized against the fixed per-level total.- Sessions processed before the scenario lookup carried level data keep the answered-question-based total until reprocessed.
- The zero-tolerance rule is evaluated per group (
HasZeroScore, internal only, not part ofGroupScoreSummary’s output shape). A single 0-point question anywhere in the session fails it, there is no partial-credit override.