Skip to Content
This documentation is provided with the HEAT environment and is relevant for this HEAT instance only.
RunnersReact Utilsreact-afv-metrics

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_COMPLETE interaction 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:

LevelTotal questionsPass mark
14037.5
22522.5
32522.5
41513.5
51513.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:

FieldDescription
GroupScoreSummaryList of per-group records: Group, TotalQuestions (answered in that group), TotalScore, Percentage, TimeToConfirmSecs, GroupComplete.
OverallScoreSingle 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.
QuestionBreakdownPer-group list of individual questions with QuestionIndex, UserAnswer, CorrectAnswer, Score, and Status (Green, Amber, Red).
CognitiveLoadAverageScore and Class for the gunner’s session.
CognitiveLoadTimelineWindowed cognitive load points over the session.

Limitations

  • Requires react-data-preprocess output; suspends if the resolved scenario type is not an AFV Recognition scenario.
  • GroupScoreSummary[].TotalQuestions reflects 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 of GroupScoreSummary’s output shape). A single 0-point question anywhere in the session fails it, there is no partial-credit override.