31 lines
845 B
Python
31 lines
845 B
Python
import numpy as np
|
|
import matplotlib.pyplot as plt
|
|
from pprint import PrettyPrinter
|
|
pp = PrettyPrinter(indent=4)
|
|
|
|
def plot_pass(pass_data):
|
|
pp.pprint(pass_data)
|
|
return
|
|
|
|
def x():
|
|
plt.figure()
|
|
ax = plt.subplot(111, projection='polar')
|
|
ax.set_theta_direction(-1)
|
|
ax.set_theta_zero_location('N')
|
|
plt.plot(np.radians(pass_data['azims']), pass_data['elevs'], '-')
|
|
|
|
for i, event in enumerate(pass_data['event']):
|
|
if event:
|
|
if event.info == 'LOS':
|
|
style = 'ro'
|
|
elif event.info == 'AOS':
|
|
style = 'go'
|
|
else:
|
|
style = 'bo'
|
|
plt.plot(np.radians(pass_data['azims'][i]), pass_data['elevs'][i], style)
|
|
|
|
ax.set_yticks(range(0, 90, 20))
|
|
ax.set_yticklabels(map(str, range(90, 0, -20)))
|
|
ax.set_rmax(90)
|
|
plt.show()
|