karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #15 on: December 03, 2019, 08:53:17 am »
@theothercliff
Thanks a lot, i am just not there yet, but hope to catch up and use your list.

I've later built the MiniTalon with analog airspeed sensor too.

May I ask where and how you installed the pitot tube on that wing frame?
Cant really spot it in the pictures you posted.
What considerations you went through?

Asking since I am getting a bit inspired to install one myself on a similar wing (ZOHD Talon Rebel GT, long name  ::) ).
It does have a v-tail and thus a rudder function, unlike the mako.
« Last Edit: December 03, 2019, 08:57:58 am by karla »

jdl

  • ***
  • 246
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #16 on: December 03, 2019, 11:03:36 am »
I've installed the pitot tube on the right wing of MiniTalon, some 15-18cm away from the fuselage. I've followed the info and advices in the MT dedicated thread in rcgroups, especially these of mark_q. He also has an excellent MT dedicated site:
http://www.itsqv.com/QVM/index.php?title=X-UAV_Mini_Talon_Build_Compilation

If your pitot tube is all-metal one, you can make use of this 3d-printed mount:
https://www.thingiverse.com/thing:1887194

Mine pitot tube was different design so I installed it with hot glue and a plastic screw for additional strength. Never had problems with it, the hot glue holds it perfectly, just had to be very cautious aligning it correctly. I'll make a close-up photo of the pitot tube on the wing later and I'll post it here...

This position of the pitot tube is considered to offer minimal disturbances in the airflow and thus minimal errors. It is safe on landings, too.





I've burried the sensor and the hoses in the foam, in the wing. Only the cable goes into the fuselage.



Here is the post about my MT build:

https://www.rcgroups.com/forums/showpost.php?p=39982936&postcount=13905

There are tons of useful info in the MiniTalon thread in rcgroups, worths reading it all. I guess you can find interesting ideas for your build of ZOHD Talon Rebel GT there.

karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #17 on: December 03, 2019, 11:37:19 am »
OMG, thanks a lot for sharing all this!
Q: I notice you have a small gps unit that do not have an external mag in it, right?
So, where do you mount your external mag?

jdl

  • ***
  • 246
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #18 on: December 03, 2019, 12:20:06 pm »
Nowhere  :)
Not using external mag at all.

On the MiniTalon I'm using Revo's internal mag, works flawlessly. There are not power lines passing too close, all cables are twisted and I get (almost) no alarms, no matter how much thrust I give. In fact, the situation is way better compated to the ZMR250 quadcopter and Z-84 plane that have auxmags installed.

I've rarely seen in the telemetry logs mag warnings, not critical reds, and the rate of their occurance is comarable or lower than the rate of the identical warnings in the logs from Z-84 (that uses external mag).

karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #19 on: December 03, 2019, 12:22:04 pm »
sooo good to hear that!
I will take a bet the internal mag also will work on the Rebel GT.

jdl

  • ***
  • 246
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #20 on: December 03, 2019, 12:49:13 pm »
I guess so. ZOHD Talon seems to have (looking the photos on the web) spacious internals to allow good separation betheen FC and power lines.

Even if internal mag turns to be unusable on the final build stages, you can always replace the GPS with Naza clone and use its own mag for auxmag. Weight penalty is almost insignifacant..

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #21 on: December 03, 2019, 06:02:46 pm »
You can also give a try to Complementary+GPSOutdoor, without mag.

Re: Position hold on a fixed wing - Altitude control mystery
« Reply #22 on: December 03, 2019, 08:17:39 pm »
Cool !

Hmmm...  This is about fixed wing GPS flight modes.  I have never tried this without a mag.

So does "next" (or even 16.09??) use the "fixed wing constraint" to do GPS flight modes on fixed wing without a mag?  (It assumes that it is pointed in the direction that it is traveling?)  I have just assumed that it used mag.  I need to read code more completely.  :)
« Last Edit: December 03, 2019, 08:51:18 pm by TheOtherCliff »

jdl

  • ***
  • 246
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #23 on: December 04, 2019, 02:11:06 pm »
@karla
Here are some photos of how the pitot tube is mounted on my MiniTalon wing. I've measured 18.5cm from the base of the wing, so approx. 20cm from the fuselage.


karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #24 on: December 05, 2019, 02:42:32 am »
This sounds better and better :)

@jdl very clear, thanks.
@f5soh interesting, I will try setting Complementary+Mag+GPSOutdoor and see what it does.
@theothercliff good questions!

karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #25 on: December 21, 2019, 07:29:52 am »
I am almost done building the new wing and preparing for some initial test flights in 2-3 weeks.
Reading up on other threads I have tried to collect the observations and settings important to position hold on a fixed wing.



