ptbh

  • *
  • 22
Re: Weird Magnetometer readings
« Reply #15 on: February 20, 2016, 06:49:27 pm »
Thanks for the instructions on how to use an auxiliary mag.  I am currently using S-Bus on the Main port for my receiver connection and GPS on the Flexi port.  In order to use an auxiliary mag it looks like I am going to have to use the Flexi-IO port for my RX connection and revert to PWM/PPM.  Is there a way I could stick with S-Bus whilst still using an auxiliary mag or is this out of the question?

aa8mc

  • **
  • 50
Re: Weird Magnetometer readings
« Reply #16 on: February 21, 2016, 06:18:50 am »
@theothercliff Thanks for the massive amount of info.  I was able to get good attitude readings from the mag simply by setting the pitch to 180 on the board rotation as suggested.  Haven't put it in the air yet but hopefully tomorrow.  We'll see, they are calling for rain but maybe I can find a window.  In any case I hit full throttle for a few seconds with the props and the artificial horizon was rock solid, so I think I'm probably in business.  I'll report back with flight test results tomorrow hopefully.
F450 Quad Clone
Outrunner1000KV Motors
HobbyWing FlyFun 30A ESCs
1045 Props
Telemetry via OP Link
FlySky FS-i6 transmitter w/ 10 channel mod
Sparky2 Flight controller
HobbyAce UBLOX 6M GPS
Running LibrePilot next branch
MinimOSD
FlySight Spexman FPV Goggles
Floureon 5500mAh LiPos

Mateusz

  • *
  • 808
Re: Weird Magnetometer readings
« Reply #17 on: February 21, 2016, 09:04:24 am »
Thanks for the instructions on how to use an auxiliary mag.  I am currently using S-Bus on the Main port for my receiver connection and GPS on the Flexi port.  In order to use an auxiliary mag it looks like I am going to have to use the Flexi-IO port for my RX connection and revert to PWM/PPM.  Is there a way I could stick with S-Bus whilst still using an auxiliary mag or is this out of the question?

Cliff's work on DJI GPS has been merged with parent repository already "LP-212 DJI GPSMag support". That means "next" development branch supports DJI Naza compatible GPS. Those send mag+GPS data over single serial line. Meaning you just would use one port. That means it will be available with next release.

If you already have such a GPS around and are eager to try new feature you can try compiling "next". Of course development branch most of time compiles just fine and works just fine, but if not then something needs to be fixed. I don't mind flying development code, but some people prefer stable releases which are more tested. I haven't tested that DJI GPS code, but some devs acquired those GPS units recently.

There is some information how to compile LibrePilot for Linux
https://librepilot.atlassian.net/wiki/display/LPDOC/Linux+-+Building+and+Packaging

Also LP is currently getting OpenSceneGraph which should already be working nicely, though I remember I had to create a file in the top cloned directory.
"echo override GCS_EXTRA_CONF=osg osgearth copy_osg > config"

ptbh

  • *
  • 22
Re: Weird Magnetometer readings
« Reply #18 on: February 21, 2016, 07:29:59 pm »
Thanks Mateusz for advising that the next release will support DJI Naza compatible GPS receivers which send mag+GPS data over a single serial line. Thanks too Cliff for your work to provide this feature which will allow me to retain the use of S-Bus with an aux mag on my Revolution.  I have just ordered a uBlox M8N DJI Naze compatible receiver from China.  Hopefully it should be here in the next 3 weeks.  If the new release is out by then, great, but if not I may look to have a go at compiling, so thanks for the info on this Mateusz.

Re: Weird Magnetometer readings
« Reply #19 on: February 21, 2016, 07:53:41 pm »
@theothercliff Thanks for the massive amount of info.  I was able to get good attitude readings from the mag simply by setting the pitch to 180 on the board rotation as suggested.  Haven't put it in the air yet but hopefully tomorrow.  We'll see, they are calling for rain but maybe I can find a window.  In any case I hit full throttle for a few seconds with the props and the artificial horizon was rock solid, so I think I'm probably in business.  I'll report back with flight test results tomorrow hopefully.

Glad to hear it!

Sorry to say that on Revo, S.Bus requires MainPort, and aux mag requires FlexiPort, leaving no place to connect GPS.  Sparky 2 controller can do this, (because S.Bus goes on RcvrPort and/or aux mag can go on I2CPort) but not Revo.  I will open a change request to see if GPS can be put on FlexiIO on Revo.

ptbh

  • *
  • 22
Re: Weird Magnetometer readings
« Reply #20 on: February 21, 2016, 11:39:42 pm »
Thanks TheOtherCliff for opening a change request to see if GPS can be added as an option for the Flexi-IO port on Revo.  From a quick look at the Revo schematic and STM32F405RG datasheet, it would appear pins 7 and 8 of the Flexi-IO port could be configured as UART TX and RX.  So, from a hardware perspective it looks feasible.  It may also be worth considering S-Bus as an option on the Flexi-IO port too to keep all of the receiver options (PWM/PPM/S-Bus) on the one port.  In that way, those with a GPS receiver with separate I2C mag can use the Main and Flexi ports.  The below info is what I pulled together looking into this:

CONN2 (Flexi-IO Port) Pin 7 - U4 Pin 37 (PC6/USART6_TX)
CONN2 (Flexi-IO Port) Pin 8 - U4 Pin 38 (PC7/USART6_RX)

