I need help with my Magnetometer

   I just ordered a new Magnometer because mine just got damaged that is what I think. I uploaded the ACM 2.024 thru anduino because I' m having problem connecting to the Planner.  The issue is that when I use command compass in the setup I just get is zeroes. But when I upload com Ap-compass test the Magnetometer is working. Any advice in this issue will be deeply appreciated.

In the Code I commented  #define MAG_ORIENTATION AP_COMPASS_COMPONENTS_DOWN_PINS_FORWARD as my magnetometer is solder to the APM.

setup] compass onCompass----------------------------------------enabledMag Dec: 0.0000Mag offsets: 0.0000, 0.0000, 0.0000
setup] compass offCompass----------------------------------------disabledMag Dec: 0.0000Mag offsets: 0.0000, 0.0000, -161.6956
setup] compass onCompass----------------------------------------enabledMag Dec: 0.0000Mag offsets: 0.0000, 0.0000, -161.6956

 

AP-compass test data

Heading:20.30  (219,-81,-520) offsets(-109.50,40.50,260.00)Heading:18.96  (227,-78,-521) offsets(-113.50,40.50,260.50)Heading:18.96  (227,-78,-522) offsets(-113.50,40.50,261.00)Heading:18.51  (230,-77,-521) offsets(-115.00,40.50,261.00)Heading:19.35  (225,-79,-522) offsets(-115.00,40.50,261.00)Heading:18.89  (228,-78,-527) offsets(-115.00,40.50,263.50)Heading:17.67  (226,-72,-521) offsets(-115.00,40.50,263.50)Heading:19.35  (225,-79,-524) offsets(-115.00,40.50,263.50)Heading:18.66  (225,-76,-518) offsets(-115.00,40.50,263.50)Heading:19.43  (224,-79,-518) offsets(-115.00,40.50,263.50)

 

This is what planner terminal test shows

Heading: 341, XYZ: 223, 73, 523, XYZoff:   0.00,   0.00,   0.00Heading: 342, XYZ: 222, 71, 525, XYZoff:   0.00,   0.00,   0.00Heading: 342, XYZ: 222, 71, 526, XYZoff:   0.00,   0.00,   0.00Heading: 341, XYZ: 215, 71, 527, XYZoff:   0.00,   0.00,   0.00Heading: 342, XYZ: 223, 72, 525, XYZoff:   0.00,   0.00,   0.00Heading: 341, XYZ: 223, 73, 521, XYZoff:   0.00,   0.00,   0.00Heading: 341, XYZ: 220, 74, 528, XYZoff:   0.00,   0.00,   0.00Heading: 342, XYZ: 218, 68, 524, XYZoff:   0.00,   0.00,   0.00Heading: 342, XYZ: 219, 70, 523, XYZoff:   0.00,   0.00,   0.00Heading: 343, XYZ: 225, 66, 530, XYZoff:   0.00,   0.00,   0.00Heading: 343, XYZ: 218, 65, 529, XYZoff:   0.00,   0.00,   0.00Heading: 340, XYZ: 220, 76, 527, XYZoff:   0.00,   0.00,   0.00

 

Anduino CLI test shows

Heading: 358, XYZ: 235, 62, 485, XYZoff:   0.00,   0.00, -161.70Heading: 356, XYZ: 229, 67, 489, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 230, 65, 490, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 231, 64, 490, XYZoff:   0.00,   0.00, -161.70Heading: 358, XYZ: 224, 60, 491, XYZoff:   0.00,   0.00, -161.70Heading: 356, XYZ: 227, 66, 489, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 228, 64, 478, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 230, 63, 492, XYZoff:   0.00,   0.00, -161.70Heading: 358, XYZ: 232, 62, 495, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 229, 64, 491, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 231, 66, 489, XYZoff:   0.00,   0.00, -161.70Heading: 357, XYZ: 231, 62, 492, XYZoff:   0.00,   0.00, -161.70Heading: 358, XYZ: 226, 60, 491, XYZoff:   0.00,   0.00, -161.70

 

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

Join diydrones

Email me when people reply –

Replies

  • 3D Robotics
    Jose, what do you mean you're having trouble connecting with the Planner? Let's sort that out first. If you can't load code with the Planner, it may be indicative of some other problem (probably on your PC side)
This reply was deleted.

Activity