Problem with Loiter, hard to understand logs

Hello,

I've tried, I really have. I like to be able to figure out stuff myself, but now I would really appreciate if someone gave me some idea of where to start. =)

Setup is a homebuilt hexa with Plus-frame setup. 950KV motors with 10x4.5 props. Total weight is 2KG.

Alt hold is working. GPS is working (gps blue is lit, board red is lit). Compass is tuned in and shows good figures in the planner (north is north in whatever tilt the copter is in). Logs show that Loiter activates when I push the switch when flying.

Settings have been reset. ESC:s are tuned. Radio is calibrated.

What happens is more or less nothing. It keeps altitude, but seems to flow away with the wind. Sometimes it even feels like it tilts in the opposite direction, so it flies away even faster (but that can be a bad read from my part). Sometimes it goes around the starting point in a large circle, and afterwards just goes away in a direction away from the point.

I am attaching the log of my latest attempt. It was a little windy, but nothing too bad. I attempted to activate loiter multiple times.

If you look at the .kmz-file, Log 2 and Log 4 (first and second loiter) I just let the mode do its thing until I could not leave it alone anymore. As you can see, it seems to want to do some sort of circle-motion, but with rapidly increasing distance to center.

The other loiter-logs I tried to compensate when it veered off, so those look a little bit random. The last loiter (log 16) I just held the copter in my hand and let it "try" to get back to where I activated Loiter-mode while walking around with it.

I'm trying to make some sense of the logs, but I can only understand the most basic stuff (like Long Err and Lat Err).I guess the Nav Pitch and Nav Roll is what the software decides it wants to do to compensate for the position error?

What I can't seem to find anywhere in the log is what heading the compass has... I've tried activating all the logs I can think of.

Here is the configuration the copter currently has:

FW Ver: 119
----------------------------------------


Radio
----------------------------------------
CH1: 1067 | 1917
CH2: 1071 | 1917
CH3: 1064 | 1917
CH4: 1066 | 1917
CH5: 1064 | 1917
CH6: 1501 | 1502
CH7: 1064 | 1916


Frame
----------------------------------------
Hexa frame
+ mode



Batt Mon:
----------------------------------------
disabled


Sonar
----------------------------------------
disabled
Type: 0 (0=XL, 1=LV, 2=XLL, 3=HRLV)

Flight modes
----------------------------------------
Pos 0:    STABILIZE,        Simple: OFF
Pos 1:    STABILIZE,        Simple: OFF
Pos 2:    STABILIZE,        Simple: OFF
Pos 3:    STABILIZE,        Simple: OFF
Pos 4:    STABILIZE,        Simple: OFF
Pos 5:    LOITER,        Simple: OFF


IMU
----------------------------------------
G_off: 0.20, -0.19, -0.03
A_off: 0.37, -0.03, -0.06


Compass
----------------------------------------
enabled
Mag Dec: 5.3050
Mag off: 45.3668, -31.7446, -88.3791

OptFlow
----------------------------------------
disabled


