Skip to main content

Math operations

Warning

For Engine versions older than v1.7.0, only a subset of the below operations are supported.

Multiple fields in the gridmo webapp support mathematical operations, which are resolved by the gridmo engine. These operations allow you to perform calculations directly within supported fields, enhancing flexibility in commands, tables, and analysis records.

Supported Operations

You can use the following mathematical operators and functions:

  • Basic arithmetic: +, -, /, *
  • Brackets: () for grouping expressions

Additional functions are available:

FunctionExample
Absolute valueabs({{i_p_poc}})
Square rootsqrt({{i_p_poc}})
Trigonometric functionssin({{i_angle}}), cos({{i_angle}}), tan({{i_angle}})
Inverse trigonometric functionsasin({{i_value}}), acos({{i_value}}), atan({{i_value}})
Logarithmic functionslog({{i_p_poc}}), log10({{i_p_poc}})
Degrees to radiansdeg2rad({{i_angle}})
Radians to degreesrad2deg({{i_angle}})
Exponentiation{{i_p_poc}}**2
Sign (-1 if negative, 1 if positive, 0 if 0)sign({{i_p_poc}})
Mathematical constantspi
tip

In gridmo's online documentation, Arguments marked with the number emoji (🔢) support the above math operations and functions.

Examples

In Commands

Draw a line at 5 seconds after an initiating condition

DRAW_LINE, X1=5+{{i_intiating_condition_time}}, Y1=-999, X2=5+{{i_intiating_condition_time}}, Y2=999

In Table Node Cells

Calculate the amplification factor ratio for a voltage oscillation test

({{i_vpoc_max}}-{{i_vpoc_min}})/({{i_vthev_max}}-{{i_vthev_min}})