Interpolation

Interpolation

Interpolation helps you estimate a value that sits between two known table values. In SurveyTools, interpolation is primarily intended for table-based workflows (e.g. ullage/trim tables).

Typical workflow

  1. Identify the two surrounding table points (or two surrounding rows/columns).
  2. Enter the known values and the measured value you want to interpolate for.
  3. Calculate and copy the interpolated result into your worksheet/report.

Available methods

Linear interpolation

Use this when you have two known points: (x1, y1) and (x2, y2), and you need y at x.

One-way interpolation (table interval)

Use this when your table has a known fixed interval (for example ullage in mm). You provide the measured value (ullage), the interval, and the two neighbouring table values (y1, y2).

Two-way interpolation (ullage + trim)

Use this when the table depends on two variables (commonly ullage and trim). The app first interpolates along ullage for each trim column, then interpolates between those two intermediate results along the trim axis.

Formulas (optional)

Shown for transparency. Not a substitute for official standards or certified tables.

Linear

y = y1 + (x - x1) * (y2 - y1) / (x2 - x1)

Special case:
- if x1 == x2 and x == x1, then y = y1
- otherwise invalid (no slope)

One-way

x1 = floor(ullage / interval) * interval
x2 = x1 + interval
result = linear(x1, y1, x2, y2, ullage)

Two-way

x1 = floor(ullage / ullageInterval) * ullageInterval
x2 = x1 + ullageInterval

t1 = floor(actualTrim / trimInterval) * trimInterval
t2 = t1 + trimInterval

resultA = linear(x1, y1a, x2, y2a, ullage)   // at trim t1
resultB = linear(x1, y1b, x2, y2b, ullage)   // at trim t2

final = linear(t1, resultA, t2, resultB, actualTrim)

Notes & limitations