#!/bin/sh

caput FBCK:FB03:TR01:STATE 0

# 0.5 Hz & pockcel_perm
caput -a FBCK:FB03:TR01:POI1 21 0 0 0 0 0 8 0 0 0 256 0 0 54 0 0 0 0 0 0 0 0

#caput -a FBCK:FB03:TR01:POI1 21 0 0 0 0 0 8 0 0 0 0 0 0 54 0 0 0 0 0 0 0 0
#caput -a FBCK:FB03:TR01:POI1 6 12 23 41 23 32 53

# F matrix
caput -a FBCK:FB03:TR01:FMATRIX 45 	  1		0		0		0	0	  0.97811	1.9127		0		0	0	  0.12335	0.80696		0		0	0	  1.6522	-0.33597	0		0	0	  3.1276	-0.39243	0		0	0	  0		0		1		0	0	  0		0		1.0221		1.997	0	  0		0		1.8976		4.2539	0	  0		0		-0.17824	2.3499	0	  0		0		-0.29402	1.5882	0


# G matrix
caput -a FBCK:FB03:TR01:GMATRIX 10 2.5181 2.8809 0 0 -0.33363 1.1087 0 0 0 0 -0.34556 2.3591 0 0 -0.5343 0.89322 0 0 0 0 

# Loop configs
caput FBCK:FB03:TR01:NAME Inj
caput FBCK:FB03:TR01:INSTALLED 1
caput FBCK:FB03:TR01:TOTALPOI 1
caput FBCK:FB03:TR01:ITERATEFUNC TrajectoryFit

# Measurements
caput FBCK:FB03:TR01:M1DEVNAME FILE:/data/dat2/m2.dat
caput FBCK:FB03:TR01:M1USED 1
caput FBCK:FB03:TR01:M1CAMODE 1

caput FBCK:FB03:TR01:M2DEVNAME FILE:/data/dat2/m3.dat
caput FBCK:FB03:TR01:M2USED 1
caput FBCK:FB03:TR01:M2CAMODE 1

caput FBCK:FB03:TR01:M3DEVNAME FILE:/data/dat2/m4.dat
caput FBCK:FB03:TR01:M3USED 1
caput FBCK:FB03:TR01:M3CAMODE 1

caput FBCK:FB03:TR01:M4DEVNAME FILE:/data/dat2/m5.dat
caput FBCK:FB03:TR01:M4USED 1
caput FBCK:FB03:TR01:M4CAMODE 1

caput FBCK:FB03:TR01:M5DEVNAME FILE:/data/dat2/m6.dat
caput FBCK:FB03:TR01:M5USED 1
caput FBCK:FB03:TR01:M5CAMODE 1

caput FBCK:FB03:TR01:M6DEVNAME FILE:/data/dat2/m11.dat
caput FBCK:FB03:TR01:M6USED 1
caput FBCK:FB03:TR01:M6CAMODE 1

caput FBCK:FB03:TR01:M7DEVNAME FILE:/data/dat2/m12.dat
caput FBCK:FB03:TR01:M7USED 1
caput FBCK:FB03:TR01:M7CAMODE 1

caput FBCK:FB03:TR01:M8DEVNAME FILE:/data/dat2/m13.dat
caput FBCK:FB03:TR01:M8USED 1
caput FBCK:FB03:TR01:M8CAMODE 1

caput FBCK:FB03:TR01:M9DEVNAME FILE:/data/dat2/m14.dat
caput FBCK:FB03:TR01:M9USED 1
caput FBCK:FB03:TR01:M9CAMODE 1

caput FBCK:FB03:TR01:M10DEVNAME FILE:/data/dat2/m15.dat
caput FBCK:FB03:TR01:M10USED 1
caput FBCK:FB03:TR01:M10CAMODE 1

# Reference Orbits
caput -a FBCK:FB03:TR01:REFORBIT 10 -0.005313 -0.12648 -0.13236 0.051098 -0.082934 -0.10219 -0.0022403 -0.03867 0.10587 -0.16693

# States
caput FBCK:FB03:TR01:S1NAME FILE:/data/dat2/s1calc.dat
caput FBCK:FB03:TR01:S1USED 1

caput FBCK:FB03:TR01:S2NAME FILE:/data/dat2/s2calc.dat
caput FBCK:FB03:TR01:S2USED 1

caput FBCK:FB03:TR01:S3NAME FILE:/data/dat2/s3calc.dat
caput FBCK:FB03:TR01:S3USED 1

caput FBCK:FB03:TR01:S4NAME FILE:/data/dat2/s4calc.dat
caput FBCK:FB03:TR01:S4USED 1

# Actuators
caput FBCK:FB03:TR01:A1DEVNAME FILE:/data/dat2/a1calc.dat
caput FBCK:FB03:TR01:A1USED 1
caput FBCK:FB03:TR01:A1CAMODE 1

caput FBCK:FB03:TR01:A2DEVNAME FILE:/data/dat2/a2calc.dat
caput FBCK:FB03:TR01:A2USED 1
caput FBCK:FB03:TR01:A2CAMODE 1

caput FBCK:FB03:TR01:A3DEVNAME FILE:/data/dat2/a3calc.dat
caput FBCK:FB03:TR01:A3USED 1
caput FBCK:FB03:TR01:A3CAMODE 1

caput FBCK:FB03:TR01:A4DEVNAME FILE:/data/dat2/a4calc.dat
caput FBCK:FB03:TR01:A4USED 1
caput FBCK:FB03:TR01:A4CAMODE 1

# Energies
caput -a FBCK:FB03:TR01:ACTENERGY 4 0.073587 0.135 0.073587 0.135

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

caput FBCK:FB03:TR01:PGAIN 0.01
