Constants |
' MyBASIC2_MaxMAL.bas - Includes for MaxMAL
' Array Functions CONST ML_ALL = -1 ' Use all Dimensions/Points/Frames
' Data Types CONST ML_VOID = -1 ' Unknown Data Type CONST ML_AUTO = -1 ' Autodetect Type (same as void) CONST ML_SCALAR = 0 ' Scalar Number CONST ML_1D = 1 ' 1D Vector (It's a time series of Scalars) CONST ML_2D = 2 ' 2D Vector CONST ML_3D = 3 ' 3D Vector CONST ML_TM = 9 ' 3x3 Transformation Matrix
' 2D/3D Points CONST ML_X = 0 ' X Dimension CONST ML_Y = 1 ' Y Dimension CONST ML_Z = 2 ' Z Dimension
' 3D Planes CONST ML_3D_SPACE = 0x00 ' This is same as 3D space/No Plane CONST ML_XY_PLANE = 0x01 ' XY Plane = Top View CONST ML_YZ_PLANE = 0x02 ' YZ Plane = Side View CONST ML_XZ_PLANE = 0x03 ' XZ Plane = Front View CONST ML_2D_PLANE = 0x08 ' Project into 2 Plane
' 2D/3D Axis CONST ML_AXIS_X = 0 ' X Axis CONST ML_AXIS_Y = 1 ' Y Axis CONST ML_AXIS_Z = 2 ' Z Axis
' Waveform Types CONST ML_SINE = 1 ' Create Sine Waveform CONST ML_SQUARE = 2 ' Create Square Waveform CONST ML_TRIANGLE = 3 ' Create Triangular Waveform CONST ML_SAWTOOTH = 4 ' Create Sawtooth Waveform CONST ML_RAMP = 5 ' Create a Ramp
' Transform Point CONST ML_MOVETO = 92 ' Transform point(s) to local coordinate system CONST ML_MOVEINTO = 94 ' Transform point(s) into local coordinate system
' Interpolation Types CONST ML_LINEAR = 41 ' Linear Interpolation CONST ML_SPLINE = 42 ' Spline Interpolation
' Filter Types CONST ML_AVERAGE = 51 ' Smoothing - Moving Average Filter CONST ML_MEDIAN = 52 ' Smoothing - Moving Median Filter CONST ML_SMOOTHING = 53 ' Smoothing - Smoothing CONST ML_LOWPASS = 54 ' Digital - Lowpass Filter CONST ML_HIGHPASS = 55 ' Digital - Higpass Filter CONST ML_BANDPASS = 56 ' Digital - Bandpass Filter CONST ML_NOTCH = 57 ' Digital - Notch Filter
' Angle and Rotation Units CONST ML_RADIANS = 0 ' Use Radians as Angle Units CONST ML_DEGREES = 1 ' Use Degrees as Angle Units CONST ML_GRADIAN = 2 ' Use Gradian as Angle Units
' Angle Degree Range CONST ML_RANGE_180 = 0 ' +/- 180 Degrees CONST ML_RANGE_360 = 1 ' 0-360 Degrees
' 2D Angle Types CONST ML_ANGLE_NORMAL = 0 ' Vector vs Vector Angle CONST ML_ANGLE_VSAXIS = 1 ' Vector vs 2D Axis
' Angle Options Multipliers CONST MA_ANGOPT_3DPLANES = 1 ' 3D Planes CONST MA_ANGOPT_ANGLERANGE = 256 ' Angle Range CONST MA_ANGOPT_UNITS = 1024 ' Angle Units CONST MA_ANGOPT_2DANGLES = 16384 ' 2D Angle Type CONST MA_ANGOPT_AXIS = 65535 ' Axis when Angle vs Axis
Constants Included in file MyBASIC2_MaxMALProcs.BIS
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' MyBASIC2_MaxMALProcs.bas - Includes for MaxMAL Processors Constants ' ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Processor Identifiers ' CONST ML_WAVEFORM = 0x00000001 ' Creates a waveform. The waveform can be one of Sine, Square, Triangle, Sawtooth or Ramp CONST ML_MIN = 0x00000002 ' Return minimum value CONST ML_MAX = 0x00000003 ' Return maximum value CONST ML_VMATH = 0x00000004 ' Perform Primitive Vector Math functions CONST ML_VLEN = 0x00000005 ' Calculate length of a 2D or 3D vector CONST ML_VSET = 0x00000006 ' Calculate length of a 2D or 3D vector CONST ML_MEAN = 0x00000007 ' Return Mean Value of 1D vector CONST ML_MEDIAN = 0x00000008 ' Return Median Value of 1D vector CONST ML_DERIVATIVES = 0x00000009 ' Calculates Derivatives (1st and 2nd) CONST ML_NORMALIZE = 0x0000000A ' Normalize a data set CONST ML_INTERPOLATE = 0x0000000B ' Spline and Linear Interpolation CONST ML_FILTERS = 0x0000000C ' Filters (Average, Median, Smoothing, FIR) CONST ML_ANGLES = 0x0000000D ' Calculate 2D or 3D Angles between vectors or vectors and planes CONST ML_VNORM = 0x0000000E ' Create a Unit (Normalized) Vector CONST ML_SCALARPRODUCT = 0x0000000F ' Calculate Scalar Product or Dot of 3D vector CONST ML_DOTPRODUCT = 0x0000000F ' Calculate Dot or Scalar Product of 3D vector CONST ML_CROSSPRODUCT = 0x00000010 ' Calculate Cross Product of 3D vector CONST ML_TRANSFORM = 0x00000011 ' Transform 3D Vector using a 3x3 Transformation Matrix CONST ML_TMNORMALIZE = 0x00000012 ' Normalize a 3x3 Transformation Matrix CONST ML_TMINVERSE = 0x00000013 ' Inverse of a 3x3 Transformation Matrix CONST ML_TMTRANSPOSE = 0x00000014 ' Transpose a 3x3 Transformation Matrix CONST ML_TMCREATE = 0x00000015 ' Create Rotation Matrix from 3 3D Points CONST ML_ORIENTATION = 0x00000016 ' Calculate Orientation from rotation matrix CONST ML_TMDETERMINANT = 0x00000017 ' Calculate the Determinant of a 3x3 Transformation Matrix CONST ML_PROJPOINT = 0x00000018 ' Create Projected Point CONST ML_LOCALCOORDSYS = 0x00000019 ' Transform to/into Local Coordinate System CONST ML_LINES = 0x0000001A ' Line Geometry Functions CONST ML_DISTANCE = 0x0000001B ' Calculate Distance between 2 consecutive points CONST ML_SUM = 0x0000001C ' Calculate the sum of an array CONST ML_CONVERTUNITS = 0x0000001D ' Convert Units
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Waveform Action Modifiers ' CONST WF_SINE = 1 ' Create Sine Waveform CONST WF_SQUARE = 2 ' Create Square Waveform CONST WF_TRIANGLE = 3 ' Create Triangular Waveform CONST WF_SAWTOOTH = 4 ' Create Sawtooth Waveform CONST WF_RAMP = 5 ' Create a Ramp
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Vector Math Action Modifiers ' CONST VM_ADD = 21 ' Add 2 Vectors CONST VM_SUB = 22 ' Subtract 2 Vectors CONST VM_MUL = 23 ' Multiply a Vector with a Scalar or Vector of same Dimensions CONST VM_DIV = 24 ' Divide a Vector with a Scalar or Vector of same Dimensions
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Derivatives Modifiers ' CONST DV_VEL = 1 ' 1st Derivative aka Velocity CONST DV_1ST = 1 ' 1st Derivative aka Velocity CONST DV_ACC = 2 ' 2nd Derivative aka Acceleration CONST DV_2ND = 2 ' 2dn Derivative aka Acceleration
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Normalize Modifiers ' CONST NL_START = 31 ' Normalize data set using first N samples
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Interpolation Modifiers ' CONST IP_LINEAR = 41 ' Linear Interpolation CONST IP_SPLINE = 42 ' Spline Interpolation
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Filters Action Modifiers ' CONST FI_AVERAGE = 51 ' Moving Average Filter CONST FI_MEDIAN = 52 ' Moving Median Filter CONST FI_SMOOTHING = 53 ' Smoothing CONST FI_LOWPASS = 54 ' Lowpass Filter CONST FI_HIGHPASS = 55 ' Higpass Filter CONST FI_BANDPASS = 56 ' Bandpass Filter CONST FI_NOTCH = 57 ' Notch Filter
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Angles Action Modifiers. These can be Ored ' CONST AN_2D = 61 ' 2D Angle between 2 vectors CONST AN_3D = 62 ' 3D Angle between 2 vectors CONST AN_PROJECTED_3D = 63 ' 3D data projected into a plane ' Note; This is the same as AN_2D|AN_3D
CONST AN_PLANE = 64 ' Angle between vector and a 2D or 3D plane ' Add to AN_2D or AN_3D to create either of ' the following AM
CONST AN_PLANE_2D = 125 ' 2D vector vs X or Y axis/plane CONST AN_PLANE_3D = 126 ' 3D vector vs a plane. Vector is project onto a plane to create 2nd vector CONST AN_PLANE_2D3D = 127 ' 3D Projected to 2D vector vs X or Y axis/plane
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Lines Action Modifiers ' CONST LN_INTERSECT = 71 ' Check if segments ab and cd intersect CONST LN_BETWEEN = 72 ' Check if (a, b, c) are collinear and point c lies on the closed segement ab CONST LN_COLLINEAR = 73 ' Check if points a, b and c are collinear CONST LN_LEFT = 74 ' Check if c is strictly to the left of the directed line through a to b CONST LN_DISTANCE = 75 ' Calculate shortest distance between line AB and point
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Lines Property Identifiers ' CONST LN_EPSILON = 78 ' The minimum distance for Collinearity CONST LN_COLLINEAR_TYPE = 79 ' Type of Collinearity Calculation
CONST CL_MOCAP = 1 ' Collinearity test best suited for MoCap applications CONST CL_FAST = 2 ' Fastest way of testing CONST CL_TRI = 3 ' Calculates triangular area for test
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Projected Points Action Modifiers ' CONST PP_LINEAR = 82 ' Linear transformation using 2 points CONST PP_PERCENT = 1 ' Distance specified as percentage of the length between the 2 points. ' Only valid with PP_LINEAR CONST PP_LINEAR_PERCENT = 83 ' PP_LINEAR combined with PP_PERCENT CONST PP_PROJECTED = 84 ' Project using local coordinate system defined by 3 points ' and Axis definitions (3D) or 2 points defining positive ' X Axis. Projection is then calculated using supplied offset ' as 2D or 3D coordinates CONST PP_USE_ROTATION = 1 ' Flag to add to PP_PROJECTED to indicate that we're supplying ' Distance + rotation angle (2D) as Offsets to Projected 2D Point CONST PP_PROJECTED_ROT = 85 ' PP_PROJECTED combined with PP_USE_ROTATION
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Coordinate Transformations Action Modifiers ' CONST LS_TO = 92 ' Transforms point(s) to local coordinate system defined by 3 points CONST LS_TO_TM = 93 ' Transforms point(s) to local coordinate system defined by TM ' This is the same as LS_TO|LS_USE_TM CONST LS_INTO = 94 ' Transforms point(s) into local coordinate system defined by 3 points ' This is the same as LS_INTO|LS_USE_TM CONST LS_INTO_TM = 95 ' Transforms point(s) into local coordinate system defined by TM
CONST LS_USE_TM = 1 ' Flag to add/or to LS_TO or LS_INTO to specify to use ' supplied TM instead of points
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Transformation Matrix Creation Action Modifiers ' CONST TM_POINTS = 101 ' Use 3 3D points to create 3x3 Transformation Matrix ' Note; Same as OT_POINTS for ML_ORIENTATION
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Orientation Action Modifiers ' CONST OT_POINTS = 101 ' Use 3 points as input CONST OT_MATRIX = 102 ' Use transformation matrix
''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Convert Units Action Modifiers ' CONST CU_SOURCE = 111 ' Source Units CONST CU_DESTINATION = 112 ' Destination Units
|