Mark36

  • *
  • 35
Hy all
I Bought this gps DJI NAZA uBlox m8n with mag, as recommended by f5on:
http://www.banggood.com/it/Ublox-M8N-GPS-Compatible-with-DJI-NAZA-Lite-V1-V2-Flight-Controller-Phantom-1-2-Vision-p-991718.html?rmmds=search
i connect to revo in this way:
https://librepilot.atlassian.net/wiki/display/LPDOC/GPS+setup#GPSsetup-NazaGPS
on at "flexi port"
and in attached there are my settings..
I've two question:
1) I dont try already GPS in fly because i've a problem with gimbal, i've have make the "magnetometer calibration" but the gimbal work very bad, watch this video, the gimbal moves jerkily despite the drone is stopped:
https://www.dropbox.com/s/cqu3ed4y7wybgmr/00032.MTS?dl=0
https://www.dropbox.com/s/rie9ry7wqw002pm/00036.MTS?dl=0
There is no way to control the gimbal with the internal mag (while using GPS) saw the auction of GPS swinging "false" the proper stabilization of the gimbal?
2) With this GPS i've only 4 cable, but i see on internet more gps that it have 6 cable (4 for GPS and 2 for Mag), so considering this GPS having only 4 cable we sure MAG and GPS work correcly? It's for this that the written "I2C" does not appear to me in green? is it all right?
3) Often the word "Mag" is in orange .. if it depends on metal on the ground that does not allow me to take off with "GPS Navigation (INS13)" right? and there is no function of librepilot I can change the radio as "Basic complementary" to "GPS Navigation (INS13)" so I may use the second configuration away from magnetic interference allowing take-off and control the drone?

Please if you see some error in my confing tell me how i change this for a good job, thanks so much!

I haven't used gimbal in a long time and can't really help you there.

2) With this GPS i've only 4 cable, but i see on internet more gps that it have 6 cable (4 for GPS and 2 for Mag), so considering this GPS having only 4 cable we sure MAG and GPS work correcly? It's for this that the written "I2C" does not appear to me in green? is it all right?
4 wires is correct for DJI Naza GPS.  Good thing about this GPS is that both GPS data and mag data come over same port and same set of wires.  GPS that has 6 wires needs 2 ports, one for GPS and another for mag.

3) Often the word "Mag" is in orange .. if it depends on metal on the ground that does not allow me to take off with "GPS Navigation (INS13)" right? and there is no function of librepilot I can change the radio as "Basic complementary" to "GPS Navigation (INS13)" so I may use the second configuration away from magnetic interference allowing take-off and control the drone?
Mag should be green most of the time when aircraft is held in hand, above ground, away from metal things, motors stopped.  If not, then the mag calibration is not good and should be done again.  Beware that mag calibration captures data all the time, not just when you press button (six times).  So you must not set aircraft down or close to metal at any time during mag calibration.  Also, I usually increase my telemetry rates to 56k (must be done on Revo and on ground OpLink).

Right now there is no way to have Basic for this flight mode and INS13 for that flight mode.  I always use INS13 and I don't have problems, so you should be able to do that too.  Mags must be calibrated well, ALL high current wire pairs and triples must be twisted (battery to connector, connector to power board, power board to ESC, ESC to motor).  GPS needs to be up on a mast, away from metal and magnets in the model.

Mark36

  • *
  • 35
Goodmorning and many thanks TheOtherCliff
Question 1) ok.. but i use my drone just for the photo shoots, there is none of the other developers LP that can help me for this problem? thanks
I thought I could mount the GPS no longer on a rod, but on something that flex less .. so no oscillations will send the data to the stabilizer will be cleaned.
Question 2) Perfect, very good! so i've two fuction with one port!
Question 3) :
                  question3.1) every time I do the calibration of the mag, use a spirit level as well, but it's really necessary, or can be less precise on this?
                  question3.2) during calibration MAG I read that no matter what the drone is oriented according to bussula, but once fixed one direction then he meets during the procedure, correct?
                  question3.3) Lastly, to bundle cables that you told me, to understand what I have to weave them: all right if they make one turn for every 2 cm ruler?
                  question3.4) This is probably the most important aspect:
MAG calibration should be done away from iron and magnetic fields, and it is often difficult to find a good place to do it .. also because I use the desktop PC and definitely the place is not good, I did the calibration using the terrace a current extension for the desktop PC and it seemed better ..
The best place is in the country?
Since I do not have a notebook, there's another way to do the calibration MAG with a cell phone? because if there is I could go to the countryside to do it .. I've OP-link, but I still have not installed .. and I read that you did a LP-GCS Android, with these components I could do the calibration of MAG smartphone ?


Thanks so much
                   

Mateusz

  • *
  • 808
To fly with autonomous flight-modes you need INS13
  • To considerer using INS13, your aircraft must fly perfect in Complementary which uses just gyro and accel in Stabilized flight modes
  • INS13 uses all sensors, all are required to give good data (gyro, accel, mag, baro, gps) with no exception. If one sensor gives bad data, INS13 won't work well.

Setting that all up needs some understanding what these sensors measure. For example GPS alone has 3-4 meters of error, and special sensor fusion algorithm is needed to improve position estimates. That's why all sensors are needed.