SYSID_SW_MREV: 119
SYSID_SW_TYPE: 10
SYSID_THISMAV: 1
SYSID_MYGCS: 255
SERIAL3_BAUD: 57
TELEM_DELAY: 0
ALT_HOLD_RTL: 1500
SONAR_ENABLE: 0
SONAR_TYPE: 0
BATT_MONITOR: 0
VOLT_DIVIDER: 3.560000
AMP_PER_VOLT: 27.320000
INPUT_VOLTS: 5.000000
BATT_CAPACITY: 1760
MAG_ENABLE: 1
FLOW_ENABLE: 0
LOW_VOLT: 9.600000
SUPER_SIMPLE: 0
APPROACH_ALT: 200
TILT: 54
WP_MODE: 0
WP_TOTAL: 1
WP_INDEX: 0
WP_MUST_INDEX: 0
WP_RADIUS: 2
WP_LOITER_RAD: 10
WP_SPEED_MAX: 500
XTRK_GAIN_SC: 0.200000
AUTO_LAND: 5000
THR_MIN: 130
THR_MAX: 1000
THR_FAILSAFE: 0
THR_FS_ACTION: 2
THR_FS_VALUE: 975
TRIM_THROTTLE: 325
FLTMODE1: 0
FLTMODE2: 0
FLTMODE3: 0
FLTMODE4: 0
FLTMODE5: 0
FLTMODE6: 5
SIMPLE: 0
LOG_BITMASK: 1534
LOG_LASTFILE: 0
TOY_RATE: 1
ESC: 0
TUNE: 0
TUNE_LOW: 0
TUNE_HIGH: 0
FRAME: 0
CH7_OPT: 5
AUTO_SLEW: 30
CAM_TRIGG_TYPE: 0
RC1_MIN: 1067
RC1_TRIM: 1494
RC1_MAX: 1917
RC1_REV: 1
RC1_DZ: 30
RC2_MIN: 1071
RC2_TRIM: 1494
RC2_MAX: 1917
RC2_REV: 1
RC2_DZ: 30
RC3_MIN: 1064
RC3_TRIM: 1912
RC3_MAX: 1917
RC3_REV: 1
RC3_DZ: 30
RC4_MIN: 1066
RC4_TRIM: 1488
RC4_MAX: 1917
RC4_REV: 1
RC4_DZ: 40
RC5_MIN: 1064
RC5_TRIM: 1065
RC5_MAX: 1917
RC5_REV: 1
RC5_DZ: 0
RC5_FUNCTION: 0
RC6_MIN: 1501
RC6_TRIM: 1502
RC6_MAX: 1502
RC6_REV: 1
RC6_DZ: 0
RC6_FUNCTION: 0
RC7_MIN: 1064
RC7_TRIM: 1065
RC7_MAX: 1916
RC7_REV: 1
RC7_DZ: 0
RC7_FUNCTION: 0
RC8_MIN: 1501
RC8_TRIM: 1501
RC8_MAX: 1502
RC8_REV: 1
RC8_DZ: 0
RC8_FUNCTION: 0
RC10_MIN: 1100
RC10_TRIM: 1500
RC10_MAX: 1900
RC10_REV: 1
RC10_DZ: 0
RC10_FUNCTION: 0
RC11_MIN: 1100
RC11_TRIM: 1500
RC11_MAX: 1900
RC11_REV: 1
RC11_DZ: 0
RC11_FUNCTION: 0
RC_SPEED: 490
STAB_D: 0.000000
STAB_D_S: 0.500000
ACRO_P: 4.500000
AXIS_P: 0.020000
AXIS_ENABLE: 0
LED_MODE: 9
RATE_RLL_P: 0.175000
RATE_RLL_I: 0.000000
RATE_RLL_D: 0.004000
RATE_RLL_IMAX: 500
RATE_PIT_P: 0.175000
RATE_PIT_I: 0.000000
RATE_PIT_D: 0.004000
RATE_PIT_IMAX: 500
RATE_YAW_P: 0.250000
RATE_YAW_I: 0.020000
RATE_YAW_D: 0.000000
RATE_YAW_IMAX: 800
LOITER_LAT_P: 2.400000
LOITER_LAT_I: 0.080000
LOITER_LAT_D: 0.400000
LOITER_LAT_IMAX: 3000
LOITER_LON_P: 2.400000
LOITER_LON_I: 0.080000
LOITER_LON_D: 0.400000
LOITER_LON_IMAX: 3000
NAV_LAT_P: 2.400000
NAV_LAT_I: 0.170000
NAV_LAT_D: 0.000000
NAV_LAT_IMAX: 1800
NAV_LON_P: 2.400000
NAV_LON_I: 0.170000
NAV_LON_D: 0.000000
NAV_LON_IMAX: 1800
THR_RATE_P: 0.300000
THR_RATE_I: 0.030000
THR_RATE_D: 0.000000
THR_RATE_IMAX: 300
OF_RLL_P: 2.500000
OF_RLL_I: 3.200000
OF_RLL_D: 0.120000
OF_RLL_IMAX: 400
OF_PIT_P: 2.500000
OF_PIT_I: 3.200000
OF_PIT_D: 0.120000
OF_PIT_IMAX: 400
STB_RLL_P: 4.500000
STB_RLL_I: 0.050000
STB_RLL_IMAX: 800
STB_PIT_P: 4.500000
STB_PIT_I: 0.050000
STB_PIT_IMAX: 800
STB_YAW_P: 7.000000
STB_YAW_I: 0.020000
STB_YAW_IMAX: 800
THR_ALT_P: 0.300000
THR_ALT_I: 0.040000
THR_ALT_IMAX: 300
HLD_LAT_P: 0.200000
HLD_LAT_I: 0.000000
HLD_LAT_IMAX: 3000
HLD_LON_P: 0.200000
HLD_LON_I: 0.000000
HLD_LON_IMAX: 3000
COMPASS_OFS_X: 45.366779
COMPASS_OFS_Y: -31.744623
COMPASS_OFS_Z: -88.379051
COMPASS_DEC: 0.092590
COMPASS_LEARN: 0
COMPASS_USE: 1
COMPASS_AUTODEC: 1
INS_XH: 2465
INS_XL: 1617
INS_YH: 2465
INS_YL: 1617
INS_ZH: 2465
INS_ZL: 1617
SR0_RAW_SENS: 0
SR0_EXT_STAT: 0
SR0_RC_CHAN: 0
SR0_RAW_CTRL: 0
SR0_POSITION: 0
SR0_EXTRA1: 0
SR0_EXTRA2: 0
SR0_EXTRA3: 0
SR0_PARAMS: 0
SR3_RAW_SENS: 0
SR3_EXT_STAT: 0
SR3_RC_CHAN: 0
SR3_RAW_CTRL: 0
SR3_POSITION: 0
SR3_EXTRA1: 0
SR3_EXTRA2: 0
SR3_EXTRA3: 0
SR3_PARAMS: 0
IMU_PRODUCT_ID: 2
AHRS_GPS_GAIN: 0.000000
AHRS_GPS_USE: 1
AHRS_YAW_P: 0.100000
AHRS_RP_P: 0.100000
MNT_MODE: 0
MNT_RETRACT_X: 0.000000
MNT_RETRACT_Y: 0.000000
MNT_RETRACT_Z: 0.000000
MNT_NEUTRAL_X: 0.000000
MNT_NEUTRAL_Y: 0.000000
MNT_NEUTRAL_Z: 0.000000
MNT_CONTROL_X: 0.000000
MNT_CONTROL_Y: 0.000000
MNT_CONTROL_Z: 0.000000
MNT_STAB_ROLL: 0
MNT_STAB_TILT: 0
MNT_STAB_PAN: 0
MNT_RC_IN_ROLL: 0
MNT_ANGMIN_ROL: -4500
MNT_ANGMAX_ROL: 4500
MNT_RC_IN_TILT: 0
MNT_ANGMIN_TIL: -4500
MNT_ANGMAX_TIL: 4500
MNT_RC_IN_PAN: 0
MNT_ANGMIN_PAN: -4500
MNT_ANGMAX_PAN: 4500
MNT_JSTICK_SPD: 0
LIM_ENABLED: 0
LIM_REQUIRED: 0
LIM_DEBUG: 0
LIM_SAFETIME: 0
LIM_CHANNEL: 0
LIM_RECMODE: 0
LIM_GPSLCK_ON: 0
LIM_GPSLCK_REQ: 0
LIM_FNC_ON: 0
LIM_FNC_REQ: 0
LIM_FNC_SMPL: 0
LIM_FNC_RAD: 0
LIM_FNC_TOT: 0
LIM_ALT_ON: 0
LIM_ALT_REQ: 0
LIM_ALT_MIN: 0
LIM_ALT_MAX: 0
MOT_TB_RATIO: 1.000000


