px4xplane
px4xplane copied to clipboard
Fixed-Wing Support
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
hi fixed-wing support is almost ready and I am doing final tests and will be released soon
This is great news! Please tell me if I can support you anywhere.
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 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?
@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.