(2024-02-20, 11:58 PM)seandepagnier Wrote: It is documented in the source code... sorry. The udp interface is mostly used for manual control where low lag is more important, so UDP is not output from pypilot but can be used as an input if that makes sense.
As for fast heading output, it would be possible to implement. As for tcp buffering, maybe just calling a flush routine would help?
Ok, so I skimmed through the source a bit, I guess it is the "server" that is listening these watch -requests.
a) is it enough that I send UDP packet to port 23322 containing the watch request like:
watch={"imu.heading_lowpass":10.0}\n - and then the reply packets should arrive to same socket I sent the request from?
b) what is the unit of watch request frequency/update period? I presume updates per second possibly, ie. Hz?
c) what is the maximum rate I can request the updates? 10Hz is what is required, but is there a higher limit - if so, could request higher rate and do some external filtering possibly?
d) is there a list somewhere of the available key values? If not, skimming the source is ok
e) I would need imu.heading or possibly imu.heading_lowpass and maybe imu.headingrate, and convert those into nmea 2000 and call it a day? Should be pretty straight forward. I already have an esp32 injecting other stuff into nmea 2000 bus using the ttlappalainen library.
f) If I also request imu.pitch and imu.roll, I could use maybe this as a say camera stabilizer input source as well? What is the difference between imu.roll and imu.heel?