main: treat elevation offset as offset from horizon
Rather than having somewhat confusing flipped logic when the rotator is operating in the 180-90 degree elevation regime, this internally performs sign flipping. This means that a 3 degree elevation offset means "point an additional 3 degrees up from the horizon" regardless of whether the rotator is operating in the 0-90 or 180-90 elevation ranges.
This commit is contained in:
parent
b6caab906a
commit
86a5fa20a4
@ -182,7 +182,7 @@ pub const RotInt = struct {
|
||||
if (self.pollcount == 0) {
|
||||
var mangled: AzEl = .{
|
||||
.az = self.requested_posture.az + self.offsets.az,
|
||||
.el = self.requested_posture.el + self.offsets.el,
|
||||
.el = self.requested_posture.el + if (self.requested_posture.el > 90) -self.offsets.el else self.offsets.el,
|
||||
};
|
||||
mangled.el = if (mangled.el > 90)
|
||||
@min(mangled.el, 180 - self.conf.elevation_mask)
|
||||
|
Loading…
x
Reference in New Issue
Block a user