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).
Use this when you have two known points: (x1, y1) and (x2, y2),
and you need y at x.
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).
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.
Shown for transparency. Not a substitute for official standards or certified tables.
y = y1 + (x - x1) * (y2 - y1) / (x2 - x1)
Special case:
- if x1 == x2 and x == x1, then y = y1
- otherwise invalid (no slope)
x1 = floor(ullage / interval) * interval
x2 = x1 + interval
result = linear(x1, y1, x2, y2, ullage)
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)
x1 == x2), a unique interpolation is not possible.