I want to use a long endurance copter as a antenna mast and tracker in the complicated terrain.
I want copter to loiter at e.g. 50m carrying a directional antenna and retranslating video stream down.
I need to control copter yaw as an antenna tracker to point nose towards the remote plane.
I have working this antenna tracker doing exactly what I need which is outputting a 1500ms servo signal when pointed correctly and this value increases-decreases proportionally when CW or CCW movement is needed - in fact exactly like a yaw stick on a radio. I need only to use this PPM to control copter yaw instead (or additionally) to the yaw coming from the RC.
I don’t have much programming skills so want to assembly whole machine ideally from prebuilt binaries.
Is there a way how to “hack” ardupilot, inject one PPM channel to the board and say “this is your yaw control”.
Optionally could ardupilot do whole thing, but I don’t believe it’s possible without advanced programming.
Does anyone have any idea?
Thanks!
Seems it’d be pretty trivial with Lua scripting. A hardware solution might actually prove more challenging.
Thanks for the idea. Did you mean to use LUA just to input PPM yaw control, or to provide whole functionality including angle calculations etc? Do you have any idea where to get inspiration?
Meaning of the word “trivial” differs a lot depending on the speaker. Connecting wires and signals together is quite easy for me, but writing just a few lines in any programming language isn’t :-(.
I’m not so sure a hardware solution is as simple as you’d like it to be. You could intercept the RC signal stream with a microcontroller and then output an altered stream to the autopilot, but that would require custom code all the same.
So yes, I mean script the whole thing. Start here:
Lua Scripts — Copter documentation (ardupilot.org)
Its not documented but we do have the ability to point a gimbal at another vehicle based on received position over MAVLink.
@iampete, I may be mistaken about how trivial a Lua solution might be as well - I’m not seeing any bindings that would make for simple yaw control as the OP desires. If he’s on an auto mission, I suppose we could periodically inject some CONDITION_YAW points.
Yeah, there is no nice way to do it currently, we would have to add some bindings.
Looks documented. If we have “gimbal” without YAW actuator, would this command yaw whole copter in right direction? Would be a terrible waste to have a true 360deg servo on copter when copter can turn itself…
Yes, when the gimbal has no yaw actuator the whole copter will yaw, just like you want it to.
And the gimbal will pitch in the direction of the target