16 lines
900 B
Python
16 lines
900 B
Python
"""series.py START END col SENSORS [step_min]: per instant, col of each sensor ('r' rejected), plus pan/tilt"""
|
|
import sys, os; sys.path.insert(0, os.path.dirname(__file__)); import common
|
|
from datetime import timedelta
|
|
d = common.get(); P = d["pose"]; M = d["meas"]
|
|
t, t1, col = common.T(sys.argv[1]), common.T(sys.argv[2]), sys.argv[3]
|
|
sens = sys.argv[4].split(","); step = int(sys.argv[5]) if len(sys.argv) > 5 else 15
|
|
print("time pan tilt " + " ".join("%7s" % s for s in sens))
|
|
while t <= t1:
|
|
m = M.get(t, {}); p = P.get(t)
|
|
def f(s):
|
|
if s not in m: return " . "
|
|
if m[s]["rej"] and col.startswith("corr"): return " r "
|
|
v = m[s][col]; return "%7.3f" % v if v is not None else " - "
|
|
print(common.fmt(t), ("%6.1f %6.1f" % (p["pan"]*1e3, p["tilt"]*1e3)) if p else " - - ", " ".join(f(s) for s in sens))
|
|
t += timedelta(minutes=step)
|