MATH CHANNELS

Build your own telemetry

Custom traces you build from a formula. If the built-in graphs in Telemetry Graphs don't show the metric you care about, define your own — like throttle minus brake for net pedal input. No programming background needed: if you can write (a + b) / 2, you can write a math channel.

01

Opening the panel

Click MATH CHANNELS in the top-left of the Telemetry Graphs tab. The panel opens on the right side.

Channel list (top)

Every math channel that exists — your own and the built-ins. Each row shows a visibility checkbox, color swatch, name, current value, and unit. Hover a row for edit / duplicate / delete.

Formula editor (middle)

Opens when you click + New or edit. Syntax highlighting, autocomplete for channel + function names, inline errors as you type.

Status bar (bottom)

How long the engine took to evaluate all channels on the last tick. If this gets large, you have too many heavy formulas.
Built-in vs your own. Built-in presets can be toggled and duplicated into editable copies, but not edited or deleted. Your own channels can be edited or deleted at any time.
Visibility. The checkbox on each row controls whether that channel gets its own graph. Unchecked channels are still evaluated (so other formulas can reference them) but don't take up screen space.
02

Your first math channel

Let's build a net pedal input channel — positive when you're on the throttle, negative when braking.

  1. 01Click + New at the top of the channel list.
  2. 02In the Formula field, type:
    throttle - brake
    Channel names highlight in teal as you type. A typo shows Unknown channel: ‘thottle’. Did you mean ‘throttle’?
  3. 03Fill in metadata:
    • Name: net_pedal — lowercase, no spaces. Used to reference this channel from other formulas.
    • Unit: % — free text label on the graph.
    • Color: click the swatch and pick something distinct.
  4. 04Click Save. A new graph appears at the bottom of the stack — drive a lap and the trace fills in.
That's the whole loop: name, formula, save. Everything else on this page is the building blocks you can put inside a formula.
Where it's saved. Your channels live in math_channels.json in the S1napse config directory. Survives restarts; you can copy that file between machines.
03

Formula syntax

A formula is a single expression — no variables, statements, or loops. The grammar is small enough to fit on this page.

Arithmetic

a + b      addition
a - b      subtraction
a * b      multiplication
a / b      division (returns 0 if b is 0)
a % b      remainder
a // b     floor division
a ** b     power, e.g. 2 ** 3 == 8
-a         negation

Comparisons

Return 1.0 when true and 0.0 when false:
a > b      a < b      a >= b      a <= b
a == b     a != b

Boolean operators

cond1 and cond2
cond1 or cond2
not cond

Conditional (ternary)

value_if_true if condition else value_if_false
Example: 1 if brake > 50 else 0 is a hard-braking flag.

Numbers and constants

Numbers: integers (42) or decimals (3.14).Three constants are built in:pi — 3.14159…e — 2.71828…dt — seconds since the previous telemetry tick (useful for integrating, but rate() covers the common case).
What's not allowed. Variable assignment, multiple statements, function defs, lambdas, imports, attribute access (x.y), indexing (x[0]), strings, lists, dicts. You'll get an error like Disallowed syntax: Assign. Only arithmetic, comparisons, function calls, and conditionals are allowed.
04

Channel reference

The raw telemetry channels you can reference inside a formula. Categories are for navigation; in formulas you just write the name.

Car state

NameUnitDescription
speedkm/hVehicle speed
rpmrpmEngine RPM
gearintCurrent gear (-1 reverse, 0 neutral, 1–8 forward)
abs0/11 when ABS is active this tick
tc0/11 when traction control is active this tick

Pedals and steering

NameUnitDescription
throttle%Throttle position, 0–100
brake%Brake position, 0–100
steer_deg°Steering angle (negative = left, positive = right)

Tyres

NameUnitDescription
tyre_temp_fl/fr/rl/rr°CTyre core temperature, per corner
tyre_pressure_fl/fr/rl/rrpsiHot pressure, per corner
tyre_wear_fl/fr/rl/rr%Wear remaining, per corner

