Re: attitude configuration
« Reply #15 on: April 09, 2019, 08:43:23 pm »
I don't understand why GCS stopped working for you.  Did you try stop and restart GCS program and unplug and replug USB?

If you tried all that, then it seems that it probably broke when you made some change to settings.  I would start over and at least try to know which setting made it break.  Report here and we will try to help.

Before using autonomous flight, it is best to get it all working and flying without GPS.  Save settings here to go back to when needed.  :)  Adding GPS and GPS flight modes requires new things to be mounted correctly, and several settings to be changed / added, and some rewiring (of high current motor power wires) and some new calibrations:
- Don't forget to press Save to save settings wherever you change them.
- Be aware that the GPS/Mag will not get power from USB.  You must have a flight battery plugged in.  Remember this when calibrating mags, setting HomeLocation, checking alarms, etc.
- For a 250 size quad you should buy a GPS that has a mag built in.  DJI/Naza type may be easiest because it only needs one cable, and you skip some problems that can happen with Pixhawk/APM/I2C mag.
- GPS/mag must be mounted correctly, level and arrow pointing forward (ignore where cable comes out), up on a pole.
- You must make a cable for the GPS/mag and plug it into an unused port on the Revo (usually MainPort or FlexiPort).
- All high current wire cables must be twisted.  Battery to connector.  Connector to power distribution board.  PDB to ESC.  ESC to motor.
- Set Hardware MainPort or FlexiPort (whichever it is plugged in) to GPS.
- Set Attitude->Settings->AttiEstAlgo to INS13.  This is needed to allow GPS flight modes.  There are some new options in next, but I use 16.09 with INS13 in my stuff right now.
- Set Attitiude->Magnetometer->MagUsage to AuxOnly
- Set Attitiude->Magnetometer->MagType to DJI (assuming you use a DJI GPS/mag)
- For DJI, leave everything else there at default, Warning/Error = .05 / .15 ; AuxMagOrientation = 0,0,0
- APM mags (Flexi or I2C) need AuxMagOrientation = 0,180,0
- Set your Flight Mode Switch to have at least Attitude mode and VelocityRoam (a GPS mode).  You will take off in Attitude and switch to VR which is very much like Attitude mode.  Just try it.
- Calibrate mag sensor.  Once you start, you must not let the quad close to the ground, or a car, or anything metal during calibration.  You should do this outdoors in an open place where you intend to fly it.  It is best to do this via OpLink telemetry, so you should consider getting OpLink telemetry working first.  I have done it successfully using battery and USB cable at the same time and keeping the USB cable away from the quad.  It might be best that regulated battery voltage (say 5.2V) is higher than laptop USB voltage (say 5.0V) so it gets it's power from battery, not USB.
- Set HomeLocation.  This is not a landing place, return to place, or otherwise important other than it needs to be where you fly.  I have flown with HomeLocation set 50km (30mi) away.  The only things that is bad is that the GCS GPS map location is wrong by several hundred meters.  Right click on GCS GPS screen where you want it to be.  A menu will come up. Select SetHomeLocation.  It will ask you for the altitude there (in meters) so you must know that.

Go outdoors away from metal and tall buildings.  Generally however tall a building is, you should stay at least that far away from it when you are close to the ground.  Power it up and connect it to telemetry via either USB or OpLink.  Both GPS and Mag must be green and then Atti and Stab will go green and then it can be armed in Attitude mode.

Alarm colors GPS:
Black block = GPS not fully configured
Red X = bad cable or no power to GPS
Red block = GPS working, but no satellites found yet (it should go orange then green within a few minutes)
Orange block = GPS working, but not enough satellites found yet (it should go green within a few minutes)
Green block = GPS working, enough satellites and low enough PDOP (a measure of max error).

Alarm colors Mag:
Black block = Mag not fully configured
Red block = Mag way out of range, not safe
Orange block = Mag somewhat out of range, won't arm, but will allow flight
Green block = Mag working OK and no metal around

You may have to calibrate the mag again if it is red when it should be green.  You should hope for (when holding quad away from ground and metal) usually green with orange once in a while.

You might find System->DataObjects->AuxMagSensor and ->GPSPositionSensor to be helpful.  You can see the sensor values move and you can see other things like GPS sat count and PDOP.

On the first flight of the day, it is best to wait say 12 minutes for GPS to download and save the almanac.  It will turn green well before that.  After that for the rest of the day, you can probably get away with 2 or 3 minutes.

After waiting for the GPS almanac, with everything working now and telemetry connected, you could also set HomeLocation from the Attitude->Settings page.  I forget exactly.  You may need to press the Clear button.  You may need to uncheck the IsSet check box and press Save.  Within a few seconds it will fill in the fields.  Press Save to save this new data.

If I haven't forgotten something, you should be able to arm in Atti mode, take off, switch to VR, adjust throttle stick to center, and it should hover where it is, like a PositionHold.  Move the sticks a little and fly it around in VR mode like it was Atti mode.
« Last Edit: April 09, 2019, 09:14:48 pm by TheOtherCliff »

Re: attitude configuration
« Reply #16 on: May 05, 2019, 04:57:32 pm »
Sorry for my late reply and thank you for time you spent in my question.
I was wondering if configuration problems may be due to auxiliary compass that flight comtroller never found.
I attach photos of gps board.

Re: attitude configuration
« Reply #17 on: May 05, 2019, 06:06:03 pm »
The 8 pin chip is an EEPROM (memory) chip.  It looks like this GPS does not have a mag chip.  There is a place for one, the small 16 pin location that is missing a chip looks like where the mag chip goes.

With a small quad like 250, you usually need aux mag since on board mag is so close to battery / motor power wires.

Next (newer version of GCS and firmware) has some options to allow you to use only 2D mag/compass which may work to allow you to use the Revo on board mag successfully in a 250, but I have not done this.  Maybe someone who has done this can help.

jdl

  • ***
  • 246
Re: attitude configuration
« Reply #18 on: May 07, 2019, 09:56:38 am »
I have built some ZMR250 quads that are capable of autonomous flight. However, never managed to get a really stable GPS flight with onboard mag only, even in 2D compass mode. I guess the PDB is just too close (< 1cm) to the Revo and its mag sensor.

Seems that using auxmag for autonomous ZMR250 sized quads is mandatory. The best configuration I've achieved is: small sized and lightweight BN-220 GPS and GY-273 AuxMag on I2C bus. GPS located at the front of the top plate. GY-273 PCB is glued between the bottom plates, at the downward facing side of upper bottom plate, just behind the LED stripe on the photo. ALL cables twisted! With INS13 and 2D compass mode there aren't any problems neither with calibration, nor with GPS flight modes. No mag errors, no toilet bowls.

Beware, there are lots of fake GY-273 boards that state their sensor is HMC5883L but have QMC5883 instead. There were posts in the LP forum about that. These chips are not fully compatible. I recall there was an intent to add code to LP to support QMC5883 mags but didn't followed its progress. It may be already implemented in LP. However, reports say that QMC5883 is way more inaccurate that HMC5883L. So if you look for I2C auxmag board like GY-273, assure the chip is HMC5883L indeed. It has marking L883. If you see marking DA5883, this is QMC5883, go away!

Btw, I have a plane (MiniTalon) that flies perfectly in auto modes with no mag errors, using only internal Revo mag sensor. But there are at least 5-6cm separation between the Revo board and PDB there.
« Last Edit: May 07, 2019, 02:54:44 pm by jdl »