CONN1 (Flexi Port) Pin 3 - U4 Pin 29 (PB10/I2C2_SCL/USART3_TX)
CONN1 (Flexi Port) Pin 4 - U4 Pin 30 (PB11/I2C2_SDA/USART3_RX)

CONN4 (Main Port) Pin 3 - U4 Pin 42 (PA9/USART1_TX)
CONN4 (Main Port) Pin 4 - U4 Pin 43 (PA10/USART1_RX)

aa8mc

  • **
  • 50
Weird Magnetometer readings
« Reply #21 on: February 22, 2016, 05:00:20 am »
Finally in the air and ran a good hover test.  Very pleased.  Perfect timing because the next phase (FPV) is supposed to be delivered tomorrow.  Thanks again everyone!
F450 Quad Clone
Outrunner1000KV Motors
HobbyWing FlyFun 30A ESCs
1045 Props
Telemetry via OP Link
FlySky FS-i6 transmitter w/ 10 channel mod
Sparky2 Flight controller
HobbyAce UBLOX 6M GPS
Running LibrePilot next branch
MinimOSD
FlySight Spexman FPV Goggles
Floureon 5500mAh LiPos

Re: Weird Magnetometer readings
« Reply #22 on: March 02, 2016, 11:09:29 pm »
SBus can ONLY run on MainPort because there is a hardware inverter only on MainPort.

ptbh

  • *
  • 22
Re: Weird Magnetometer readings
« Reply #23 on: March 03, 2016, 11:22:02 pm »
Ah yes, there is indeed an XOR on the UART1 RX line of the main port, the other input pin of the XOR being tied to an IO pin to allow inversion to be turned on or off.  So, S-Bus requires that the RX signal be inverted and the reason it has to be on the main port.  In that case, why not provide the option of connecting GPS to UART6 on the Flexi IO port.  That would allow those wanting to use S-Bus to connect their receiver to the main port, the I2C magnetometer to the Flexi port, and the GPS receiver to the Flexi IO port.  Just a thought.  There may be a reason why this is not possible?

Further edit: Cliff, I see this request (GPS on Flexi IO port) was added to the issues list for Revo on 21 Feb 2016, thank you.  Let's hope it can be included in the next release.
« Last Edit: March 06, 2016, 08:13:04 pm by ptbh »

Re: Weird Magnetometer readings
« Reply #24 on: March 11, 2016, 08:02:23 am »
Hi Guys

I am having the exact same issue as the first post in the thread, is there a simple solution to fix this rather than adding a external mag?

I must have calibrated my internal mag at least 10 times trying to make my drone work with position hold and get INS13 working but all my sensors fail as described in the first post.

I have compared the Revo compass to my Iphone and Samsung S5 and its way off!!! no matter how many times i re-calibrate it.


I purchased my Revo from Banggood, with the M8N GPS   

http://www.banggood.com/OpenPiolot-CC3D-Revolution-Flight-Controller-Oplink-M8N-GPS-Distribution-Board-p-1000084.html 

Any help would be greatly appreciated

aa8mc

  • **
  • 50
Re: Weird Magnetometer readings
« Reply #25 on: March 11, 2016, 02:25:58 pm »
Are you experiencing issues all the time or only under throttle?
F450 Quad Clone
Outrunner1000KV Motors
HobbyWing FlyFun 30A ESCs
1045 Props
Telemetry via OP Link
FlySky FS-i6 transmitter w/ 10 channel mod
Sparky2 Flight controller
HobbyAce UBLOX 6M GPS
Running LibrePilot next branch
MinimOSD
FlySight Spexman FPV Goggles
Floureon 5500mAh LiPos

Re: Weird Magnetometer readings
« Reply #26 on: March 12, 2016, 12:45:59 am »
Are you experiencing issues all the time or only under throttle?

All the time when I turn on INS13



Basically No matter how many time i re-calibrate the Mag, i still get the same result when I turn on INS13. Screenshots included as attachments, this error stops me from arming the drone.

My location is Australia

I even took my drone out to a large open area with no magnetic or electrical interference and I still get the same result 



Edit

Today I went and picked up a HCM5883L External mag and connected it to the flex port and configured it to I2C and that still does not work, even after following the txt document I still don't see any values.

This revo is incredibly close to going back to banggood 


Edit 2


I managed to get it to arm in INS13

But it will not fly, drone just lifts up and rolls over into the grass. Included is a screen shot of the test flight
« Last Edit: March 12, 2016, 11:57:23 am by ShanetrainST »

Re: Weird Magnetometer readings
« Reply #27 on: March 12, 2016, 01:29:25 pm »
So I have been reading and reading the forum looking for answers to how I can fix my drone, looks like I have to wait for 16.01 for external mag support as my on-board has problems that I cannot fix.

Would it be possible to add HCM5883L MAG into the 16.01 release?


 

f5soh

  • *****
  • 4572
    • LibrePilot
Re: Weird Magnetometer readings
« Reply #28 on: March 12, 2016, 01:37:18 pm »
External is already included and working using the "next" branch.

Maybe you can setup you build environment and build by yourself ?
https://librepilot.atlassian.net/wiki/display/LPDOC/Mac+-+Building+and+Packaging

Re: Weird Magnetometer readings
« Reply #29 on: March 12, 2016, 02:41:35 pm »
Thanks for that, in terminal now copying,pasting,downloading and hopefully later on building  :)

Is there anyway the main site could host unstable/beta releases in pre-built dmg format? that would super helpful