Mathias
  • Male
  • Meridian, ID
  • United States
Share Twitter

Mathias's Friends

  • Navigator
  • shane rodney pitt
  • Jason Dorie
  • Greg Glenn
  • Chris McNair
  • William Premerlani

Mathias's Discussions

Propeller DCM code

Started this discussion. Last reply by William Premerlani Jan 25. 12 Replies

Fuel measurement

Started this discussion. Last reply by Lew Payne May 3, 2010. 6 Replies

Magnetometer math

Started this discussion. Last reply by Navigator Jan 24. 6 Replies

 

Mathias's Page

Latest Activity


Developer
William Premerlani replied to Mathias's discussion Propeller DCM code
"Hi Navigator, Most of the theory of using rotation matrices in MatrixPilot is explained here. There are two fundamental concepts: 1. The rotation matrix can be used to transform vectors between body and earth frame of reference. 2. Reference vectors…"
Jan 25
Bot Thoughts replied to Mathias's discussion Propeller DCM code
"It turns out that after calculating error, the rest of the code is intended to automatically null out the magnetometer offsets. "Note that the yaw compensation takes only six lines, it is a lot easier to do in terms of direction cosines than it…"
Jan 24
Navigator replied to Mathias's discussion Magnetometer math
"hi, what i understand from DCMdraft2 is that to get orientation vector direct from DCM matrix is to use rmat[6] for pitch(dot product of roll axis(first column) with ground vertical[0 0 1]), rmat[7] for roll(dot product of pitch axis with ground…"
Jan 24
Navigator replied to Mathias's discussion Magnetometer math
"Hi Mathias, I am also using DCM to get correct orientation in a  smartphone application, Can you plz tell me how I can get the orientataion (three angles , yaw pitch roll) directly from DCM matrix, as if I calculate orientation using Euler…"
Jan 24
Bot Thoughts replied to Mathias's discussion Propeller DCM code
"I wished I'd done/understood more linear algebra. I've been spending a lot of time with this algorithm and code variants lately. If it helps, in MatrixPilot 3.2.1 (the version I've been staring at for hours on end), there's a…"
Jan 24
Navigator replied to Mathias's discussion Propeller DCM code
"Hi Bill, I am still waiting for some response from you, Can you please a little bit explain that how I can represents the orientation using and angle and rotation axis instead of Euler angles. (Sorry I am not so good at Math) regards navigator"
Jan 24
Navigator replied to Mathias's discussion Propeller DCM code
"Hi Bill, Thank you very much for your explanation, Now I understand where is the problem (gimbal Lock), I have gone through IMUdraft2.pdf, but I could not understand properly how I can use an angle and rotation axis representation to find the three…"
Jan 23

Developer
William Premerlani replied to Mathias's discussion Propeller DCM code
"Hi Navigator, There are two related problems that you might be running into: 1. If you are treating the magnetometer as a tilt compensated compass, it will not work for pitch values near 90 degrees. A better way to do it is to use the magnetometer…"
Jan 22

Profile Information

About Me:
Mechanical engineering professor at Boise State University!

Mathias's Photos

Loading…
  • Add Photos
  • View All

Comment Wall (5 comments)

At 5:43pm on September 1, 2009, Jay Kickliter said…
I did a re-implementation of the Kalman filter object that was floating around the Propeller forum, entirely in PASM. I have to admit, I'm not a mathematician, so it might not have been a good algorithim to begin with. But, I was able to fit it all into 2 cogs. I may be able to help you implement DCM in PASM, if you're interested. I'd need some guidance with the math. This is something I've been meaning to do for a while now anyway.

One question, is it absolutely necessary to use FP? I guess for getting something working quickly it would be good. But if it is possible to use fixed-point I could probably fit it into one cog including the sensor readings. Especially since that would allow the use of CORDIC for a lot of the trig.
At 2:26pm on September 2, 2009, Mathias said…
This sounds like it could be a fun project! I am very new to the whole propeller architecture and could definitely use some assistance getting this up and running. I did switch to integer math and managed to increase the clock frequency from 25Hz to 320Hz. Which is great, but I'm also being stubborn in wanting to stick with FP operations... (I imagine that I will eventually cave and just do Integer math..) Let me know what we can do to move this forward!

-Matt
At 5:15pm on September 2, 2009, Jay Kickliter said…
I won't have a huge amount of time to work on this, but I'd like to help if I can, since it would be mutually beneficial. I don't see an obvious way to direct email on here, so send me an email at my full name at gmail. I've been working on an unique Propeller-based UAV board, which you might find interesting.
At 3:35pm on April 13, 2011, Jason Dorie said…

I realize I'm kinda late to the party, but I've posted a first draft of DCM code on the Prop, coded mostly for readability.  I'm giving some semi-serious thought to implementing it in PASM instead of Spin, but I'm going to time it first to see if it's really necessary.  At present it runs at 200hz without problems.  I've posted code for it over at the Parallax forums, along with a C# visualization app that includes an implementation on the PC side to make it easier to debug.  Thought it might be useful for you guys if you're not already light years ahead of me.  :)

 

At 4:47pm on April 13, 2011, Jason Dorie said…

Thanks, Mathias - The code would be great.  I haven't decided exactly what I'm going to do yet, though I'm shooting for "augmented flight", not autonomous.  The previous version was very stable, but couldn't self-level, which I think is all I'm going for at the moment.  I want to be able to park it nice & high and be confident that if I lose orientation that I can just let go of the controls and have it level itself.


The current code is really simple, but I was hoping to produce something clean enough for others to use as a starting point.


Something else in that code that might be of use to you is the reader for the ITG-3200 and ADXL345 - It's all PASM on a single cog, does temperature drift compensation for the gyro, and there's a decent amount of room to spare.  I was thinking of trying to put the entire DCM estimator in the same cog, though I'm not sure if it's going to be small enough.

 

I'll have to have a look at FlightGear - I never really considered trying the algorithm inside a sim.  So far it's been more "fire it up and hope it works" after a decent amount of testing on the ground.  :)

You need to be a member of DIY Drones to add comments!

Join DIY Drones

 
 
 

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The third round was a reliablilty/aerial photography round for both planes and copters, which is now closed. Stay tuned for the next round, beginning soon.

A list of all T3 contests is here

 

© 2012   Created by Chris Anderson.

Badges  |  Report an Issue  |  Terms of Service