-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathbh_plot.py
36 lines (30 loc) · 917 Bytes
/
bh_plot.py
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
31
32
33
34
35
36
#! /usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt
def conv2bh(conv):
return 2*np.tan(np.radians(conv/2.))
def bh2conv(bh):
return 2*np.degrees(np.tanh(bh/2.0))
bh_range = np.arange(0.5, 2.0, 0.25)
hb_range = 1.0/bh_range
conv_range = bh2conv(bh_range)
iconv_range = np.arange(10, 70, 10)
ibh_range = conv2bh(iconv_range)
b_error = np.array([0.01, 0.1, 1.0, 10.0, 100.0])
#h_error = b_error * hb_range
plt.figure()
plt.plot(bh_range, conv_range)
plt.xlabel("Base to height ratio")
plt.ylabel("Convergence angle (deg)")
plt.figure()
plt.plot(iconv_range, ibh_range)
plt.ylabel("Base to height ratio")
plt.xlabel("Convergence angle (deg)")
plt.figure()
plt.ylabel("Vertical error (m)")
plt.xlabel("Horizontal offset (m)")
for bh in bh_range:
plt.plot(b_error, b_error/bh, label='B/H:%0.2f (%0.1f deg)' % (bh, bh2conv(bh)))
plt.axes().set_aspect('equal')
plt.legend()
plt.show()