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 »