Cleanflight iNav (navigation-rewrite) project - Page 11 - RC Groups
Shop our Airplanes Products Drone Products Sales
Thread Tools
This thread is privately moderated by DigitalEntity, who may elect to delete unwanted replies.
Sep 19, 2015, 07:13 AM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by stronnag
Hi,

I did another test yesterday (fcc9ddb). Great PH again. I think I'm seeing the over agressive PIDs in RTH, it certainly returns faster than I'm comfortable with, so I'll try the new pid suggestion later today. In MW-nav there is a m/s limit on nav speed. Are you planning to implement a similar limit in nav-rewrite?
Hi!

Was there any wind? I'm worried about bad wind tolerance and would appreciate any feedback on that matter.

PIDs are indeed over agressive. We need better defaults that would be suitable for both PH and autonomous navigation.

There is already a CLI varibale nav_max_speed defining maximum velocity in autonomous mode (RTH included), current default is 500 cm/s, probably it's too high and can be safely reduced to 300 or even 100 cm/s.

I'm also thinking of implementing a non-linear approach to max velocity - i.e. when position controller receives new position target it uses (0.1 * max_velocity) as a speed cap, this is gradually increased to (max_velocity) over some time.
Sign up now
to remove ads between posts
Sep 19, 2015, 07:42 AM
sweet dreams & flying machines
stronnag's Avatar
Hi,

There was very little wind (c. 2.5 m/s). I will try the new PIDs and reducing the nav_speed (I think I had 2.5m/s in MW).

Thanks.
Sep 20, 2015, 10:39 AM
Registered User
i tried it today will all default PIDs for my 450 quad with flip32+ and external mag and gps.
i was very interested to see how it would perform, and i must say: something must go completly wrong. it doesn't make a single difference if i enable any of the modes or not. can this be? it just flies as if there was not gps mode activated.
Sep 20, 2015, 11:39 AM
sweet dreams & flying machines
stronnag's Avatar
Performed a number of tests with the lowered PIDs. I think I preferred nav_gps_cf = 0.400 (vice 0.001), but I can't say I really noticed too much difference and it could just be masked by better GPS accuracy later in the day. Setting nav_*_speed to 200 (2m/s) made the RTH efforts easier on the eye, and the three or four attempts all landed within 4m of home.
Sep 20, 2015, 07:02 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by ize.man
i tried it today will all default PIDs for my 450 quad with flip32+ and external mag and gps.
i was very interested to see how it would perform, and i must say: something must go completly wrong. it doesn't make a single difference if i enable any of the modes or not. can this be? it just flies as if there was not gps mode activated.
Did you perform a magnetometer calibration? Poshold wont enable if mag is not calibrated.
Sep 20, 2015, 07:04 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by stronnag
Performed a number of tests with the lowered PIDs. I think I preferred nav_gps_cf = 0.400 (vice 0.001), but I can't say I really noticed too much difference and it could just be masked by better GPS accuracy later in the day. Setting nav_*_speed to 200 (2m/s) made the RTH efforts easier on the eye, and the three or four attempts all landed within 4m of home.
I've been testing the code yesterday. Wind was rather strong - up to 8-10 m/s and I've noticed that poshold was unable to compensate. Need to investigate further.
Sep 21, 2015, 03:40 AM
Registered User
Quote:
Originally Posted by DigitalEntity
Did you perform a magnetometer calibration? Poshold wont enable if mag is not calibrated.
yes i did. well it DOES activate the modes (confirmed by beep of the FC) but i doesn't hold position or altitude, or both.
but i was quite windy yesterday, and i tested in the garden flying about 2m height. gps had 7+ sats.
i will test more when i got time. anything i can tune?
Sep 21, 2015, 05:40 AM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by ize.man
yes i did. well it DOES activate the modes (confirmed by beep of the FC) but i doesn't hold position or altitude, or both.
but i was quite windy yesterday, and i tested in the garden flying about 2m height. gps had 7+ sats.
i will test more when i got time. anything i can tune?
Wind tolerance is not very good, I'm working on the way to improve it. Can you post a config dump? Let's check for a possible misconfiguration first. Blackbox log will also help alot!
Sep 21, 2015, 11:15 AM
Registered User
will post a dump when i'm home. if you could check that, that would be very much appreciated. blackbox is a great wish, but i don't have any serial ports to spare and no onboard memory.
Sep 21, 2015, 11:16 AM
Registered User
lyise's Avatar
Hey - since we are always so limited on ports on our Boards ..
what do you guys think about adding support for the dji naza gps?

