Interpolate settings from user prop

From Sim Innovations Wiki
Jump to navigation Jump to search


value = interpolate_settings_from_user_prop(user_prop_table_value)

interpolate_settings_from_user_prop is used to create interpolate settings from a table user property.

Info Your table user property must have 2 columns, where both columns must be of INT or DOUBLE type

Return value

Argument Type Description
settings Table Interpolate settings


# Argument Type Description
1 user_prop_table_value Table Value from a table user property. Can be obtained by calling user_prop_get on your table user property. See example below.


-- Create a table with two columns
local val = user_prop_add_table("Needle calibration", "Fill table with calibration data",
                                  "Speed", "DOUBLE", 0, "Fill in the speed of the flight simulator",
                                  "Needle position", "DOUBLE", 0, "Set needle position in steps")

-- Create interpolate settings from user property
local settings = interpolate_settings_from_user_prop(user_prop_get(val))

-- Interpolate using settings made by the user
local var = interpolate_linear(settings, 25)

--Print result