LibrePilot Forum

General Category => General Discussion => Topic started by: Stardaddyed on April 29, 2019, 08:23:37 pm

Title: Setting up for first flight.
Post by: Stardaddyed on April 29, 2019, 08:23:37 pm
I am almost ready to fire up the drone and take her for the first flight.  Motor all turn, controller (FlySky) is talking to the quad, if I tilt her it reacts, gps works.  I think I am ready to go.  There are a few things.  I have been flying since first of the year on a commercial drone (HS700) and it is pretty idiot proof.
1) Is there a way to set the drone up for return to home? I would prefer not to lose the darn thing. The other question is does the drone mark the home position when it acquires a GPS fix or does it always have to be manually assigned?
2) How do I tune the quad so that it is super stable?  I can always increase the aggressiveness as I get more confident but I want to start conservatively.
3) How do I make it so that if I cut the throttle to zero it won't fall out of the sky while at the same time making sure that once armed it wont take off immediately.  The HS700, with the throttle all the way down will slowly lower.  It is pretty hard to crash it when landing.
4) Is there a way to automatically set it to hover?  My HS700 controller's throttle is spring loaded to return to hover.  The new one is not so it would be hard to just let go and have everything stop and hover.

All of this is geared toward not crashing and not losing the thing right away.  If it helps I made a DJI F450 like drone.  No camera on it yet but that's next.

Ed

 
Title: Re: Setting up for first flight.
Post by: utoedter on April 29, 2019, 08:43:27 pm
I am almost ready to fire up the drone and take her for the first flight.  Motor all turn, controller (FlySky) is talking to the quad, if I tilt her it reacts, gps works.  I think I am ready to go.  There are a few things.  I have been flying since first of the year on a commercial drone (HS700) and it is pretty idiot proof.
1) Is there a way to set the drone up for return to home? I would prefer not to lose the darn thing. The other question is does the drone mark the home position when it acquires a GPS fix or does it always have to be manually assigned?

You shall set it to the arming location, not to a fixed one. It only arms with enough sats, so you can be sure the quad returns. Its described in the wiki.

2) How do I tune the quad so that it is super stable?  I can always increase the aggressiveness as I get more confident but I want to start conservatively.

I would try the default settings, normally they are beginners friendly. for nick an roll choose attitude stablilzation, for Yaw axis lock. If you increase the parameters too much, the quad may wobble and thats difficult to control.

3) How do I make it so that if I cut the throttle to zero it won't fall out of the sky while at the same time making sure that once armed it wont take off immediately.  The HS700, with the throttle all the way down will slowly lower.  It is pretty hard to crash it when landing.

Dont know how powerfull your new toy is, but what about a test run without props? so you can check if you can increase/decrease the power smooth.
 
4) Is there a way to automatically set it to hover?  My HS700 controller's throttle is spring loaded to return to hover.  The new one is not so it would be hard to just let go and have everything stop and hover.

VelocityRoam GPS mode helds with controls at neutral the current position. But normally attitude stabilization is very easy to control, my dad (78 years) was able to hover my eachine  racer in attitude mode after 5 minutes training.

All of this is geared toward not crashing and not losing the thing right away.  If it helps I made a DJI F450 like drone.  No camera on it yet but that's next.

Ed

Good luck !

Udo
Title: Re: Setting up for first flight.
Post by: Stardaddyed on April 29, 2019, 09:43:46 pm
I was all excited that someone had replied!  Not the reply I was hoping for but at least someone besides me is encouraging me!!!  Thanks.
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on April 29, 2019, 10:20:33 pm
gps works.
GPS flight modes are an advanced topic.  You should get it flying well in Atti, Atti, AxisLock, Manual(throttle) first.  The problem with that is that it drifts and you have to keep it from drifting away.  The GPS flight modes you are used to hold it right where it should be, even in wind.  You are used to a self driving car, and now you have to drive one that requires constant attention and corrections to not drive into the ditch.

1) Is there a way to set the drone up for return to home?
That is a GPS flight mode and in my opinion, should be done later.  The one thing you must do now is set your failsafe so that if it flies out of range, the motors stop.

The other question is does the drone mark the home position when it acquires a GPS fix or does it always have to be manually assigned?
Yes.  When you fly from a new field it will return to that field.

2) How do I tune the quad so that it is super stable?
As the other post said, use defaults.  They are fine.  You don't tune a car differently for a new driver...  :)  That means using defaults, not using a "cloud configuration."

3) How do I make it so that if I cut the throttle to zero it won't fall out of the sky while at the same time making sure that once armed it wont take off immediately.  The HS700, with the throttle all the way down will slowly lower.
Well what you want there is "Altitude Vario" thrust mode which is best switched to once flying, but again, start with Atti, Atti, AxisLock, Manual(throttle).  Zero throttle will stop the motors, but for now that is probably a safety feature that should be left active.  There is AlwaysStabilizeWhenArmed, but there are many cautions for it that should be researched.  Learning to hold a reasonable altitude with sensitive throttle stick is probably the first thing you must learn, even before learning to keep it from drifting away.

4) Is there a way to automatically set it to hover?  My HS700 controller's throttle is spring loaded to return to hover.  The new one is not so it would be hard to just let go and have everything stop and hover.
When you eventually set up "Altitude Vario" thrust mode, the center 20% of the stick is dead band, so anywhere close to center is exactly center.  For now, using Manual throttle, learning throttle should be your first concern.  You are doing well when you have found that this click on your detent throttle is slowly coming down and one click up is slowly climbing.  Then a hover is just clicking back and forth once in a while.

May I suggest that you read this:
https://forum.librepilot.org/index.php?topic=4408.0
Title: Re: Setting up for first flight.
Post by: Stardaddyed on April 30, 2019, 03:02:24 am
Cliff

Thanks for the information.  It highlights how much I have to learn!  But it is fun to learn new stuff.

I took the drone out tonight and fired it up.  It did actually fly. I kept it low and very slow.  It was doing great until I tried to go forward.  It actually went backwards.  This totally freaked me out and I overdid the throttle and up it went, then I cut the throttle and it dropped like a rock, flipped over and hit the ground like a rock.  Broke the cheap plastic frame and propeller.  I am sure I am the only person this has ever happened to.   ;)

New frame on order.  In the mean time I will read the referenced material.

Thanks.
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on April 30, 2019, 03:44:30 am
- Flight rule to keep in mind:  Always fly with the tail pointing toward you (nose away from you), so both you and the quad are facing the same way, like you are both in line (queue) waiting for checkout at the store."

It sounds like you had the nose pointing towards you.  It's important to know which is the nose.  :)
Title: Re: Setting up for first flight.
Post by: Stardaddyed on April 30, 2019, 01:59:45 pm
That's what I thought, it happened so quick.  It was a nightmare.  The other thing I forgot to mention is that I designed the quad in eCal to be able to carry a camera on a gimble and a larger battery so as it is now it is very over powered.  Can I limit the amount of throttle I am allowed to apply?  Say 50% max. 

Also, I should have read your start guide BEFORE I fired the thing up!  Great write up and I probably violated every pointer.

Ed
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 01, 2019, 03:02:48 am
Yea, you can reduce your Output page Maxes on all motors to say 1500 or even 1300 if it's really wild and you want to tone it way down.

With a tightly tuned (PIDs as high as possible without oscillations) quad, doing this might cause oscillations, but not in most cases, especially with just a default tune.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 07, 2019, 10:23:03 pm
Several updates.

1) Got the Optlink working so at least I can see what is happening remotely!

2) Everything is calibrated and the sensors are working.  The magnetometer had me thrown for a couple of hours because it getting really strange reading when it was just sitting on the ground.  The compass was way off and would jump around.  Turns out that I had a magnetic clasp on my Fitbit on the arm I was doing all the calibration.  All I can say is DUH!

3) I have the modes set up as Flight Mode 1: Atti, Atti, AxisLock; Manual: Flight Mode 2 Hold position with GPS assist; Flight mode 3: Return to home with GPS assist.  My controller only has a three position switch so I don't know how I would set more but I am not sure I need any more right now.

4) I am getting inconsistent arming of the quad.  It leads back to inconsistent lock on the GPS.  I cannot always get a GPS lock which keeps the drone from arming.  Still looking into that.

5) Toned down the max output from 2500 to 1300.  Everything ran but didn't have enough to take off.  Changed it 2000 and the quad flipped over and broke a prop.  My motors have a DJI type hub (has a dent on the side locking the prop to the hub...very unforgiving).
Moved the thrust to 1700 but ran into the lock issue again.  Called it a night.

Any advice is more than welcome (on any of the issues). 

My biggest fear is 1) runaway drone then 2) killing the throttle and having it drop from the sky like a rock.  As TheOtherCliff said I am used to an autonomous car so the switch to manual is a big change.  My flight modes are selected to learn how to control it first, but to be able to throw a panic button of hold in place or return to home in case of emergency.  Is there something in the middle of full auto and full "manual"?

Also the big change for me is the throttle.  I feel really uncomfortable with cutting the throttle all the way leads to 0 output.  To me this can never be a good option.  When would I ever want to cut the throttle of off? For a plane a get it, it can glide, but for a quad it is a rock.  Is there a way to say once off the ground zero throttle means 20% output or whatever I need to keep it from rocking?

Ed
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 08, 2019, 05:06:06 am
3) I have the modes set up as Flight Mode 1: Atti, Atti, AxisLock; Manual: Flight Mode 2 Hold position with GPS assist; Flight mode 3: Return to home with GPS assist.  My controller only has a three position switch so I don't know how I would set more but I am not sure I need any more right now.
GPS Assist is only for use with non-GPS modes and basically just does a GPS Position Hold when the sticks are centered.  May I suggest that you use Velocity Roam instead of Position Hold.  They are the same if the sticks are in the middle, but VR lets you move it around too; just release the sticks and it stops where it is.  The throttle stick has 20% deadband (+-10%) so anything close to the middle means "maintain this altitude".

4) I am getting inconsistent arming of the quad.  It leads back to inconsistent lock on the GPS.  I cannot always get a GPS lock which keeps the drone from arming.  Still looking into that.
Some GPSs don't do well inside some buildings.  Also, you don't want to be between tall buildings.  You should be able to see the horizon (or trees).

5) Toned down the max output from 2500 to 1300.  Everything ran but didn't have enough to take off.  Changed it 2000 and the quad flipped over and broke a prop.  My motors have a DJI type hub (has a dent on the side locking the prop to the hub...very unforgiving).
Moved the thrust to 1700 but ran into the lock issue again.  Called it a night.
https://forum.librepilot.org/index.php?topic=4408.0

My biggest fear is 1) runaway drone then 2) killing the throttle and having it drop from the sky like a rock.  As TheOtherCliff said I am used to an autonomous car so the switch to manual is a big change.  My flight modes are selected to learn how to control it first, but to be able to throw a panic button of hold in place or return to home in case of emergency.  Is there something in the middle of full auto and full "manual"?
Yes.  Attitude (/ Rattitude / Rate) mode with GPS Assist (not sure all those are allowed with GPS Assist).  Attitude / Rattitude / Rate are "manual" and when you center the sticks, you get a GPS Position Hold.

When would I ever want to cut the throttle of off? For a plane a get it, it can glide, but for a quad it is a rock.  Is there a way to say once off the ground zero throttle means 20% output or whatever I need to keep it from rocking?
When it is eating you or your friend with more stitches needed every second.  :(  If I am really good with the disarming switch, I figure it takes me about a half second longer to hit the disarming switch than to reduce the throttle.  Yea, I remember having a hard time not zeroing the throttle in a crisis.  ASWA Always Stabilize When Armed will do what you want.  The motors always run.  There are down sides.  It always stabilizes.  When on the ground in Attitude mode one or two motors will run way up, trying to correct the slight tilt.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 09, 2019, 05:18:16 pm
This hobby is hilarious.  So last night I fire up the drone and it works perfectly, on the ground.  GPS lock, arms through a switch, props spin!!!  Still falls over.  Did get it off the ground with a quick burst then it flew straight left and into a bush.  Hilarious.

Finally figured out that the drone thinks it is tilted to the right even though it is level.  Re-calibrated everything (a couple of times), outside with GPS lock, but that didn't resolve it.  The only thing I can think of is electrical interference.  I have the FC mounted next to the GPS on one side and next to the receiver on the other.  The Optlink antenna is right in front of the GPS.  I just purchased a GPS stand to get it away from the FC.

Any other thoughts?
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 09, 2019, 06:23:52 pm
Tilted how much to the right?  Just a few degrees or like ... 90 degrees?

What flight mode was it in when it went left?

About what bank angle do you think it was when it was going left?

I assume that you were in Attitude mode when this happened.  Attitude mode will drift, depending on how well the sensors are calibrated.  This is like your car.  If the front end is aligned badly, it will immediately head for the ditch when you take your hands off the wheel (fingers off the stick for a quad).  If it is aligned very well, it will still go for the ditch, but will take longer.  With your quad, you must constantly keep it out of the ditch.  That is Attitude mode (Atti, Atti, Rate/AxisLock, Anything).  If you add GPS Assist to that, it will stay in one place when you release the sticks, but if it is badly calibrated, it is like your car front end is badly aligned, but it is a self driving car and can correct that.  It will still drift when you touch the sticks.

Accel Calibration is supposed to be done with the board out of the aircraft, but could be done with it in aircraft in a pinch.  Board Level cal is done with board mounted in the aircraft.  Accel first then Board.  Both of these need to be done well to minimize drift.

Your transmitter trims should be in the same place as when you did transmitter wizard.  With battery in and USB plugged in and transmitter on, you can go to "Input - RC Input" page and verify that the readings match your Neutrals, +- 1.

So finally, Velocity Roam is like your other GPS quads.  Attitude mode with GPS Assist is "manual" flying with a position hold when you release sticks.  VR is easiest to fly, but as I recall, you can't arm in VR and shouldn't take off in VR (use Atti) until you understand the issue with GPS drift while it is sitting on the ground.

For GPS to work best, you should wait 12 minutes with it powered up (and in the open) before first flight of the day and wait 2 minutes for later flights that day.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 11, 2019, 05:16:53 am
The tilt is just a few degrees, not a lot but enough.  It was in Atti, Atti, Axislock, manual flight mode 1. Mode 2 is position hold with GPS assist and Mode 3 return to base.  I haven't gotten far enough for mode 2 or 3.  :)

I haven't touched the trims. 

The behavior is for it to just tip over as soon as it starts to spin up the motors. It did this heading north and flipped it heading south.  Both times it tipped left so I am sure that it is something in the setup.

I am surprised to hear about the long time to GPS fix.

Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 11, 2019, 07:33:25 am
The tilt is just a few degrees, not a lot but enough.  It was in Atti, Atti, Axislock, manual flight mode 1. Mode 2 is position hold with GPS assist and Mode 3 return to base.  I haven't gotten far enough for mode 2 or 3.  :)

I haven't touched the trims. 

The behavior is for it to just tip over as soon as it starts to spin up the motors. It did this heading north and flipped it heading south.  Both times it tipped left so I am sure that it is something in the setup.
I asked because this should be it's angle when it flew left into the bush.  We can fix that angle and make it zero.  Did you read the "first take off" post?  There are several things that may help you like "Stabilization->ZeroTheIntegral must be enabled" and don't touch anything but the throttle, etc.

I am surprised to hear about the long time to GPS fix.
The initial GPS fix often happens within a minute or two.  The 12 minutes is the time required to download the almanac so it knows what to listen for in case it missed a sat when simply scanning for them.  This gives the best lock, and also minimizes the small but annoying GPS jumps you get when adding or removing a sat.

Quote
About what bank angle do you think it was when it was going left?
Do you think this matches the tilt you see in the GCS?

Do those recalibrations and see if the GCS looks more level.  If so, try flying again.  There is a procedure to trim out the remaining Attitude mode drift and get it as small as possible.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 14, 2019, 05:28:21 pm
I did read the first take off post but in fact missed the zero the integral part.  I will re-read diligently!  I have triple checked the motors and prop orientation but I will check again.

GPS is fixing in a minute or two with 12 or 13 satellites.  The tilt of the drone doesn't appear to match the GCS tilt however I went back and look at the video in the Wiki and followed what he did exactly and it is much better.

Last night I tried again and jumped the drone up off of the ground. Unfortunately it jumped about 30 feet up and again went straight side ways, fast!. Fortunately it ran into a  tree before I cut the throttle (I tried to bring it down in controlled fashion).  The tree cushioned the fall no damage.

My wife and neighbors think I am an idiot but I won't give up!!!
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 14, 2019, 07:03:09 pm
I'm trying to gauge how badly tilted it is when it is in the air and if that tilt matches what you see in the GCS.  Even a small amount of tilt will make it accelerate and get fairly fast after several seconds and might be all it takes for a beginner to see it flying away very fast.  Just a half a degree (invisible to a human) is the difference between it slowly drifting left and slowly drifting right.

For your Flight Mode Switch, you should be using Stabilzed-1 which is Atti, Atti, Axislock, Manual.  And (besides required Input and Output and RC setup) pretty much defaults for everything else.  I recommend using the default settings, and not one of the templates which can have issues like "zero the integral" and might sound like they match your aircraft but they don't.

This is probably not your problem but be aware that balanced props are important because too much vibration will affect the sensors and make it fly sideways.

It's best to start on grass with bigger and bigger throttle blips (longer blips, not quick jabs) until you know how much throttle it takes to get it up to knee high.  By this time you should be able to tell which way it is consistently drifting.  For now, it's OK to use transmitter trims to correct for this till it no longer drifts.  After trimming it out this way, it should stay within a meter (yard) or two for say 10 seconds as long as there is no wind.  Trim it till you can't predict whether it will drift left or right.  It's very important for a beginner to have a trimmed aircraft.

After you get it flying this way, and before you start using other flight modes like Rate or VelocityRoam (VR is a GPS mode) you must put the trims back in the center (where they were when you ran setup) and fix this drift the correct way.  GCS Attitude(->Settings)->RotateVirtual... is where you do this.  If it is drifting forward you subtract from pitch.  If it is drifting left you subtract from roll.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 15, 2019, 02:57:58 am
This is a pic of GCS when it is absolutely level.

As you can see it is OK front to back (pitch?) not so much side to side (roll?) with right side down.  It tries to fly this way as well.  When I have the throttle low enough to spin the blades but not high enough to take off it tries to compensate and the right side speeds up - causing a flip.  If I manually compensate I can keep it from flipping but something is clearly wrong here!

Also I noticed not all of the props spin up at the same time.  I usually have at least one that won't spin but rather just twitches back and forth until I give it more throttle but by then it wants to flip on that side.
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 15, 2019, 05:49:37 pm
That amount of tilt would definitely make it accelerate away quickly.

- FC must be mounted level :)
- Both Accel and Board level calibrations must be done correctly and well
- Attitude->Settings->RotateVirtual should be 0, 0, 0
- Since you have Attitude->Settings->AttiEstAlo set to INS13, your mag must also be mounted far away from magnetic field sources and well calibrated.  Also your Home Location should be reasonably accurate.  Also there are issues with certain areas of the globe having mag field deviations.

Info:  I find it common to get a little bit of bank in the Attitude (that must be configured out) when using INS13.  It is apparently because of the mag sensor alignment.  Also, the earth's mag field has moved differently than was predicted 10 years ago, so the 16.09 algorithm is less accurate than it should have been.  This can be adjusted for in Attitude->Settings->RotateVirtual or even in Attitude->Magnetometer->AuxMagOrientation.  Are you using an aux mag?  The earth mag field issue has been corrected (the latest algorithm used) in the unreleased but widely used version called "next" if you would care to upgrade.  For 16.09, I prefer to adjust AuxMagOrientation (if it is a mag alignment / earth mag field issue) as discussed here:

https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/18382863/Aux+Mag+Setup+and+Calibration
in the section titled "Fine Tuning Your Hover To Stop Drift (Not Required)"


I suggest that you recalibrate / reset the things in the list above.  If it is still tilted badly (say more than 5 degrees (one notch) in GCS Flight display), then I suggest that you change AttiEstAlgo from INS13 back to Basic (for a test anyway).  You will have to remove all GPS flight modes from your FlightModeSwitch too.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 15, 2019, 09:50:34 pm
Thanks for the response as usual.  Geez you know a ton!

Quote
Since you have Attitude->Settings->AttiEstAlo set to INS13, your mag must also be mounted far away from magnetic field sources and well calibrated.  Also your Home Location should be reasonably accurate.  Also there are issues with certain areas of the globe having mag field deviations.

How far away is far away?  I have the FC mounted in the middle of the craft (Readytosky S500 Quadcopter Frame). The receiver is on the front lip of the lower shelf and the GPS is on the back lip.  The FCis mounted with plastic bolts through the housing to the top of the top shelf directly over the PD/BEC board (a HOBBYMATE XT60).
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 16, 2019, 01:36:19 am
How strong is the magnet?  :)

What GPS are you using?  I hope it has a mag sensor.  It is best to:
- use a mag sensor that is part of a GPS
- mount the GPS up on a pole
- change your settings to use ONLY the aux mag (not onboard or both)

There are other things you should do like twisting all your high current cables.  Generally, if you twist all your high current motor cables (battery to connector, connector to PDB, PDB to ESC, ESC to motor) then the aux mag inside a GPS up on a standard say 150mm pole is far enough away, considering that it is more than 150mm total distance from the sensor.  I'm going to say at very least 200mm total.  Smaller quads that use less current can get away with shorter distance between mag sensor and high current cables.  Of course you won't see any mag problems from the wiring until you fly at high power.

The standard 1-8S Lipo alarm has tiny real speakers with magnets.  About the same distance is OK for them.  Some airplane hatch hold down magnets that came in some of my airplanes need to be farther than that, at 250-300mm I can no longer see a difference in the mag scope.  With FC or GPS/mag stationary and watching the GCS mag scope or sensor numeric outputs, bring your magnetic part close to find out how close you can see any tiny disturbance and make it farther than that.  For mag fields around wiring, it has to be under highest current flight load (props on at full RPM) to generate max mag field so bench measurement is often not possible.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 16, 2019, 03:23:38 am
I GOT IT OFF THE GROUND!  Hopped it up a couple of times and it held mostly stable. 

I could correct the roll in INS13 if I used a 6 - 8 correction. So I switched to basic and there was no correction needed.  I noticed that in that mode it was stable when it was just sitting on the ground. In the INS13 it would be tilted but also very unstable.  I moved it to "Complementary + Mag+ GPSOutdoor" and again no tilt and stable.  I decided to give it a go and up she went. She wondered around a little but it was easy to correct with slight movements of the stick. Again the problem for me is that it is either going up or going down.  I set it down and tried it again.  Up she when and I just corrected for the little drift if she got out of hand.  "Set" it back down. 

I am sure I should be using the algorithm but it worked.  Also I am using a "Geekstory BN-880 GPS Module U8 with Flash HMC5883 Compass + GPS Active Antenna" Post is on the way.
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 16, 2019, 05:31:11 am
Do you actually have the aux mag connected and configured?  That style of mag is exactly what is described in the wiki article I linked to.  It requires another cable (besides the GPS cable) to be connected to FlexiPort.  It requires Attitude->Mag->AuxMagOrientation to be either 0,180,0 or 180,0,180.  Also any aux mag requires you to set Atti->Mag->MagUsage to be either AuxOnly (preferred) or Both (not preferred).  If you are missing even one of the requirements, then you are using the OnBoard mag only which can actually work for big quads (say 450 or larger) if your high current cables are properly twisted.