biggest benefit would be to have both gps and mag on one UART like it is done in Openpilot.
the library is available here : https://www.rcgroups.com/forums/show....php?t=1995704

and cheap chinese knockoffs here for example:
http://www.banggood.com/Ublox-M8N-GP...-p-991718.html
http://www.banggood.com/FFOSD-G2-M8N...-p-979718.html
The also work better then the original one if you believe this thread :
https://www.rcgroups.com/forums/show....php?t=2393218
Sep 21, 2015, 04:24 PM
Registered User
Quote:
Originally Posted by lyise
Hey - since we are always so limited on ports on our Boards ..
what do you guys think about adding support for the dji naza gps?

biggest benefit would be to have both gps and mag on one UART like it is done in Openpilot.
the library is available here : https://www.rcgroups.com/forums/show....php?t=1995704

and cheap chinese knockoffs here for example:
http://www.banggood.com/Ublox-M8N-GP...-p-991718.html
http://www.banggood.com/FFOSD-G2-M8N...-p-979718.html
The also work better then the original one if you believe this thread :
https://www.rcgroups.com/forums/show....php?t=2393218
that's not the problem. GPS is on one UART and compass is on I2C. so your idea solves no problem, or did i get it wrong?
Sep 21, 2015, 04:26 PM
Registered User
lyise's Avatar
Quote:
Originally Posted by ize.man
that's not the problem. GPS is on one UART and compass is on I2C. so your idea solves no problem, or did i get it wrong?
Yea - you did get it wrong.. itīs one uart connection for both GPS and mag. Thereīs an extra controller in the gps that wraps the gps and mag data and sends them over uart in predefined messages. With the library you can easily decipher them and feed them into the right data streams in cleanflight.
Sep 21, 2015, 04:45 PM
Registered User
Quote:
Originally Posted by lyise
Yea - you did get it wrong.. itīs one uart connection for both GPS and mag. Thereīs an extra controller in the gps that wraps the gps and mag data and sends them over uart in predefined messages. With the library you can easily decipher them and feed them into the right data streams in cleanflight.
yeah. but how does that save a UART? i use one now for gps and mag and your solution uses one as well.
Sep 21, 2015, 04:45 PM
Registered User
@digitalentity: here is my dump:

Code:
# dump

# version
# Cleanflight/NAZE 1.10.0 Sep 14 2015 / 02:55:55 (d99f855)
# pflags
# Persistent config flags: 0x00000001
# dump master

# mixer
mixer QUADX
mmix reset
smix reset


# feature
feature -RX_PPM
feature -VBAT
feature -INFLIGHT_ACC_CAL
feature -RX_SERIAL
feature -MOTOR_STOP
feature -SERVO_TILT
feature -SOFTSERIAL
feature -GPS
feature -FAILSAFE
feature -SONAR
feature -TELEMETRY
feature -CURRENT_METER
feature -3D
feature -RX_PARALLEL_PWM
feature -RX_MSP
feature -RSSI_ADC
feature -LED_STRIP
feature -DISPLAY
feature -ONESHOT125
feature -BLACKBOX
feature -CHANNEL_FORWARDING
feature RX_PPM
feature VBAT
feature SOFTSERIAL
feature GPS
feature FAILSAFE
feature TELEMETRY
feature CURRENT_METER
feature ONESHOT125


# map
map RETA1234


# serial
serial 0 1 115200 57600 0 115200
serial 1 1 115200 57600 0 115200
serial 30 4 115200 19200 9600 115200
serial 31 2 115200 9600 9600 115200

... led and color stuff removed ...

