px4xplane icon indicating copy to clipboard operation
px4xplane copied to clipboard

Fixed-Wing Support

Open lars-nagel opened this issue 1 year ago • 5 comments

Hey there! This is a very interesting project - good work! It would be very helpful for a project of mine if this would also work for fixed-wing aircraft. Where can I help to realize this quickly? Greetings

lars-nagel avatar Nov 30 '23 13:11 lars-nagel

hi fixed-wing support is almost ready and I am doing final tests and will be released soon

alireza787b avatar Nov 30 '23 16:11 alireza787b

This is great news! Please tell me if I can support you anywhere.

lars-nagel avatar Dec 03 '23 16:12 lars-nagel

thanks. now dealong with some sensor simulation and make the compatible with PX4 EKF. Only magnetometer is stil isnt perfect. maybe I will release in following day for now to find a solution for it later.

alireza787b avatar Dec 04 '23 02:12 alireza787b

@alireza787b could you elaborate on the issues you are having with magnetometer for wing? Is this a HIL sensor issue? Have you had any issues with airspeed sensors?

dirksavage88 avatar Dec 07 '23 02:12 dirksavage88

@alireza787b could you elaborate on the issues you are having with the magnetometer for the wing? Is this a HIL sensor issue? Have you had any issues with airspeed sensors?

hi well, I think it mostly comes back to the EKF estimator and compatibilities with Xplane. for magnetometer, since X-Plane doesn't output the magnetic field vector I should recreate them. Currently, I am using a simplified WMM model which XYZGeo library. it's available in the source: https://github.com/nhz2/XYZgeomag/tree/4c69107d63510c7c4f185b54d304d783ff193bef It seems it is working. In multicopter it's pretty stable.

In fixed wing when fusion with all sensors happens we get some sort of problem. I think I might using come wrong datarefs from xplane. eg. For local NED speed initially I was using local Xplane OGL coordinate and did a transfer matrix. I found that it is not a good idea sometimes OGL refference in X-plane changes. I tried projecting ground speed with hpath and vpath angle then in slow speed since hpath and vpath are not relaible ended up bad results. now I am using a thrick and using TCAS system local speeds that seems have constant refference (at least for now) the problem is when plane is moving on ground there is a conflict between gyro, magnetometer and GPS NED Speed and airspeed. when we take of and gain some ground speed, EKF corrects the heading based on track and it will be solved (not complemetely)

take a look at my datarefmanager.cpp and mavlinkmanager.cpp and see what dataref and process I am doing. let me know if you have experience and come up with a better more robust solution.

alireza787b avatar Dec 07 '23 06:12 alireza787b