class

Kozai::Rotator::Tracker

Inherits Reference < Object

Follows a satellite with a rotator, in real time.

Two things stop this from being a loop that forwards every computed position straight to the motors:

  • Rate limiting. A rotator takes seconds to move a few degrees and answers each command over a serial link. Commanding it ten times a second achieves nothing but a backlog, and on some controllers a command received mid-move restarts the move.
  • A deadband. Antenna beamwidths are measured in degrees. Chasing tenths of a degree wears the motors out for pointing accuracy that no antenna can use.

Constants

FLIP_HYSTERESIS_DEGREES = 30.0

How much azimuth travel switching to the flipped pointing must save before it is worth the switch.

Constructors

new(client : Client, limits : Limits = Limits.new, deadband : Float64 = 1.0, minimum_interval : Time::Span = 1.second, flip_enabled : Bool = false)
Source

Instance methods

deadband

Smallest movement worth commanding, in degrees.

Source
decide(angles : Frames::LookAngles) : Target | Nil

Decides where to point for angles, without talking to the rotator.

Returns nil if the satellite is below the rotator's elevation range, which is the signal to leave the antenna where it is.

Separated from #follow so that the decision — the part with all the awkward cases in it — can be tested without a socket.

Source
due?(target : Target, now : Time = Time.utc) : Bool

Whether target is worth sending now.

Source
flip_enabled?

Whether to use flip tracking for high passes when the rotator allows it.

Source
follow(angles : Frames::LookAngles, now : Time = Time.utc) : Target | Nil

Points the rotator at angles, subject to the rate limit and deadband.

Returns the target commanded, or nil if nothing was sent.

A connection failure is logged and swallowed rather than raised: losing the rotator should not stop the daemon predicting passes or serving the API, and the next call will try to reconnect.

Source
last_command_at

When the last command was sent.

Source
last_target

The last target commanded, or nil if none yet.

Source
limits

What the rotator can do.

Source
minimum_interval

Shortest interval between commands.

Source
park

Parks the rotator and forgets where it was pointed.

Source
stop

Stops the rotator and forgets where it was pointed.

Source