set looptime = 3500
set emf_avoidance = 0
set mid_rc = 1500
set min_check = 1100
set max_check = 1900
set rssi_channel = 0
set rssi_scale = 30
set rssi_ppm_invert = 0
set input_filtering_mode = 0
set min_throttle = 1043
set max_throttle = 1850
set min_command = 1000
set servo_center_pulse = 1500
set 3d_deadband_low = 1406
set 3d_deadband_high = 1514
set 3d_neutral = 1460
set 3d_deadband_throttle = 50
set motor_pwm_rate = 400
set servo_pwm_rate = 50
set retarded_arm = 0
set disarm_kill_switch = 1
set auto_disarm_delay = 5
set small_angle = 25
set reboot_character = 82
set gps_provider = 1
set gps_sbas_mode = 0
set gps_auto_config = 1
set gps_auto_baud = 0
set serialrx_provider = 0
set spektrum_sat_bind = 0
set telemetry_switch = 0
set telemetry_inversion = 1
set frsky_default_lattitude =  0.000
set frsky_default_longitude =  0.000
set frsky_coordinates_format = 0
set frsky_unit = 0
set frsky_vfas_precision = 0
set hott_alarm_sound_interval = 5
set battery_capacity = 0
set vbat_scale = 112
set vbat_max_cell_voltage = 43
set vbat_min_cell_voltage = 30
set vbat_warning_cell_voltage = 33
set current_meter_scale = 353
set current_meter_offset = 97
set multiwii_current_meter_output = 0
set current_meter_type = 1
set align_gyro = 0
set align_acc = 0
set align_mag = 0
set align_board_roll = 0
set align_board_pitch = 0
set align_board_yaw = 90
set max_angle_inclination = 500
set gyro_lpf = 42
set moron_threshold = 32
set gyro_cmpf_factor = 600
set gyro_cmpfm_factor = 250
set yaw_control_direction = 1
set pid_at_min_throttle = 1
set yaw_motor_direction = 1
set yaw_jump_prevention_limit = 200
set tri_unarmed_servo = 1
set servo_lowpass_freq = 400
set servo_lowpass_enable = 0
set failsafe_delay = 10
set failsafe_off_delay = 200
set failsafe_throttle = 1000
set failsafe_kill_switch = 0
set failsafe_throttle_low_delay = 100
set rx_min_usec = 885
set rx_max_usec = 2115
set acc_hardware = 0
set baro_hardware = 0
set mag_hardware = 0
set blackbox_rate_num = 1
set blackbox_rate_denom = 1
set blackbox_device = 0
set magzero_x = -155
set magzero_y = -56
set magzero_z = -85

# rxfail
rxfail 0 a
rxfail 1 a
rxfail 2 a
rxfail 3 a
rxfail 4 h
rxfail 5 h
rxfail 6 h
rxfail 7 h
rxfail 8 h
rxfail 9 h
rxfail 10 h
rxfail 11 h
rxfail 12 h
rxfail 13 h
rxfail 14 h
rxfail 15 h
rxfail 16 h
rxfail 17 h

# dump profile

# profile
profile 0

# aux
aux 0 2 0 1950 2100
aux 1 23 1 1300 2100
aux 2 24 1 1300 1700
aux 3 0 0 900 900
aux 4 0 0 900 900
aux 5 0 0 900 900
aux 6 0 0 900 900
aux 7 0 0 900 900
aux 8 0 0 900 900
aux 9 0 0 900 900
aux 10 0 0 900 900
aux 11 0 0 900 900
aux 12 0 0 900 900
aux 13 0 0 900 900
aux 14 0 0 900 900
aux 15 0 0 900 900
aux 16 0 0 900 900
aux 17 0 0 900 900
aux 18 0 0 900 900
aux 19 0 0 900 900

# adjrange
adjrange 0 0 3 900 1100 6 2
adjrange 1 0 3 1200 1325 7 2
adjrange 2 0 3 1375 1500 8 2
adjrange 3 0 3 1550 1650 9 2
adjrange 4 0 3 1700 1800 10 2
adjrange 5 0 3 1950 2100 11 2
adjrange 6 0 0 900 900 0 0
adjrange 7 0 0 900 900 0 0
adjrange 8 0 0 900 900 0 0
adjrange 9 0 0 900 900 0 0
adjrange 10 0 0 900 900 0 0
adjrange 11 0 0 900 900 0 0

