ArduPilot Basics for Dummies

Hi Guys,

 

This is my first post in this forum, but I have been reading on you progress for awhile now.

WOW! looks like you guys achieved so much with minimal HW and processing power.

 

A couple of month ago I finished a self balancing robot project (written on a PIC18). I proudly donated it to a local children science museum...where it will be treated nicely.As I am into RC planes for the past 20 and some years, I feel this a good time to take my programming skills to the next level with an auto pilot project. I am an analog hardware engineer dealing with power electronics but do have more than adequate programming skills. My drawback is my rusty linear algebra, as I am 12 years out of university...what I don't use daily I tend to forget. 

 

I read Williams and Paul's paper and after some linear algebra refresh I could understand the concept pretty well. Going over the arduino code I came across some things I could not understand.

I hope you can help me get things sorted out.

 

1- I would like to make sure that I understood the basic flow of data:

  

    - Take gyro data at regular intervals and integrate it to get the three angles

    - Take periodic accelerometer data and correct gyro roll & pitch drift with  

       the complementary filter

    - Take periodic magnetometer data to correct gyro yaw drift with complementary filter

    - Normalize the matrix.

    - use the roll/pitch/yaw rotation matrices to get the three angles as seen by earth coordinate system.

    - use a PI feedback to correct the errors

 

2- can you please elaborate on how the DCM matrix elements are orginized (yes.. the post title was for dummies)

 

3- Is the gyro data integrated once or twice to get an angle?

 

I am sure more questions will pop up, but I think this is enough for now.

Sorry for my lousy english.

 

Any help will be appreciated.

 

Thanks,

S.B.D

 

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • You lost me at 1!
    Lol it would be great if this could be simplified a bit. Or maybe point me to a book or something. I really want to know what exactly i'm building and the mention of gyros,accelerometers and linear algebra has got me interested! Best of luck with your project!
    Ali
  • You may have titled this "ArduPilot Basics for Dummies" but as a total n00b it is way over my head. I have been dabbling in RC aerial photography but always with manually controlled aircraft. I was thinking of building something like the "Skywalker" airframe with a minimal autonomous capability. Here is what I had in mind. I like to use point-and-shoot Canons running the CHDK software with an intervalometer script. That eliminates any shutter controls. I just put in fresh batteries, a clean memory card, start the camera and then launch the aircraft of the kite if I am doing kite aerial photography. I believe in the KISS principle and this is what I have boiled it down to over the years. Now I envision another level of complexity but something far simpler than most of the systems discussed on this forum.

    I would like to launch my plane, climb to altitude with the cameras shooting using the intervalometer script but then be able to trigger the system so that the plane would "loiter" at an altitude while navigating along a few waypoints. I envision setting the waypoints and altitude to describe a holding pattern at the proper distance and orientation from the photo target. When the photo mission has flown for a sufficient time to fill the memory card with photos I would then take control and land the plane. My proposed use of this technology would be as simple as i could make it.

    Any comments? Should I start a new thread for this discussion?
  • Developer
    Hi SBD,

    I can't say that your questions are really clear, but I'll try to answer....

    1 - you probably understand the flow, but to make sure just look at the ArduIMU code.

    2 - you can organize the DCM elements in a variety of ways in software. In ArduIMU they are stored as a two dimensional array, with the first index being the row of the matrix and the second being the column.

    3 - when you talk about the gyro data being integrated make sure that you understand you cannot directly and separately integrate the three gyro signals to get three angles. You must combine the gyro signals, and this is why the DCM matrix is used. Each update of the DCM matrix involved one integration step of the gyro signals. Angles are then computed from the elements of the DCM matrix.
This reply was deleted.

Activity

Neville Rodrigues liked Neville Rodrigues's profile
Jun 30
Santiago Perez liked Santiago Perez's profile
Jun 21
More…