12 Commits

Author SHA1 Message Date
ddbfb9746d
main: respect the elevation mask after applying offsets
This prevents offsets from being able to point below the elevation
mask. The way this is done should probably be reworked, but this whole
thing is such a messy hack anyway that, like, whatever, man.
2024-08-22 13:59:43 -07:00
db55a5081d
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.
2024-08-22 13:06:27 -07:00
b6caab906a
main: respect elevation mask
This is done silently, in the sense that the UI doesn't show that it is
clamping the requested pointing target in this way.
2024-08-22 11:49:01 -07:00
511f2ca903
add config
This is very basic, but it beats having everything be hardcoded.
2024-08-22 11:46:54 -07:00
1a541c71ea
main: full redraw on initial connection
This seems to help if rotint is started before rotctld (which just
crashes on mac).
2024-08-14 15:26:06 -07:00
7bdea9644c
main: change default polling intervals
The serial interface on the MD-01 seems to be extremely slow (this is
with USB serial, though the RS232 ports probably have the exact same
issue. It seems that sending requests too quickly may negatively
impact the performance of the controller/rotator (i.e. makes it shake
more)? I'm not exactly sure this is the correct conclusion, since our
timings do not compensate for the actual communication time with the
MD-01 (i.e. the 100ms poll rate sends the next request at least 100ms
after it has received a reply). However, based on empirical testing,
running these at a lower pace (perhaps particularly, the command
frequency?) seems to make a big difference in the amount of shake
observed. We will need to keep an eye on this over time.
2024-08-14 14:51:47 -07:00
adc2997f0d
main: add logging to a file
This is done synchronously, but assumed to be fast enough that it won't
cause problems for the event loop. I may try to use the libxev file
abstraction in the future but this is the real fast way of
implementing it. This codebase is a mess, and that's an endorsement.
2024-08-12 20:29:50 -07:00
e1c54fec91
main: add configurable poll/command rates
These are coupled in a somewhat nonintuitive manner. Previously, we
would send a command every other request. Due to an oversight, we were
only sending a request once per second, which meant we were reading
position once every two seconds and writing position once every two
seconds. However, this seemed to work pretty well (at least the radio
performance was largely improved and qualitatively it seemed like the
controller was doing a better job of keeping up with the pointing
target).

I wanted the UI to update the position more frequently, so we keep the
scheme of sending a command every N requests, but we send
significantly more get position requests. These can be adjusted on the
fly in order to get an idea of how much the communication pattern
actually impacts the pointing performance.
2024-08-11 20:31:01 -07:00
8c6d9431c8
main: some minor cleanup 2024-08-10 10:54:15 -07:00
02381539a7
main: draw something resembling a user interface
Very simplistic, but, and here's the key, it works.
2024-08-10 10:53:30 -07:00
351b5ccf59
main: functioning(?) man in the middle
This is very messy. I forgot how much callback-based async programming
sucks, especially without closures. Now I need to slap together the
UI.

This essentially has a "fixed" rate poll loop that alternates between
setting the position and getting the position. We return mangled
positions through the interface for display purposes, so this might be
usable.
2024-08-10 00:45:28 -07:00
7692cb4bc7
init
I will never get tired of vendoring dependencies. ha ha. It is possible
I am insane. I had to do a lot of pruning to get these not to be
ridiculous (especially the unicode data, which had nearly 1 million
lines of... stuff).
2024-08-09 19:26:32 -07:00