Hello, I've got a problem with APM and Raptor 50 heli
I trying to set up APM on Raptor 50 with Glow engine. I connect my JR RC control to APM next variant:
rx in out
1 trotle(pitch) ----> 3 3
2 ailer ----> 1 1
3 elevator ----> 2 2
4 rudder ----> 4 4
my transmitter sets up in "airoplane mode"
servo1 90 (aileron??)
servo2 0 (elevator??)
servo3 180 (pitch??)
ailerons works normal, but elevator and pitch mix some strange.
please help me....
p.s. Sorry for bad English
Yeah, I've been looking at the code for a while and have a general understanding of it.
I'd be prepared to put out an attempt at a fix today, but I have to answer that question about scaling. I know how the numbers come into the function. Pitch_out and Roll-out are -4500 to 4500. Coll_out is 0-1000. Coll_out_scaled is say, 200-800, depending on where you set your limits of swash travel. But I just need to be sure what the numbers have to look like before they go out to the servos. Is it 0-1000, -4500 to 4500, or 1000-2000?
Much of this is done in RC_Channel library, but that file is really hard to understand and not commented well so it's difficult to figure out.
What you want to send out depends upon the range set-up for the individual servo. Check out the init_rc_in in radio.pde. So for the roll and pitch servos you'll want to send out values between -4500 ~ 4500. For channel 3 (collective pitch) you'll want to send out values between 0~1000 i think. As you've said, you need to remove all the mixing on it's way out to the servos.
Yes, the RC_Channel library is pretty hard to understand. I think I spent a day looking at it the first time and writing down what it did to try and figure out what it was doing. I'd like to rewrite that thing some day.
"Yes, the RC_Channel library is pretty hard to understand" ... agree
Day 2 on it for me, was thinking of cleaning it up myself :)
This is open source so if you do clean it up that would be greatly appreciated.
I believe the libraries purpose in life is to transform between various possible ways to specify a servo position (i.e. pwm which is 0~1000, an RC style number which is 1000~2000 or a user defined range like -45deg ~ +45deg). what i found confusing is that at least in the arducopter code, sometimes we put a number into "control_in" (which seems logical) but more often we put a number into servo_out which seems strange to me. It seems like any "out" should be an output of the conversion function.
Although it's slightly laborious normally we ask people to put dev changes into a clone and then someone on the dev team (like me or tridge) can more easily look at the change/patch and merge it into trunk.
We have some notes on how to contribute on this wiki page although it's a bit out of date as it talks about subversion but we moved to GIT months ago.
Anyway, no pressure, it's open source so you can do what you like!
Actually, without fully rewriting it, just having it commented properly would be a huge help. Explaining what each function does.
PWM = 0-1000
RC = 1000-2000
Angle = -4500 - +4500
I wasn't sure about the PWM one, so that's a big help.
Control_in and Servo_out, would love to know exactly how those work.
No problem Randy, I'll pass along code after I've done all the changes. I'm in the process of adding a new frame type, dual motor frame with pitch / yaw via servo, roll / climb via motors, AKA Ospery in heli mode.
BTW if anyone is interested, I have lastest version of Arducopter compiling fine in Visual Studio via Visual Micro.... sure makes discovering the code easy :)
Dan, that Osprey sounds really neat. I've had a pipe dream to buy two Hobby King 450s and turn them into a tandem rotor. It would work quite similarly. Maybe one day. That's one nice thing about this system is that it allows us to do things like that.
I tried using VS for a while, but I found it way too powerful which made it too complicated for me, and I was having licensing issues. I was supposed to have gotten it free with the Website Spark thing, but it ended up the license expired after 2 months, so I gave up on it. Using Notepad++ and like it a lot. I have to compile in Arduino still but, oh well.
Robert, I'm using 2, 480 size motors, on 12" props, connected to a 450 size heli frame via carbon fiber tubes. It flys very nice, without any gyro or APM, just using my radio mix.
Even carrys 2, 2200 3s lipo's with no problem :)
I will video when I find our camera (damn wife), but there is simular heli on u-tube
Here you go, but mine has longer arms and bigger motors, otherwise same :)
Wow, that flies really well!
Thanks for your answers, i'm very busy in university but i 1 or 2 weeks and i will solve the problem in heli.pde