Bridge with gpredict (with rotctld protocol) and customized surveillance camera rotator
- Talk to devices with different response speeds
- Handle device error gracefully
Sink
: Where the rotation control commands goes intoCamPTZ
: implemented control functionalities of 星烁照明智能 3025 云台
Source
: Where the rotation control commands comes fromrotctld
: act as a fakerotctld
daemon, used by gpredict
The Source
will forward each of the request it received to Sink
, as it's written in cliMain.cpp
, and forward the response to the request made by Sink
.
Without smartSink
, CamPTZ
will forward rotation commands or direction queries to the actual rotator each time it gets requested.
But for 星烁照明智能 3025 云台, each rotation command will shut off the motor and then restart, thus preventing a smooth rotation experience.
With smartSink
, CamPTZ
will spawn a separate thread to do actual orientation estimation.
States:
TRACKING
: args (dst_azi, dst_ele)- Will goto idle if delta in angle exceeds threshold
- Will refresh if inactivity for >5sec (TODO: inactivity?)
IDLE
: args (cur_azi, cur_ele)- Will goto
TRACKING
if delta in angle exceeds threshold (TODO: which threshold?)
- Will goto