How to calibrate all sensors is described on this https://librepilot.atlassian.net/wiki/display/LPDOC/Sensor+calibration

  • Calibrate both magnetometers by setting "Use both", do it ourdoors over oplink. Calibration is performed all time after initialization, NOT just when you are asked to put copter in different position. You can validate first 5 steps, rotate slowly aircraft in all directions to cover as much as possible and save.
  • Set rotations for AuxMag, since every GPS can have Mag installed differently, you need to provide rotations of external Mag to match Mag on Revo.
  • Use one of Scopes to display Mag and AuxMag axis (x,y,z) in time. Check if axis from internal and external magnetometer follow the same pattern when rotating aircraft. if that is the case that means rotations are set correctly.
  • Finally, set Mag settings to use "Aux only" for flight

if you have done that, and you don't have any strong magnets (gimbal, buzzer) too close to Mag in the aircraft, magnetometer should be giving good data.
For flight, all boxes in health-system (ATTI, STAB, MAG..etc) must be green all time, if that's not the case you have a problem which needs to be fixed.

You should have also verified that barometer is working. Barometer is light sensitive and must be protected from wind blows. It should show approximately 1m from min to max peak (+-0.5m) in scopes. If it's showing couple of meters, than your baro needs fixing.

GPS must be giving good data. You can go to map, right click to enable diagnostics. The red route shown on the map is the GPS raw position (green is after fusion algorithm).
If you have spikes bigger than 5 meters you should consider updating your GPS firmware or maybe you have video transmitter antenna too close.

Setting autonomous flight modes is not as easy as connecting things together, and you need to read wiki and figure out your ways how to make sure that all sensors are working correctly and are configured correctly. Especially magnetometer orientation, I am pretty sure it's nothing close to 0,0,0 for external Mag you use (just search forum how to set mag rotations as that has been answered multiple times) or refer to Wiki https://librepilot.atlassian.net/wiki/display/LPDOC/Aux+Mag+Setup+and+Calibration

Your screenshots indicate that your rotations are not set correctly.

Mark36

  • *
  • 35
Many thanks Mateusz for  your support!
In this evening i istallated OPLink (fantastic), and i calibrate the Magnatometer in mode "both" with "INS13" and when i finish i use "Aux mag" and i watch in scope these data (watch picture in attachement); For you it's ok? how do I know if they are ok? you can explain it to me?
thanks

Mateusz

  • *
  • 808
For you it's ok? how do I know if they are ok? you can explain it to me?
thanks

I suggest the following
  • What magnetometer measures ? It measures magnetic field on each axis, the weaker the farer from north it is rotated.
  • What magnetic field tells flight controller ? It tells where north is, so "yaw" orientation relative to north.
  • What happens if you rotate aircraft or keep it steady ? When you rotate magnetometer which is a digital compass it will show different reads for x,y,z axes.
  • Revolution has magnetometer built-in, so why do we need external AuxMag ? Because AuxMag is far from elements that affect magnetometer.
  • Why can't we use AuxMag connecting it to Revo ? Because not knowing AugMag orientation, we don't know if it's 180 or 0 deg that we are pointing at.

So we need to know the orientation of AugMag, as every manufacturer of GPS can put that magnetometer chip differently. Sensor orientation is important for the flight controller.
You use rotation values for magnetometer to rotate it by whole numbers 90 deg, 180deg. Usually it is 0 pitch, 180 roll, 0 yaw, if the mag on GPS is just flipped with respect to Mag on FC.
Rotation values 0,0,0 assume the same orientation of Mag as on Revo flight controller (L833 symbols on the chip). GPS mag must be aligned to that.

So what happens when Mag and AuxMag are aligned ? You enter your AuxMag rotation values correctly and AuxMag values are transformed to match internal Mag. If the alignment is correct then on scopes you should see the same Mag behaviour when rotating air-craft in different directions.

I hope that helps :)

question3.1) every time I do the calibration of the mag, use a spirit level as well, but it's really necessary, or can be less precise on this?
not needed at all.  it is actually better to wobble it around.  be careful though.  it is always recording, so don't set it on ground or on metal at any time from beginning to end of mag calibration.

                  question3.2) during calibration MAG I read that no matter what the drone is oriented according to bussula, but once fixed one direction then he meets during the procedure, correct?
it does not actually need to be pointed north.  pick a direction and think of it as north also works.

                  question3.3) Lastly, to bundle cables that you told me, to understand what I have to weave them: all right if they make one turn for every 2 cm ruler?
they do not need to be that tight.  the twisting is mainly to keep them close together.  mine are probably one full twist (360 degrees) every 4cm in some places (maybe tighter in others).

                  question3.4) This is probably the most important aspect:
MAG calibration should be done away from iron and magnetic fields, and it is often difficult to find a good place to do it .. also because I use the desktop PC and definitely the place is not good, I did the calibration using the terrace a current extension for the desktop PC and it seemed better ..
The best place is in the country?
Since I do not have a notebook, there's another way to do the calibration MAG with a cell phone? because if there is I could go to the countryside to do it .. I've OP-link, but I still have not installed .. and I read that you did a LP-GCS Android, with these components I could do the calibration of MAG smartphone ?
There is android version of GCS that may be able to do that.  I have not used it.  I usually calibrate mags on a wooden porch that is 2nd story off of ground.  Or standing on ground in my back yard.

I have even used 2m or 3m USB cable instead of OpLink.  Use flight battery to power ESC/BEC normally and also USB.  It may work best if the ESC/BEC puts out more voltage than the USB cable.  If it is green after calibration it should be OK.