Brakes

NameUnitDescription
brake_temp_fl/fr/rl/rr°CDisc temperature, per corner
brake_bias_pct%Front brake bias

Fuel and environment

NameUnitDescription
fuel_lLFuel remaining
air_temp°CAmbient air temperature
road_temp°CTrack surface temperature
Referencing other math channels. A formula can reference any other math channel by name — built-in or your own — as long as it was registered first. Built-in presets are registered in dependency order; when you create a channel that depends on another user-made channel, save the dependency first.
05

Function reference

Stateless — look only at the current tick

FunctionArgsWhat it does
abs(x)1Absolute value
min(a, b)2Smaller of two values
max(a, b)2Larger of two values
sqrt(x)1Square root. Returns 0 for negative input
avg(a, b, …)2+Mean of all arguments
clamp(x, lo, hi)3Limit x to the range [lo, hi]
if(cond, a, b)3Same as the ternary a if cond else b

Examples

abs(steer_deg)                        # steering effort regardless of direction
clamp(rate(speed) / 3.6, -50, 50)     # longitudinal accel, capped at ±50 m/s²
avg(tyre_temp_fl, tyre_temp_fr)       # average front tyre temp

Stateful — remember previous ticks

The first argument must be a bare channel name — not an expression.
✓ works
rate(speed)
✗ saves cleanly but reads 0 forever
rate(speed * 2)
Build the inner maths as a separate channel and reference that.

Stateful function reference

FunctionArgsWhat it returns
prev(channel, n=1)channel, optional intValue n ticks ago (default 1)
delta(channel)channelChange since the previous tick
rate(channel)channelChange per second (delta / dt)
rolling_avg(channel, n=20)channel, optional intMoving average over the last n ticks
rolling_max(channel, n=20)channel, optional intMoving maximum
rolling_min(channel, n=20)channel, optional intMoving minimum
lap_avg(channel)channelMean across the current lap so far
lap_max(channel)channelPeak this lap so far
lap_min(channel)channelLowest this lap so far
lap_start(channel)channelValue at the start of the current lap

Quick uses

rate(speed) — longitudinal acceleration in km/h per second. Divide by 3.6 for m/s².rolling_avg(throttle, 20) — smoothed throttle trace, useful as a coaching reference.lap_start(fuel_l) - fuel_l — fuel used so far this lap.prev(brake, 5) — brake pressure 5 ticks ago, handy for release timing.
06

Built-in presets

Fourteen channels ship with the app. They're useful on their own and double as worked examples — duplicate any of them to see how the formula is built.

Tyre diagnostics

front_temp_avg

avg(tyre_temp_fl, tyre_temp_fr)
Average front tyre temperature. Pair with rear_temp_avg to spot understeer/oversteer trends.

rear_temp_avg

avg(tyre_temp_rl, tyre_temp_rr)
Average rear tyre temperature.

temp_balance_fb

front_temp_avg - rear_temp_avg
Front vs rear balance. Positive = fronts hotter (typical for understeer-y setups). Hovering near zero is usually what you want.

tyre_temp_avg

avg(tyre_temp_fl, tyre_temp_fr, tyre_temp_rl, tyre_temp_rr)
Single number for “how hot are my tyres overall”. Good for comparing stints.

tyre_temp_spread

max(max(tyre_temp_fl, tyre_temp_fr),
    max(tyre_temp_rl, tyre_temp_rr)) -
min(min(tyre_temp_fl, tyre_temp_fr),
    min(tyre_temp_rl, tyre_temp_rr))
Spread between hottest and coolest tyre. High spread = imbalance — could be setup, could be driving line.
Driving technique

trail_brake_flag

1 if brake > 5 and abs(steer_deg) > 15 else 0
Reads 1 when braking and steering at the same time. Great as an overlay on the lap analysis map.

throttle_rate

