#!/bin/sh

caput FBCK:FB10:TR01:STATE 0
caput -a FBCK:FB10:TR01:POI1 6 12 23 41 23 32 53

# F matrix
caput -a FBCK:FB10:TR01:FMATRIX 17 1 0 0 1 0 0 0 1 0 0 1 0 0 0 -0.61 2.19 0 0 0 0 1 0 0 0 1.89 2.26 0

# G matrix
caput -a FBCK:FB10:TR01:GMATRIX 10 0.98965 0 0 0.4047 0 0 0 0 0 0 0

# Loop configs
caput FBCK:FB10:TR01:NAME GunLaunchTest
caput FBCK:FB10:TR01:INSTALLED 1
caput FBCK:FB10:TR01:TOTALPOI 1
caput FBCK:FB10:TR01:ITERATEFUNC TrajectoryFit

# Measurements
caput FBCK:FB10:TR01:M1DEVNAME BPMS:IN20:371:X
caput FBCK:FB10:TR01:M1USED 1
caput FBCK:FB10:TR01:M1CAMODE 1

caput FBCK:FB10:TR01:M2DEVNAME BPMS:IN20:371:Y
caput FBCK:FB10:TR01:M2USED 1
caput FBCK:FB10:TR01:M2CAMODE 1

# States
caput FBCK:FB10:TR01:S1NAME "X Position"
caput FBCK:FB10:TR01:S1USED 1

caput FBCK:FB10:TR01:S2NAME "Y Position"
caput FBCK:FB10:TR01:S2USED 1

# Actuators
caput FBCK:FB10:TR01:A1DEVNAME FILE:/tmp/XCOR.221.BCTRL
caput FBCK:FB10:TR01:A1USED 1
caput FBCK:FB10:TR01:A1CAMODE 1

caput FBCK:FB10:TR01:A2DEVNAME FILE:/tmp/YCOR.222.BCTRL
caput FBCK:FB10:TR01:A2USED 1
caput FBCK:FB10:TR01:A2CAMODE 1

#enable loop
caput FBCK:FB10:TR01:INSTALLED 1
caput FBCK:FB10:TR01:STATE ON
