-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlayout.py
More file actions
30 lines (23 loc) · 2.51 KB
/
layout.py
File metadata and controls
30 lines (23 loc) · 2.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
##########################################################################################
import numpy as np
##########################################################################################
'''
The layout represents the blocks in the field. The [X,Y] represent relative positions on the Cartesian map;
Blocks are layed out from left to right, top to bottom (but it can be changed);
Use integer for odd; Use decimal for even;
GCP layout has to be adjusted manually according to the blocking layout
'''
class layoutbase:
#experiment
b2x1 = np.matrix([[-.5,0],[.5,0]])
b3x3 = np.matrix([[-1,1],[0,1],[1,1],[-1,0],[0,0],[1,0],[-1,-1],[0,-1],[1,-1]])
b2x2 = np.matrix([[-.5,.5],[.5,.5],[-.5,-.5],[.5,-.5]])
b4x8 = np.matrix([[-1.5,3.5],[-0.5,3.5],[0.5,3.5],[1.5,3.5],[-1.5,2.5],[-0.5,2.5],[0.5,2.5],[1.5,2.5],[-1.5,1.5],[-0.5,0.5],[0.5,1.5],[1.5,1.5],[-1.5,0.5],[-0.5,0.5],[0.5,0.5],[1.5,0.5],[-1.5,-0.5],[-0.5,-0.5],[0.5,-0.5],[1.5,-0.5],[-1.5,-1.5],[-0.5,-1.5],[0.5,-1.5],[1.5,-1.5],[-1.5,-2.5],[-0.5,-2.5],[0.5,-2.5],[1.5,-2.5],[-1.5,-3.5],[-0.5,-3.5],[0.5,-3.5],[1.5,-3.5]])
b4x5 = np.matrix([[-1.5,2.0],[-0.5,2.0],[0.5,2.0],[1.5,2.0],[-1.5,1.0],[-0.5,1.0],[0.5,1.0],[1.5,1.0],[-1.5,0],[-0.5,0],[0.5,0],[1.5,0],[-1.5,-1.0],[-0.5,-1.0],[0.5,-1.0],[1.5,-1.0],[-1.5,-2.0],[-0.5,-2.0],[0.5,-2.0],[1.5,-2.0]])
b8x8 = np.matrix([[-3.5,3.5],[-2.5,3.5],[-1.5,3.5],[-0.5,3.5],[0.5,3.5],[1.5,3.5],[2.5,3.5],[3.5,3.5],[-3.5,2.5],[-2.5,2.5],[-1.5,2.5],[-0.5,2.5],[0.5,2.5],[1.5,2.5],[2.5,2.5],[3.5,2.5],[-3.5,1.5],[-2.5,1.5],[-1.5,1.5],[-0.5,0.5],[0.5,1.5],[1.5,1.5],[2.5,1.5],[3.5,1.5],[-3.5,0.5],[-2.5,0.5],[-1.5,0.5],[-0.5,0.5],[0.5,0.5],[1.5,0.5],[2.5,0.5],[3.5,0.5],[-3.5,-0.5],[-2.5,-0.5],[-1.5,-0.5],[-0.5,-0.5],[0.5,-0.5],[1.5,-0.5],[2.5,-0.5],[3.5,-0.5],[-3.5,-1.5],[-2.5,-1.5],[-1.5,-1.5],[-0.5,-1.5],[0.5,-1.5],[1.5,-1.5],[2.5,-1.5],[3.5,-1.5],[-3.5,-2.5],[-2.5,-2.5],[-1.5,-2.5],[-0.5,-2.5],[0.5,-2.5],[1.5,-2.5],[2.5,-2.5],[3.5,-2.5],[-3.5,-3.5],[-2.5,-3.5],[-1.5,-3.5],[-0.5,-3.5],[0.5,-3.5],[1.5,-3.5],[2.5,-3.5],[3.5,-3.5]])
b2x7 = np.matrix([[-0.5,3.0],[0.5,3.0],[-0.5,2.0],[0.5,2.0],[-0.5,1.0],[0.5,1.0],[-0.5,0.0],[0.5,0.0],[-0.5,-1.0],[0.5,-1.0],[-0.5,-2.0],[0.5,-2.0],[-0.5,-3.0],[0.5,-3.0]])
#gcp
#g2x3b4x5 = np.matrix([[-1.8,2.3],[1.8,2.3],[0,-2.3],[0,2.3],[-1.8,-2.3],[1.8,-2.3]]) #4x5
g2x3b2x7 = np.matrix([[-1,3],[1,3],[-1,0],[1,0],[-1,-3],[1,-3]]) #2x7
g2x2b2x2 = np.matrix([[-1,1],[1,1],[-1,-1],[1,-1]]) #2x2
layout = layoutbase