Created
December 27, 2019 14:17
-
-
Save ahupowerdns/f2e0d931e2fc6939f881c05e76225894 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fig, ax = plt.subplots() | |
xdata, ydata = [], [] | |
hi, = plt.plot([], [], 'ro') | |
ax.grid() | |
Writer = animation.writers['ffmpeg'] | |
writer = Writer(fps=7, metadata=dict(artist='bert hubert'), bitrate=2500) | |
def init(): | |
print("Init called") | |
# ax.grid() | |
ax.set_xlim(-20,20) | |
ax.set_ylim(-20,20) | |
ax.set_xlabel("Doppler residual (Hz)") | |
ax.set_ylabel("Pseudoresidual (m)") | |
return hi, | |
counter = 0 | |
def update(frame): | |
global counter | |
counter = counter +1 | |
ax.set_title("Galileo E11 residuals, 10 minute intervals, offset = -"+str(int(frame))+"s") | |
raw=client.query("select * from \"correlator\" where (time > now() - "+str(int(frame))+"s) and (time < now() - "+str(int(frame-600))+"s) and (elevation > 45) and prres!=0.000 and sv='11' and gnssid='2'") | |
#print(raw) | |
if(len(raw)==0): | |
hi.set_data([],[]) | |
return hi, | |
corr=raw["correlator"] | |
xdata=corr.delta_hz_cor; | |
ydata=corr.prres; | |
hi.set_data(xdata, ydata) | |
#hi.set_title("From "+str(int(frame))) | |
return hi, | |
print(np.linspace(300,2700,72)) | |
init() | |
counter = 0 | |
ani = FuncAnimation(fig, update, frames=np.linspace(70000, 0, 150), | |
init_func=init, blit=True) | |
print("done ", counter) | |
#ani.save('galileo-e03-long.mp4', writer=writer) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment