New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NAV - Fixed wing support #26
Comments
Hi, I have seen your last video in youtube with the copter. It is amazing and it seems everything works fine. Good job. I would like to test RTH with one of my planes (CC3D). I think (not sure) that your code with RTH will work well, except for altitude hold. I will test this with 1.9.0 main this evening and I would like to try ASAP with your branch. Could you add the altitude from the GPS as a source for barometer reading function (and probably a simple filtering)? And a variable in the CLI just for setup this and try? I would test this inmediately, as I am already flying airplanes with Cleanflight. Thx. |
The problem is that fixed wing support in my navigation code is completely absent! If you wish to try it on planes, you'll have to add fixed wing support or wait until somebody else does it. I have fixed wing support planned, but I don't have any timeframe for adding it yet. |
@sppnk I am soon going to begin coding fixed-wing support and currently have a 1.2m flying wing lying around. Can you assist with setting up Cleanflight for a flying wing (delta mixer)? May be some suggestions of PIDs? |
Sure!! I want assist, but I dont have right now any flying wing. Just three airplanes (ailerons, rudder, elevator & throttle). They are an EasyStar (1400 wingspan) and two miniskywalkers (850 wingspan). For now, two of them are flying with CF, and the settings are the standard with 1.9.0 version. I haven't touch still this, and they fly well with those settings. For your info (altought I think you already know it), the main problems with flying wings are the correction in ailerons applied by automated navigation input. This settings should be later in the CLI, so it seems they have to be very diferent between airplanes. In baseflight RTH airplane implementation, the altitude and heading are taken from GPS readings, and GPS altitude seems be better than real barometer measures in airplanes setups (see baseflight RTH airplane by PatrikE). Thanks to this, simplest boards w/o baro & mag are beeing used for automated navigation & RTH, PH, waypoints, etc. That is the main success for that firmwares, because there are some boards really cheap, like CC3D, that can transform any airplane in much more. Other thing is the airspeed vs. ground speed, using pitot tube sensor, but I can't help here, so I have never used one. |
Ok, just to let you know - the work has started on fixed-wing support. First thing to go is ALTHOLD mode. The logic will use BARO if present, otherwise it'll fallback on GPS. Soon I'm going to test GPS as an altitude sensor to see if it gives valid readings. |
Awesome !!! Thx !! |
@sppnk you can now try the ALTHOLD mode with fixed wing. Grab a latest hex from my dropbox and give it a try. |
Also, there is NO manual altitude control yet. The plane should hold altitude, but you won't be able to adjust it yet. Essentially, you will be locked out of pitch control. |
Digitalentity it might be beneficial for you to look at the algos here https://github.com/EmilsPa?tab=activity (not sure if all the relevant source is there since he distributes in zips also) this thread is relevant also: http://fpvlab.com/forums/showthread.php?27854-NAZE32-for-fixed-wing/page185 |
Since the "patrikE" baseflight for planes branch code is well tested, working and popular. |
@marksev1 I am already looking at patrickE's code. His algos are pretty straight-forward, but difficult to directly port to nav-rewrite since my implementation is very modular but patrickE's code is a monolyth. Moreover his code is based only on GPS, while my code is designed to use all available sensors. Want more precise heading control? No problem - add a magnetometer. Want better altitude control - simply add a baro, no change to firmware or config. |
@digitalentity , I will try ASAP and report, thx !! |
@digitalentity Should be nice if you announce your FW code and a link to it in the forums, so we could get much more beta-testers than just here in github. rcgroups and fpvlabs seems to have many users interested in PatrikE code, so they should be also interested in cleanflight FW-NAV. Multiwii forum has also a dedicated cleanflight thread. |
The accuracy statement is legit, but still nothing can beat the convenience of just using a gps for a plane. So no need to calibrate magnetometer and cover the baro with foam .. Is airspeed sensor support also planned? |
In any case it is nice that your code covers all the possibilities :) |
@marksev1 @sppnk |
@digitalentity Thx, Anyway, I hope I could test the new ALTHOLD in my 1400m wingspan plane this week. I will report ASAP. The expected behaviour should mantain the altitude independently if I use ailerons, throttle and rudder, like a 2D movement, isn't it? |
Yes, you you won't be able to use elevator yet, I'm working on that part of the code. |
@digitalentity Could you compile a .bin file?. I am having big problems to flash my CC3D through Chrome & USB. May be I have to use FTDI, but not sure if I have also to short some pads inside. That should be annoying if I have to do every time I flash it. No problem if it would be only with FTDI. To flash Cleanflight I have usually used OpenPilot GCS, which can flash CC3D with .bin files and just USB cable. Sorry. |
Hi, I have been reading about this and it seems that the only way to flash CC3D through USB without shorting the SBL pins inside is if the .bin file is "openpilot bootloader compatible". The .bin files from CF download pages are like that, so I could flash my CC3D with OpenPilot, but may be I cannot do that with your .hex. |
A today's build is available here. CC3D BIN is also available. Also, I've implemented manual altitude control - please test and confirm it's working (or not) 😄 |
@digitalentity many thx. I have flashed your .bin with OpenPilot GCS. It shows 1.10.0 Running firmware released on: Sep 2 2015 01:30:33 Board: CC3D, version: 0. Good ! But... I dont see the new "ALTHOLD" mode in the Crhome GUI, so I cannot assign a switch in my transmitter to test this feature !! Can I setup that through the CLI? |
Oops, sorry, must have missed adding fixed-wing support in flight modes. Will fix asap. |
Please add it also in AIRPLANE config, not only in FLYING WING, because I have only planes to test. Thx. |
@sppnk grab a Sep03 build. Now flight modes can be configured correctly. You should also now have ability to adjust altitude using pitch stick - in ALTHOLD mode it will control climb rate. Everything related to airplanes is still completely untested. |
@digitalentity Hi, I flashed and now I can see ALTHOLD, POSHOLD and other new modes. What I have problems now is to configure servo rates. In the Chrome GUI/servos page I have weird numbers, if I change them and save nothing happens. If I choose mixer custom the servos get very hot and noisy (may be the board send high Hz as they woyuld be Escs, not analog servos, I dont know). So I come back to mixer AIRPLANE, and everything go well, except the servo configuration, page. So I cannot invert aileron servos or rates. Should I use the "servo" command in the CLI to get this working? I my other planes I have also CC3D, but 1.8.1, because 1.9.0 has the same problem with the configuration of the servos in the GUI. With 1.8.1 I can do this very well. The problem with CF is there are still few people flying airplanes. This will change with your amazing new code, man !! |
@sppnk, @MDM63 |
Many thanks again @digitalentity . For me, the main need in an airplane is a working RTH. This should be the first thing to work in. A good RTH should have options to take the plane higher and then back to home with a fixed altitude. After that working well, a position hold (circles) should be nice, because you can use that function to land the plane,in a failsafe for example, just cutting throttle. Please, try to mantain if possible the Openpilot bootloader files, so I am not able to flash CC3D in other ways (I have tried again and again, but no success). I dont see in your dropbox .bin files anymore. |
@sppnk OBPL is no longer available - it's taking up too much valuable flash memory. I am already dropping features to fit the code in 127kb. Next thing to go is pid controllers. Only pidc 1 and 2 will remain in nearest future. |
Ok, I will try again to flash your .hex. I have ordered two more cc3d just to test. One question, is poshold already working for fixedwings? (in my lasts attemtps you were working a fixed altitude mode). |
@sppnk |
Yes, Im in RCG, but not in IRC. Will post my problems there. Thanks |
Separate CC3D bin/hex (opbl/non-opbl) in the clean goals.
I haven't read through the code, but currently probably flying wing and traditional airplane mixers are supported right? May I suggest adding also a V-tail mixer so that all the widely used configurations of airplanes are supported. |
All airplane mixers are now supported, but there was a report of a failure on a flying wing. We need to look into it. |
As for V-tail mixer, can you add a separate issue for that? |
Hi,
I would be willing to assist with coding, but I'd need some backup help with testing & suggestions/feedback. Please advise, feedback is requested... |
@csurf I know there is ongoing discussion on separating fixedwing and multirotor firmware. cleanflight#1621 Testing I can help you with, currently setting up an airplane with iNav. |
@oleost, cool, good to know, thanks... FYI, I'm on the CF IRC channel, which might be easier & more productive in terms of dev communication... |
#89 Added new issues regarding fixed wing, limited servo throws in stabilization mode without throttle. |
Hi, I have setup a CC3D plane with iNav 1.0.1, but in ANGLE and HORIZON modes all the servos move to one side (plus the stabilization corrections) when arming and raising throttle stick. This movement is slow (1 - 2 seconds), just when motor starts and then the servos go full to one side (I still have control throught sticks and I can see the stabilization corrections). When I move the throttle stick to the minimum and the motor stops , then the servos go back to their normal positions. This doesnt happen in passthrough mode (I can fly well with this mode). It seems it is some weird mix, but checked the code I dont see the problem. May be other kind of correction is actuating, but I am not in RTH or POSHOLD or any navigation modes. Also, like @oleost I think the throws of the servos are very limited in this modes, |
Do you think its maybe a power supply issue? Or code issue? |
I think it is a code issue, 'cause passthought works fine |
@sppnk, It's I-term on Roll/Pitch in action. Plase the board perfectly level and you won't see the issue.
|
@digitalentity, thanks, I have calibrated again several times (trying the six position acc calibration doesnt seems to work for me) the gyros and accelerometers through EZGUI and with TX sticks and now the behaviour is more normal. So I think the model should be flyiable now in autolevel modes, and today or tomorrow I will test in air and report. Sorry for the mess :-). |
Just a reminder instead of forum post. |
plane tested (CC3D + GPS) and the stabilized modes working fine. Now testing RTH and NAV WP modes. Preparing for FPV. Thx. |
@sppnk great! |
People are flying airplanes with INAV, I think we can close this. |
No description provided.
The text was updated successfully, but these errors were encountered: