darkdave

  • ***
  • 152
Return to base/home testing as fail safe
« on: May 14, 2016, 09:48:57 am »
I finally got Return to Home Working!

I used the following Fusion setting: Complimentary + Mag + GPS

Is the above setting correct for my setup? My setup is an external GPS and Mag.
Does the "Mag" in the above setting mean external or internal(complimentary mag) mag?

Should I have chosen INSGPS instead? Why or why not?

I have 3 flight modes.

              System Channel
Mode 1 = 0 = Stabalize 2
Mode 2 = 1 = Stabalize 3
Mode 3 = 2 = Return to Home

Is the above correct? I told the system settings to use channel 2 as a fail safe mode.

When I turned off my controller to test the fail safe it fell straight down and whack!

Should I have told the system that Channel 3 is the fail safe channel?

Also do I need to set the Manual Setting-> Fail Safe -> Throttle = above zero?
At the moment it is set to -1.

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Return to base/home testing as fail safe
« Reply #1 on: May 14, 2016, 10:40:56 am »
I don't understand the "failsafe channel"
There is a flight mode position while the vehicle is in failsafe mode.

Complemetary+Mag+Gps is fine as well, if not, you cannot arm because bad config at some point.

Go to Attitude > Magnetometer and set the Mag usage you want, should be "AuxOnly" if you have a AuxMag setup.

When a "auto mode" is engaged the Throttle has no effect.

darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #2 on: May 14, 2016, 11:23:41 am »
Check attached photos. I want my mode 3 to be failsafe.
Should I set the setting to 2 or 3?

Im asking because there is a setting 0.
Im wondering if there is a -1 off set
So maybe mode 1 = 0? or 1?

Also you didnt answer my question about the meaning of MAG in complimentary + MAG + GPS

+MAG means external mag?
if so does that mean complimentary = acccelerometers, gyros, barometers and internal mag compass?

And what is this INS thing? Why not just call it GPS? whats the difference between GPS and INS?

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Return to base/home testing as fail safe
« Reply #3 on: May 14, 2016, 12:34:30 pm »
Quote
Also you didnt answer my question about the meaning of MAG in complimentary + MAG + GPS

Looks like you have so many questions/threads you miss some answers:
https://forum.librepilot.org/index.php?topic=688.msg11695#msg11695

Quote
And what is this INS thing?

INS13 is related to the fusion algorithm used.

Quote
Why not just call it GPS?
No, GPS is a sensor

Quote
whats the difference between GPS and INS?
https://librepilot.atlassian.net/wiki/display/LPDOC/INS13+-+GPS+Navigation

For flight mode number, you already do the "mapping" in your previous post.

Quote
+MAG means external mag?
Complementary+Mag do not refers to the mag location.
If you use Mag, whatever the fusion algorithm used:
Go to Attitude > Magnetometer and set the Mag usage you want, should be "AuxOnly" if you have a AuxMag setup.

darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #4 on: May 15, 2016, 06:14:37 am »
Look in the 3 screen shots I posted here:

1. Can you please explain what each of these settings do? Because some of them seem redundant. Why is there a listing for +MAG when there is already an internal Mag compass in the flight board?
Also if INS13 is an algorithm involving the use of acceleromters and gyros, isnt that the same as "Complimentary (Basic)"?

Why is it listed again as: INS13(indoor)? What's the difference between INS13(indoor) and Complimentary(Basic)?

And then why is it listed yet again as: INS13(GPS)?
As you can see the last one seems not to make any sense at all if what you say is true that INS13 is not GPS.

What does INS stand for? I cant find the answer on a search engine.

2. I went to where you told me to go: Configuration->Attitude: but no setting to set it to Aux Only.

3. Or were you talking about system settings->AuxMag? If so what should I do here?

So INS is fusion algorithm and not a hardware? Yes?
« Last Edit: May 15, 2016, 10:10:02 am by darkdave »

darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #5 on: May 15, 2016, 10:16:32 am »
Thanks for those links, really helpful.

What I don't get is this contradiction:

INS = Inertial Navigation System.

Librepilot documentation on their INS13: "This complementary filter however gets skewed by centripetal forces (aka when flying in circles for a longer time) and it can not calculate speed and position."

Ref: https://forum.librepilot.org/index.php?topic=1607.0

CAN NOT calculate speed and POSITION.

How is this a navigation system if it CANNOT calculate POSITION?

Especially in this mode: "INS13INDOOR"

Normally I would just experiment but my drone is smashed and have to wait for money to buy a new one.
« Last Edit: May 15, 2016, 10:32:47 am by darkdave »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Return to base/home testing as fail safe
« Reply #6 on: May 15, 2016, 10:56:39 am »
CAN NOT calculate speed and POSITION.
How is this a navigation system if it CANNOT calculate POSITION?

We are talking about the Complementary in general, this apply to:
Complementary,
Complementary + Mag,
Complementary + Mag + GPS.

So the complementary cannot compute an accurate speed and position if the complementary filter however gets skewed by centripetal forces.
This can occurs when you fly in circles for long time.

Quote
Especially in this mode: "INS13INDOOR"
https://forum.librepilot.org/index.php?topic=688.msg4997#msg4997
INS13Indoor and INS13GPS are the same, they use 13 sensor inputs to compute the position and attitude in 3D space.
The only difference: For INS13Indoor, the 3 GPS position values are fake and do not come from GPS:
1 - Position in space - N (North) axis
2 - Position in space - E (East) axis
3 - Position in space - D (Down) axis
Those are NED values, relative to defined Home, in meters
So INS13Indoor is a INS13/EKF13 that can be used indoor, without GPS.

Quote
2. I went to where you told me to go: Configuration->Attitude: but no setting to set it to Aux Only.

I was assuming you already compiled the Next branch for Auxmag use.
Like others members and me already told you:
https://forum.librepilot.org/index.php?topic=1444.msg10999#msg10999
https://forum.librepilot.org/index.php?topic=1512.msg11066#msg11066
Currently the 15.09 supports external Mag only if you use the OP GPSv9.
More info about AuxMag usage and next is here: https://forum.librepilot.org/index.php?topic=1110.0

Sorry bout the crash but you may simply assume you cannot have a safe setup using onboard Mag and a Qav250, that impossible because component with strong currents are too close and disturb the onboard Mag.
« Last Edit: May 15, 2016, 11:03:45 am by f5soh »

darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #7 on: May 18, 2016, 03:15:23 pm »
Many thanks for your explanation above: very helpful!

Regarding my problems: Actually the problem is too many people here are experts that use acronyms without explaining what they are like as if it's part of laymen's English now.

For example: NEXT. What the hell is "Next"? Is this a version of the Librepilot GCS?

Is it a GPS version? What is it?

Another Acronym I dont get is I2C. Why not just call it AuxMAG? What does it mean I2C? What does the I and the C stand for?

Finally: What's the difference between Complimentary(Basic) and INS13Indoor?

Thanks in advance, Dave the Newbie.
« Last Edit: May 18, 2016, 03:50:18 pm by darkdave »

Mateusz

  • *
  • 808
Re: Return to base/home testing as fail safe
« Reply #8 on: May 18, 2016, 04:06:50 pm »
Actually the problem is too many people here are experts that use acronyms without explaining what they are like as if it's part of laymen's English now.

For example: NEXT. What the hell is "Next"? Is this a version of the Librepilot GCS?

Is it a GPS version? What is it?

In the attachment you have screen shot of searching forum with "next", "what is next" terms. Second hit in both cases.
It is a git branch of that name, which holds development code. Please don't ask that again in another thread.

Another Acronym I dont get is I2C. Why not just call it AuxMAG? What does it mean I2C? What does the I and the C stand for?

You asked the same thing in another thread.
What I2C is, please refer to the first hit http://lmgtfy.com/?q=I2C it will link you to good overview what I2C really is, but it is communication protocol between two devices.
Why it is not called AuxMag is simply because AuxMag is the device itself, and the same device can communicate with flight controller in different languages (protocols).


Finally: What's the difference between Complimentary(Basic) and INS13Indoor?
Please have a look at Wiki https://librepilot.atlassian.net/wiki/display/LPDOC/INS13+-+GPS+Navigation
By applying simple logic, INS31Indoor is the INS31 variant that you can use indoors. So it has all what INS31 has, except for sensors that cannot be used indoors. What those sensors can be ? Hint "clear sky is needed".

Complementary is a simple sensor fusion algorithm designed for low end micro-controllers back in AVR 8bit era. They couldn't handle full statistical model such as EKF.
There are whole lengthy books about it and people study. For the purpose of this post I think good simplification would be to think of EKF as properly sound mathematical model, while Complementary you could consider like approximation (hack). Pros and cons are describe in the above Wiki link I provided.

People put a lot of effort in making this Wiki as complete as possible. Please if you don't know something search it for the terms you are confused. It is likely that your question has already been answered there.

« Last Edit: May 18, 2016, 04:10:18 pm by Mateusz »

darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #9 on: May 18, 2016, 05:08:36 pm »
Link you gave me is broken. The one about I2C.

http://lmgtfy.com/?q=I2C

With a name like "Next" it is hard to determine doing a search in the forum to distinguish threads that are using the words as a word and threads that are using the word as a name.

I still don't get what "Next" is. Is it a version of the librepilot GCS?
Can some one provide the download link for "NEXT"?

Also what is a "git" branch?

I know what INS13 is now but I dont understand how this is different from "Basic Complimentary". And your explanation is focusing on the use of acronyms again instead of laymen words. Ok wait, when you say EKF you mean INS13 right?

I'm going to make a guess:

INS13 is using the complimentary sensors with inertial software to get "fake" GPS positioning and orientation.

Basic Complimentary is just using the basic sensors for orientation stability but without the inertial software so it has no positioning nor orientation data on the map. It's basicly flying blind but staying level.

Correct?

In what situation would one choose to use "Basic complimentary" instead of "INS13"?

Lastly I think this forum and the wiki needs to be linked to a librepilot Glossary Page so that common acronyms can be explained or linked to a relevant page in one page.
« Last Edit: May 18, 2016, 05:45:23 pm by darkdave »

darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #10 on: May 18, 2016, 05:48:00 pm »
No results for "What is Next"

Is it that black cube that Steve Jobs made after he was fired from Apple?

UPDATE:

Ok I did do some more searching, looks like Next is some source code you want us to copy paste into the hardware?

https://librepilot.atlassian.net/wiki/display/LPDOC/Windows+Building+and+Packaging#WindowsBuildingandPackaging-Introduction

Why not just include "NEXT" in the download when people hit "UPDATE" during the vehicle setup wizard? And then flash it into the board. Then it's all done behind the scenes instead of all this code hacking. Not everyone who wants to play with drones are programmers.

Just a thought.
« Last Edit: May 18, 2016, 06:00:31 pm by darkdave »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Return to base/home testing as fail safe
« Reply #11 on: May 18, 2016, 06:19:08 pm »
You should consider the brain is on your side, not the forum search.
Ask the forum with something like that: "Whats the color of the blue car"
What happens ?

Maybe search for "next branch" as keywords.

When i do a search with 'next" word, all answers in first page refers to this thread:
https://forum.librepilot.org/index.php?topic=1110.0

The first wiki link in this thread is https://librepilot.atlassian.net/wiki/display/LPDOC/Developer+Manual
All instructions for next build are here ^^

The next branch refers to the work in progress, this cannot be included with a "update" button, sorry.




darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #12 on: May 18, 2016, 06:28:15 pm »
I dont want to use my internal compass anymore because im convinced its being hit by magnetic fields nearby in the drone power distribution systems. I want to only use my external Mag.

If I want to use the mag compass in my GPS (Neo 6m)

Ive got the GPS in mainport and compass from the GPS casing into Flexiport.

In hardware settings Ive set main port = GPS and Flexiport = I2C

I have to set my fusion to Complimentary + GPS + Mag
Stability configuration to the same above.

Is the above correct?
What else do I need to do?

What do I set my System Settings to? I notice there is an Aux Mag setting... do I need to set the parameters in there to anything specific?

I did search for the forum for "external compass" and "external mag" but couldnt find any useful info except  that it looks like I also have to upgrade my flash software to "NEXT".

UPDATE: Ok did find the link  you supplied informative reading it now but still need to know:

Do I REALLY need "NEXT" to use an external Mag? - Please answer this part, thanks.
« Last Edit: May 18, 2016, 06:34:39 pm by darkdave »

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Return to base/home testing as fail safe
« Reply #13 on: May 18, 2016, 06:35:03 pm »
Do I REALLY need "NEXT" to use an external Mag?

Definitively
15.09 support only external mag from the OP GPSv9.

Here is all the process for AuxMag setup and calibration:



darkdave

  • ***
  • 152
Re: Return to base/home testing as fail safe
« Reply #14 on: May 18, 2016, 06:46:55 pm »
I have an "Operation Timed Out" error in the space where you gave your instructions for installing an external mag.

Is there another way you can post that information here?

Im in China so perhaps its a great firewall of china issue.

I got return to home function working with the external mag plugged into the flexi port set to I2C. But according to you it (the external mag) probably wasnt working(since Im not using "NEXT"). So how did the drone return to home? The fusion setting was complimentary + mag + GPS.

Does that mean the drone was still using the internal mag (less reliable due to interference) + GPS data + complimentary gyro/accel fused with the INS13 software?

Just trying to understand where my drone is at now.

Lastly could you provide me an ebay link to this OP GPSv9 ? I cant seem to find it on ebay and I want to buy it so I can get it to work as an external mag and GPS without the need to hack my board to upgrade it to "NEXT". I want to avoid that kind of hacking as Im not confident with it.