# rxrange
rxrange 0 1000 2000
rxrange 1 1000 2000
rxrange 2 1000 2000
rxrange 3 1000 2000

# servo
servo 0 1000 2000 1500 90 90 100 -1
servo 1 1000 2000 1500 90 90 100 -1
servo 2 1000 2000 1500 90 90 100 -1
servo 3 1000 2000 1500 90 90 100 -1
servo 4 1000 2000 1500 90 90 100 -1
servo 5 1000 2000 1500 90 90 100 -1
servo 6 1000 2000 1500 90 90 100 -1
servo 7 1000 2000 1500 90 90 100 -1

set gps_pos_p = 15
set gps_pos_i = 0
set gps_pos_d = 0
set gps_posr_p = 90
set gps_posr_i = 15
set gps_posr_d = 1
set gps_nav_p = 0
set gps_nav_i = 0
set gps_nav_d = 0
set nav_use_midrc_for_althold = 1
set nav_throttle_tilt_comp = 1
set nav_lock_until_takeoff = 0
set nav_user_control_mode = 0
set nav_gps_cf =  0.200
set nav_baro_cf =  0.965
set nav_sonar_cf =  0.900
set nav_pterm_cut_hz = 20
set nav_dterm_cut_hz = 15
set nav_wp_radius = 300
set nav_max_speed = 500
set nav_manual_speed = 500
set nav_manual_climb_rate = 200
set pos_hold_deadband = 20
set alt_hold_deadband = 50
set nav_min_rth_distance = 500
set nav_rth_alt_mode = 4
set nav_rth_altitude = 1000
set deadband = 0
set yaw_deadband = 0
set throttle_correction_value = 0
set throttle_correction_angle = 800
set default_rate_profile = 0
set gimbal_mode = 0
set acc_lpf_factor = 4
set acc_unarmedcal = 1
set acc_trim_pitch = 0
set acc_trim_roll = 0
set baro_tab_size = 7
set baro_noise_lpf =  0.350
set mag_declination = 390
set pid_controller = 3
set p_pitch = 32
set i_pitch = 17
set d_pitch = 13
set p_roll = 32
set i_roll = 17
set d_roll = 13
set p_yaw = 85
set i_yaw = 45
set d_yaw = 0
set p_pitchf =  1.600
set i_pitchf =  0.180
set d_pitchf =  0.042
set p_rollf =  1.600
set i_rollf =  0.180
set d_rollf =  0.042
set p_yawf =  7.900
set i_yawf =  0.510
set d_yawf =  0.055
set level_horizon =  3.000
set level_angle =  5.000
set sensitivity_horizon = 75
set p_alt = 30
set i_alt = 150
set d_alt = 0
set p_level = 90
set i_level = 10
set d_level = 100
set p_vel = 80
set i_vel = 50
set d_vel = 50
set yaw_p_limit = 500
set dterm_cut_hz = 0
set pterm_cut_hz = 0
set gyro_cut_hz = 0

# dump rates

# rateprofile
rateprofile 0

set rc_rate = 90
set rc_expo = 65
set rc_yaw_expo = 0
set thr_mid = 50
set thr_expo = 0
set roll_rate = 0
set pitch_rate = 0
set yaw_rate = 0
set tpa_rate = 0
set tpa_breakpoint = 1500
Last edited by ize.man; Sep 22, 2015 at 10:07 AM.
Sep 21, 2015, 05:07 PM
Registered User
lyise's Avatar
Quote:
Originally Posted by ize.man
yeah. but how does that save a UART? i use one now for gps and mag and your solution uses one as well.
??
i never said that it saves a Uart... it saves the I2C Port for the mag. Not on all Boards have an extra connector for i2C. Naze32 rev5 for example only has tiny pads on the bottom.

It will also help with the problem that you canīt use the same external mag if you already have on the FC.


Quick Reply
Message:
Thread Tools