@theothercliff
If you would like to share the uav file of your bixler I can complete the setting comparison table with you @jdl and mine to better understand the outcome of the upcoming test?


Re: Position hold on a fixed wing - Altitude control mystery
« Reply #26 on: December 21, 2019, 08:37:50 am »
Mine was <not> pretty.  ::)  I can't publish it as it is.  The first day at the field to get it working, I set min speed = max speed and adjusted thrust limits min, neutral, and max so that it would fly about that speed with enough thrust variation to be able to climb and descend at reasonable rates, but speed wouldn't oscillate.  I didn't bother to change these since I wasn't getting the (omnidirectional) FPV video range that I wanted.

I also tweaked settings to make it turn a lot tighter in GPS flight modes (like for position hold or a very sharp waypoint turn), but the nose would drop and it would loose altitude before realizing that it needed to pull some up elevator.  So I made a code change to pull elevator that was a function of bank angle (with fixed airspeed) so it wouldn't wait till it lost altitude to pull elevator in a turn.  I think this idea might be useful.  So you see those settings won't even work well without a code change.

karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #27 on: December 22, 2019, 03:10:24 am »
Ah yes, I see.
My mission is to see if PH RTB PP can work okay without code changes.

Another question, is there any point in playing with AltitudeHold/AltitudeVario, the non gps thrust stabilization for quads and helis? Maybe not designed/usable for fixed wings? Could possibly be easier to just tune altitude hold first...

That function uses the settings under Stabilization | Altitude Hold, right.
After getting it to work good, say flying with Attitude stab on roll and pitch, then do settings in FWPF when moving to trimming for PH, RTB and PP.

Re: Position hold on a fixed wing - Altitude control mystery
« Reply #28 on: December 22, 2019, 07:22:11 am »
Quote
My mission is to see if PH RTB PP can work okay without code changes.
In my opinion, yes it can.  Turns are fairly big circles.  Vertical / thrust stuff probably needs to be tweaked to avoid throttle oscillation.  Use INS13 with GPS-airspeed or hardware-airspeed enabled (UseAirspeedSensor), set up and calibrated by comparing to GPS speed during normal flight on calm, no wind day.  Airspeed PID Scaling should be understood, enabled, and changed if needed, early on so that your PIDs are tuned with it enabled.  Remember SystemSettings (max and min airspeeds) need to be set too.  I should have spent more time on SafetyMargins.  I setup up Manual mode and make manual linkage adjustments to get it flying well with trims centered.  Add Rate (rate, rate, manual, manual) (tune PID).  Add Attitude (attitude, attitude, manual, manual) (tune PID).  Add PathPlanner and 2 point waypoint plan with error destination set to -1 on both waypoints and use it to get altitude / thrust oscillation fixed.

Be aware that when using a 2.4GHz RC to 433 OpLink relay box with OpLink control of aircraft, that you should never just turn the RC transmitter off because that causes the OpLink in the relay box to send full stick signals on all channels.

Configure and test both RTB and waypoint flight in "out of range mode" close to you to make sure that they do what you want them to.  RTB should come home while climbing whatever you have configured.  If I were to do long range waypoint flight, I would probably want it to continue doing the waypoints whether it was in RC range or out of RC range.

I usually make a small code change so that I can set RTB up as if it were an additional flight mode switch position that is only reachable in FC failsafe mode.  You can do the same with RC failsafe mode moving the channel farther than you can move it with the switch.

I remember the first time I tried to set up GPS flight modes on a quad.  I wondered why we have two separate vertical velocity PIDs; one in AltitudeHoldSettings and the other in VtolPfSettings.  Maybe it was to make it clear that FwPfSettings doesn't have a vertical velocity PID.

FwPfSettings as a whole has settings that can be tuned like a vertical velocity PID, but it doesn't actually have one.  It DOES has a vertical position P as opposed to velocity PID.

As suspected, a quick look at the code says that all aspects of fixed wing ignore AltitudeHoldSettings.

Oops, gotta go.

karla

  • *****
  • 629
Re: Position hold on a fixed wing - Altitude control mystery
« Reply #29 on: December 24, 2019, 01:56:47 am »
Yes, I feel optimistic it will work much better than last summer with the help of the recent posts by you, @jdl and @f5soh.
The issue right now it's difficult to find replacement for the full size Revo that has a weak radio link. Sparky2 and Revo mini's are available but they lack the convenient output connector pins and I already have three Sparky2 boards that don't want to work with next r782. If i can't find one i will use a revo mini and re-solder all wires.

Merry Christmas  :)