Some GPSs even claim to have a mag, but have an empty place on the circuit board instead.

Now days, for future purchases, I recommend buying a DJI/Naza GPS/mag which puts both signals (GPS and mag) on one cable, so it frees up a port.  Also, there can be problems with the I2C signal of your style of GPS/mag that sometimes needs adding pull up resistors to get it to work well.  I generally buy OCDay brand Naza GPS for about $23 shipped on eBay.
https://www.ebay.com/itm/OCDAY-NEO-M8N-GPS-Sensitive-for-DJI-NAZA-Lite-V1-V2-Flight-Controller-RC783/312537851509

GPS Navigation (INS13) is really what you want for 16.09 AttiEstAlgo to use GPS flight modes.  You are OK to use something else for non-GPS flight modes though.

My estimate of 5 degrees is what I have found for my FCs in my place on earth when I did setups a year and more ago.  If I had recalibrated everything and it still was 6-8 I would correct it in RotateVirtual (for me, preferably in AuxMagOrientation because then you can use the same 0,0,0 RotateVirtual for both Basic and INS13 (or some small numbers that satisfy Basic) without changing RotateVirtual since Basic doesn't use mag, see the wiki article).

Mag fields can be a bit strange inside a house or on the ground or close to your metal car, etc.  The GCS horizon does jiggle a bit when you think it shouldn't when using INS13, but it works fine.

Quote
Again the problem for me is that it is either going up or going down.
Learning More:
- Learn to control aLtitude first.  Don't touch the other controls.
- After several trim adjustments it will stay in one place better and give you more time to practice holding your aLtitude reasonably.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 20, 2019, 07:14:29 pm
Over the weekend I hooked up the mag using the Flexiport and I2C.  It works but I haven't had a chance to Calibrate and test.  The wind hear was blowing at 20 mph so I didn't think that would work.  :o 

How do I know which AuxMagOrientation I have it at?  It is on my GPS that is now on a pole.  Also, I saw somewhere that said the antenna side (not the PCB side) should point up.  If I do that I cannot see the LEDs.  Is this an issue?  Will the calibration procedure take care of both mags?

I still don't understand the trim comment.  The throttle goes from 0% to 100%.  100% makes it go up, fast.  0% makes the motors shut off.  25% makes the quad go up but not as fast, so somewhere between 0 and 25 will hover.  Will I have to find the sweet spot every time I want it to hover?  How can that be possible if I can't see the quad?   Can I define that 50% is hover with 100% up max and 0% off?


Ed
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 20, 2019, 09:17:39 pm
How do I know which AuxMagOrientation I have it at?
Generally, any GPS that has a mag built in will have an arrow that points forward.  With that, OpenPilot Platinum, and DJI Naza GPS/mag use 0,0,0 mag orientation setup.  Others have an I2C aux mag that must be set 0,180,0 or 180,0,180.

I saw somewhere that said the antenna side (not the PCB side) should point up.  If I do that I cannot see the LEDs.  Is this an issue?
That's right (ceramic antenna up).  The square ceramic antenna is mounted facing the sky.  There are LEDs on the FC that tell you more than GPS LEDs.  To arm (besides setup), the default is that you must have 7 or more sats, the GPS PDOP must be a good value, and the mag must be green.

Will the calibration procedure take care of both mags?
Yes, but generally an aux/external mag is more accurate than the onboard mag, so I don't let it dilute the good external readings with less accurate onboard readings.

I still don't understand the trim comment.  The throttle goes from 0% to 100%.  100% makes it go up, fast.  0% makes the motors shut off.  25% makes the quad go up but not as fast, so somewhere between 0 and 25 will hover.
All of the non-switch arming settings use zero throttle and another flight control too.  If you trim the throttle so that low stick doesn't go to zero throttle, then you won't be able to arm.  Likewise if you trim e.g. yaw, it won't see full yaw in one direction and if that is your arming direction, it won't arm.  Throttle must really be zero, but as I recall, the other channel doesn't have to be 100%.  It is less than 100%, so it would need a lot of trim or dual rates on low rate to keep from arming.

Will I have to find the sweet spot every time I want it to hover?  How can that be possible if I can't see the quad?   Can I define that 50% is hover with 100% up max and 0% off?
With Manual thrust mode you can't maintain an exact altitude without seeing it.  Even the difference between fully charged battery and lower battery changes the hover throttle stick position.  There are thrust modes that use the barometer to maintain altitude.  AltitudeHold does the obvious thing, except that zero throttle stops the motors (a safety feature).  AltitudeVario has 50% throttle doing AltitudeHold (it has hysteresis, so it's actually 40% to 60% stick).  AV has 100% throttle stick doing a slow (baro controlled) climb, and 1% throttle doing a slow descent.  0% stops the motors.

