ccc_MOVEDETECTION
Custom Channel Configuration Function: ccc_movedetecion
Description:
Calculates start and end sample, as well as the locations samples of peaks, divided into forward (FW), reverse (RV) and initial (first move) for Park Assist.
Plateau starts and ends are also calculated. The calculation is done using the velocity as input.
NOTE: INPUT CHANNELS MUST HAVE THE SAME NUMBER OF ELEMENTS (RESAMPLED)!
Syntax: [Peak, Plateau, Initial] = ccc_movedetection(Vel, step, Peak_Threshold)
Inputs:
Vel [1x1 struct] input data Velocity
step [1x1 double] step size from the measurement file in Hz
Peak_Threshold [1x1 double] input data Peak Threshold (see Peak Threshold set in settings)
Outputs:
Peak.FW. [1x1 struct]
start [1xX double] start of forward movement
end [1xX double] end of forward movement
loc [1xX double] location of forward movement peak (maximum location)
Example: Peak.FW.start(1) = start of first forward movement
Peak.FW.end(1) = end of first forward movement
Peak.FW.start(2) = start of second forward movement
Peak.FW.end(2) = end of second forward movement
Peak.RV. [1x1 struct]
start [1xX double] start of reverse movement
end [1xX double] end of reverse movement
loc [1xX double] location of a reverse movement peak (maximum location)
Example: Peak.RV.start(1) = start of first reverse movement
Peak.RV.end(1) = end of first reverse movement
Peak.RV.start(2) = start of second reverse movement
Peak.RV.end(2) = end of second reverse movement
Peak.Manoever_start [1x1 double] location of start maneuver
Peak.Manoever_end [1x1 double] location of end maneuver
Initial:
Initial.start [1x1 double] start initial move
Initial.end [1x1 double] end initial move
Initial.loc [1x1 double] loc of maximum peak in initial move
Plateau:
Plateau.PostInit [1xX double] start and end locations from all plateaus
Example: Plateau.PostInit(1) = start of the first plateau
Plateau.PostInit(2) = end of the first plateau
Plateau.PostInit(3) = start of the second plateau
Plateau.PostInit(4) = end of the second plateau