clamp(rate(throttle), -500, 500)
How fast you're moving the throttle pedal, in % per second. Smooth drivers keep this number low. The clamp prevents telemetry hiccups from blowing out the graph.

brake_rate

clamp(rate(brake), -500, 500)
Same idea for the brake. Watch the release rate at corner entry.

throttle_jitter

abs(delta(throttle))
Per-tick throttle change. On its own this is noisy — it's a helper for the next channel.

throttle_smoothness

rolling_avg(throttle_jitter, 20)
Smoothness score based on the last 20 ticks of jitter. Lower is smoother. A reference channel to compare across stints or against a faster driver.
Performance

accel_longitudinal

rate(speed) / 3.6
Longitudinal acceleration in m/s². Positive = accelerating, negative = braking.

peak_brake_recent

rolling_max(brake, 100)
Peak brake pressure over the last ~5 seconds. Useful for spotting whether you're committing on the brakes corner-to-corner.

fuel_used_lap

lap_start(fuel_l) - fuel_l
Fuel burned since the lap started. Resets every lap. Drop this on the dashboard as a sanity check on race strategy.
07

Recipes

Five extra formulas you can paste in. Each one is a single math channel.

Coast flag — off both pedals

1 if throttle < 5 and brake < 5 else 0
1 when you're coasting (off the throttle, not yet on the brakes), 0 otherwise. Long coast sections in slow corners are usually time wasted.

Pedal overlap — left-foot brake or mistake

1 if throttle > 5 and brake > 5 else 0
1 when both pedals are pressed. Intentional for left-foot braking; an unintentional spike on corner entry usually means you stabbed the brake while still on the throttle.

Front–rear pressure delta

avg(tyre_pressure_fl, tyre_pressure_fr) -
avg(tyre_pressure_rl, tyre_pressure_rr)
How much hotter (in pressure terms) the fronts are running vs the rears. Combined with temp_balance_fb, a quick read on whether the car is working the front axle harder.

Steering smoothness

rolling_avg(abs(delta(steer_deg)), 30)
How much you're sawing at the wheel, averaged over the last 30 ticks. Lower is calmer hands.

Hottest tyre

max(max(tyre_temp_fl, tyre_temp_fr),
    max(tyre_temp_rl, tyre_temp_rr))
The single hottest tyre right now. Useful as a “is anything cooking” alarm in long stints.
08

Tips and gotchas

  • Stateful function args must be a bare channel name. rate(speed) works; rate(speed * 2) saves cleanly but reads 0 forever, which is harder to debug than an error.
  • Division by zero, NaN, and infinity are silently coerced to safe values (0 or ±1×10⁹). The graph won't blow up, but a formula producing junk also won't shout about it. Sanity- check new formulas during a real session.
  • Errors at save time vs runtime. Syntax errors and unknown channel names show inline in the editor when you save. Errors that only happen during evaluation (a referenced channel disappears later) cause the channel to read 0 silently.
  • Built-in presets can't be edited or deleted. Click duplicate on a preset row to get a copy you can change.
  • Heavy rolling windows cost memory. Each channel keeps a ring buffer; a window of 20 (default) is cheap. 5000 across a dozen channels is not. If the eval-time number in the status bar climbs, that's the first place to look.
  • Channel name validation is helpful. Save a formula with a typo and the editor suggests the closest match: Unknown channel: ‘thottle’. Did you mean ‘throttle’?
  • Persistence. User-made channels are stored in math_channels.json in the S1napse config directory. Copy that file between machines or version it.
09

Related

  • Telemetry Graphs — the tab that hosts the math channels panel.
  • Lap Analysis — math channels also show up here when you replay a completed lap.

Stop guessing.
Start measuring.

Free desktop app. Records every lap, plots every trace, finds the tenths you didn't know you were leaving on the table.

Download for Windows ↓v0.5.2 BETA · FREE · NO ACCOUNT · WIN 10+