Take off in Manual thrust mode and switch to AV in the air.  I wouldn't bother with AH.

25% throttle hover? !!!  That is either a very powerful quad, or it is mis-propped, mis-calibrated, or mis-configured?
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 21, 2019, 05:29:42 pm
It was designed to carry a gimbal and camera which are not installed yet.  This makes the quad really light for now.  I also designed it with a larger battery then I am testing with so that also adds to the weight issue.

Testing last night yielded better results.  I calibrated the mags again and Aux mag showed up and it is reading. I switch the system over to Aux only and it looks really good on the flight display, level in x and y directions.  It looks close on the compass heading but I did not check it precisely.  I will tonight and make sure I have the orientation.  My particular GPS does not have an arrow indicating forward but clones/originals do so will use that.  I assume it should point to the front and be level.

I got it off the ground in the basic GPS mode and it would reasonably hover but was drifting quite a bit.  When I switched it to IN13 it wants to tip on lift off.  It does this even if I try to hop it up.  The more power to the hop the faster it tips.  I keep reviewing the Fix a flip and start up list. 
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 21, 2019, 07:56:46 pm
I recommend that you set transmitter trims back to the center (where you had them when you ran transmitter setup) (and leave them there) and adjust some settings until it shows level in GCS "Flight Data" to get it safer to fly before flying it.  You could adjust Attitude->Settings->RotateVirtual..., but if you get it level in INS13 (AttiEstAlgo) then it will fly off the other way in Basic.  :(

INS13 uses mag for compass heading AND FOR LEVELING.  Basic does not use the mag at all.  The problem is with the mag sensor alignment and world magnetic model causing INS13 to be a little out of level.  The following tells you how to adjust Attitude->Magnetometer->AuxMagOrientation so that your perfect Basic stays perfect because you adjust the mag orientation compensation angles to get INS13 hovering right.  First, in Basic AttiEstAlgo / Attitude flight mode, you get it to hover without drifting by adjusting RotateVirtual, then in INS13 AttiEstAlgo / Attitude flight mode you get it to hover without drift by adjusting AuxMagOrientation.  Be aware that Attitude->Magnetometer->MagUsage needs to be set to AuxOnly.

https://librepilot.atlassian.net/wiki/spaces/LPDOC/pages/18382863/Aux+Mag+Setup+and+Calibration
in the section titled "Fine Tuning Your Hover To Stop Drift (Not Required)"
Title: Re: Setting up for first flight.
Post by: Stardaddyed on May 28, 2019, 10:32:11 pm
I was so close! 

Over the holiday weekend I had a bunch to do around the house but finally got the drone out last night.  Got it up in the air and was able to control its height OK.  I had read the article on auto-tuning and got that going and it worked.  Took about a minute for the quad to stop shacking but then is actuall stayed were I left it, at least horizontally.  Then I managed to land it without crashing it.  I was stoked!

Decided to take off and got it up to about 10 feet when all of a sudden it looked like it blew apart and fell like a rock.  I thing what happened is that I lost a propeller nuts and then threw a prop.  Didn't find the nut but found the prop un-broken. The drone fell straight down on the arm without a prop and broke the motor mount off.  Crap.  The problem is that darn things are only available from China or Hong Kong.  I may have to cluge something together. 

There was that one shining moment in the sun....

Question?  where is the setting to limit the amount of tilt the vehicle can go?  I couldn't find it.  Also is there a description of all the setting on the configuration tab?

Ed
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on May 28, 2019, 11:02:02 pm
The drone fell straight down on the arm without a prop and broke the motor mount off.  Crap.  The problem is that darn things are only available from China or Hong Kong.  I may have to cluge something together. 
I have successfully used super glue.  First remove the motor and other things in the area.  Glue it and let it dry thoroughly.  Kicker makes it dry faster if you have some.  Then use super glue to glue some popsicle stick pieces as splints across the crack in a way that doesn't interfere with anything (like bolting the motor back on).  Or even better, use some fibreglass cloth with super glue (it's tricky though).  The repair is not as strong as the original, but it is strong enough to fly if you don't land too hard.  I would let it dry overnight before flying it.

Balance all your props!  That may be why it came apart in the first place, and smooth props are definitely less stress on the weakened frame.

Question?  where is the setting to limit the amount of tilt the vehicle can go?  I couldn't find it.  Also is there a description of all the setting on the configuration tab?
On the Stabilization page, there is a slider called Attitude and the default value is 55 (degrees for max bank angle when using full stick).  This value is only used in Attitude mode.
Title: Re: Setting up for first flight.
Post by: Stardaddyed on August 06, 2019, 09:58:18 pm
Haven't updated in a long time so I thought I should.