So... Please, any pointers on where to start digging?

2012-10-13 18-40 1.kmz

2012-10-13 18-40 1.log

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

Join diydrones

Email me when people reply –

Replies

  • Thank you for the answer.

    Yes, I switched over to loiter that many times. I activated loiter at different intervals during a 10 minute fly when I felt I had stabilized my copter enough in stable mode. The activation of loiter-mode seems to work allright, atleast the copter thinks it is in that mode when I flip the switch.

    I would say that the problem is not that it goes out of loiter-mode, but thank you for the input.

    I do not have any in-flight link to the copter, this is my first build and I have not yet had the money to buy things like that =)

  • I am still new and don't know how to read the logs, but when I am setting flight modes, I do it in pairs, like this:

    Flight modes
    ----------------------------------------
    Pos 0:    STABILIZE,        Simple: OFF
    Pos 1:    STABILIZE,        Simple: OFF
    Pos 2:    STABILIZE,        Simple: OFF
    Pos 3:    STABILIZE,        Simple: OFF
    Pos 4:    LOITER,        Simple: OFF
    Pos 5:    LOITER,        Simple: OFF

    It's possible that you aren't staying in Loiter Mode.  Looking at the log file (remember I have so little knowledge of how to read the log files, that after reading this you may know more than me) I see frequent switching back and forth from Stabilize to Loiter.  Seven times.  Were you flipping the switch this often?

    I take my laptop in the field with me and speech is enabled in the Mission Planner (Configuration, Planner) so that I can hear what mode the copter is in.  If you don't have a 3DRadio link, get one.

     

    Hope this helps.

This reply was deleted.

Activity