The drone has lifted off the ground!  Enough that I was able to do the autotune and this has helped.  I also converted the throttle to auto-centering.

There is significant drift that I have worked on, and it is better.  The thing is when it goes bad, it goes bad FAST and HARD!  When in the rate mode what is a conservative max bank angle.  I am inclined to put in 1 but that may be a little low  ::)  maybe 5-10 to start with?

I redid my calculations on the design and without the weight of the camera equipment the drone is seriously over powered.  I need to add about 300g of extra weigh to put it in line with the design. I have to figure out how to do that without using the expensive camera and gimble.  I also had a 5500mAh battery and I am actually using a 2500mAh, the weight difference is significant.  The result is that the power to weight ratio is pegged.  I assume this makes the a little touchy, hence the going bad fast behavior. 

Ed
Title: Re: Setting up for first flight.
Post by: TheOtherCliff on August 07, 2019, 05:55:47 am
I also converted the throttle to auto-centering.
Personally, I think that may be more hassle and danger than it is worth.  FYI: All aLtitude helping modes (e.g. ALtitude Hold, ALtitude Vario, VelocityRoam, etc.) have a 20% deadband (+-10%) in the middle of the throttle stick so it is not hard to get it to stay at a fixed altitude, and when you are in that deadband it will not (should not) move (up or down) and doesn't need any kind of trimming.  It is as if you are using ALtitude Hold; the code is the same.  On the other hand, you must have low throttle for arming, and simply releasing the stick could cause it to go to half power, which you already say is very powerful.....

I would use a normal throttle (no spring) and get it flying and working well in ATitude mode with Manual thrust mode before advancing to any of the ALtitude Hold (baro helper) type of thrust modes.  It's hard to debug a fancy flight mode when you don't even know if the basic functions it relies on are working...

When in the rate mode what is a conservative max bank angle.  I am inclined to put in 1 but that may be a little low  ::)  maybe 5-10 to start with?
Rate mode is not self leveling.  It is entirely about roll rate.  The bank angle stays what it was when you centered the stick.  That can be banked 90 degrees or completely upside down.  ATtitude mode is self leveling.  The default max angle (Stabilization -> ATtitude) for that is 55 (degrees).  You can certainly reduce that, but be aware that you are reducing your braking then too.  I don't believe it is really necessary to reduce it for a beginner, it's not hard to learn to avoid slamming the sticks.  :)

Is it possible that you were expecting Rate mode to automatically level it out for you?  Is that your main problem?

I redid my calculations on the design and without the weight of the camera equipment the drone is seriously over powered.  I need to add about 300g of extra weigh to put it in line with the design. ... The result is that the power to weight ratio is pegged.  I assume this makes the a little touchy, hence the going bad fast behavior. 
Removing weight will not destabilize the PIDs.  Adding weight above where it was when you tuned it will a little.  You may see a little oscillation.  I have never seen it too bad in this case.  A wobbly mounted camera or battery can also cause oscillations.  These can be a bit worse.  The fix for a wobbly camera gimbal may be to reduce the PIDs a bit.  It will fly mushy a bit, but it won't oscillate.

Could you describe or link a video to show what it does when it "goes bad"?  I can tell you that vibration is a bad enemy.  Balance your props.  Make sure (somehow) that it doesn't vibrate at any throttle setting (especially at any high power level).  Vibration makes both the gyros and accels go crazy.  Both of these can cause it to go very unlevel anywhere from quickly to slowly.

There is an issue that I call invisible oscillations (D-term oscillations).  You don't see them because they are very small and very fast, but what happens is that the commands go from (say) full left roll to full right roll many times a second, but the result is that it is level.  The piece you see, especially with a high powered quad, is caused because you are only asking for say 20% power and to give full left you get 100% in the right motors and 0% in the left motors (50% average power), then it quickly switches to 100% left and 0% right.  What you get is an average of 50% on all motors as soon as you add any power.  If 50% power makes it climb like a rocket, then what you get is that it climbs like a rocket any time you go above zero throttle.  The fix is to remove all D term in your PIDs.  Generally you want to reduce P and I a bit (times .75 say?) then too.  If you have AutoTune set up, you can just set Settings->SystemIdentSettings->DerivativeFactor to 0 and press the red up arrow to Save, then re-export (no need to fly tuning flight again) your AT based PIDs and it will do this for you.  To re-export, you just switch your Flight Mode Switch into AT and back out to some other mode, quickly, three times (six clicks) (doesn't have to be armed).  Thus you must of course have AT on your FMS.  :)  And you must reboot the FC after putting AT on the FMS for AT to initialize correctly.  You must power the quad with a flight battery for the RC receiver to get power to see the transmitter FMS.  It is best to check the PIDs before and after to make sure they change. or you can watch it happen with GCS connected to FC with USB.