Cleanflight iNav (navigation-rewrite) project - Page 3 - RC Groups
Thread Tools
This thread is privately moderated by DigitalEntity, who may elect to delete unwanted replies.
Sep 07, 2015, 11:29 AM
Registered User
Any suggestions for the ALT pid values?
Sign up now
to remove ads between posts
Sep 07, 2015, 12:03 PM
Registered User
Also, when I look in the cleanflight configurator, even if I have sonar activated, I can't see the Sonar mode to enable it. Is sonar used "out of the box" if the feature is enabled for ALT Hold at lower heights?
Sep 07, 2015, 12:34 PM
T69
T69
Registered User
Hi again!

Thank you for you advice
I was setting throttle mid now properly, trimmed the remote to be 1500 on 50% and set nav_use_midrc_for_althold = 0 ... and went for a test.
The copter was holding the altitude now without bigger problems. Good!

I went on for some POS_HOLD testing (10 Sats with the Ublox, compas calibratd), but it didn't hold to any point. It started to drift into the last direction and accelerated more and more into that direction with twitching movements ... controlling the direction in this mode wasn't possible.
I've checked he magnetic declination, which seems to be right.

I guess I have to setup the black box logging on the flip32 and try to understand what happens ... -> Just read the flip32 doesn't have internal flash memory to be used with black box ...

But the testing is real fun and I can't wait to see your merge into Boris' Beta Flight project ...

Cheers,
T.
Last edited by T69; Sep 07, 2015 at 12:51 PM.
Sep 07, 2015, 02:59 PM
Registered User
I used the latest examples from github

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 nav_gps_cf = 0.200
set baro_tab_size = 7
set baro_noise_lpf = 0.350
set baro_cf_vel = 0.965
set p_alt = 30
set i_alt = 150
set d_alt = 0
set p_vel = 80
set i_vel = 50
set d_vel = 50

Seems to behave way better than old code! I will provide videos soon!
Sep 07, 2015, 03:27 PM
Registered User
Just a heads up for those that use a beeper
Flip32+ Compass interference Beeper is a magnet (6 min 34 sec)
Sep 07, 2015, 04:18 PM
T69
T69
Registered User
Quote:
Originally Posted by dorubrad
Just a heads up for those that use a beeper https://www.youtube.com/watch?v=9teW89qIP_Q
I forgot the beeper .... that might be it....
Sep 07, 2015, 05:58 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by RC Slater
This is awesome! See any issues with using softserial for GPS?

Also, what about using a mag that is up on a boom with the GPS module? Does that require special configuration? The mag on my board never seems to work consistently, and I chalked it up to EM interference.
I woundn't use softserial and gps together. Softserial is rather unreliable and I guess you don't want to loose your GPS in the middle of RTH.

Mag should be placed as far away of power wiring as possible. Onboard mags are a pain - you have to move the board itself as far from power distribution board, ESCs, battery as possible.
Sep 07, 2015, 06:02 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by dorubrad
Any suggestions for the ALT pid values?
Defaults should be fine. If quad is buzzing while ALTHOLD is activated try lowering VEL P a bit.

Quote:
Originally Posted by dorubrad
Also, when I look in the cleanflight configurator, even if I have sonar activated, I can't see the Sonar mode to enable it. Is sonar used "out of the box" if the feature is enabled for ALT Hold at lower heights?
ALTHOLD mode will use all available sources of altitude, however sonar support is still untested as I don't have one to test with. Currently ALTHOLD should use sonar if lower than 2 meters, combine sonar with baro if 2-3 meters above surface and fall back to baro if above 3m. If you are going to test sonar please report your finding here, I'm really eager to see if code is working!
Sep 07, 2015, 06:04 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by dorubrad
Just a heads up for those that use a beeper https://www.youtube.com/watch?v=9teW89qIP_Q
Wow! That was a surprise to me! This MUST be added to documentation, thanks!
Sep 07, 2015, 06:05 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by dorubrad
Seems to behave way better than old code! I will provide videos soon!
Thanks! Good to know that somebody besides be was able to use my code
Can't wait to see videos!
Sep 07, 2015, 06:09 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by T69
Hi again!

Thank you for you advice
I was setting throttle mid now properly, trimmed the remote to be 1500 on 50% and set nav_use_midrc_for_althold = 0 ... and went for a test.
The copter was holding the altitude now without bigger problems. Good!

I went on for some POS_HOLD testing (10 Sats with the Ublox, compas calibratd), but it didn't hold to any point. It started to drift into the last direction and accelerated more and more into that direction with twitching movements ... controlling the direction in this mode wasn't possible.
I've checked he magnetic declination, which seems to be right.

I guess I have to setup the black box logging on the flip32 and try to understand what happens ... -> Just read the flip32 doesn't have internal flash memory to be used with black box ...

But the testing is real fun and I can't wait to see your merge into Boris' Beta Flight project ...

Cheers,
T.
Poshold mode is very very sensitive to proper compass calibration.

I figure you either don't have your compass well calibrated, or don't have it alighed properly.
When you point your copter's nose north, you should read heading=0 in cleanflight configurator, east - heading=90, south - 180, west - 270 and that shouldn't change much when you tilt (pitch/roll) the copter.
Play around with align_mag CLI variable and see if you can get your compass to work properly first. Cheers!
Sep 07, 2015, 07:48 PM
Saved By The Lost Model Buzzer
Quote:
Originally Posted by DigitalEntity
I woundn't use softserial and gps together. Softserial is rather unreliable and I guess you don't want to loose your GPS in the middle of RTH.

Mag should be placed as far away of power wiring as possible. Onboard mags are a pain - you have to move the board itself as far from power distribution board, ESCs, battery as possible.
I'm not sure how to bypass the onboard mag on a full NAZE board and use an external one instead. Can anyone point me to the correct resource?
Sep 07, 2015, 08:04 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by RC Slater
I'm not sure how to bypass the onboard mag on a full NAZE board and use an external one instead. Can anyone point me to the correct resource?
Disabling onboard mag on NAZE is not possible in software. You have to cut the scl trace on the board to get it disabled. Please see https://github.com/cleanflight/cleanflight/issues/313 , ledvinap there offers a possible solution.
Sep 07, 2015, 08:16 PM
Saved By The Lost Model Buzzer
Quote:
Originally Posted by DigitalEntity
Disabling onboard mag on NAZE is not possible in software. You have to cut the scl trace on the board to get it disabled. Please see https://github.com/cleanflight/cleanflight/issues/313 , ledvinap there offers a possible solution.
Ok thanks, now assuming I can disable it or there isn't one there to begin with (acro board), is it a trivial thing to get the FC and cleanflight software to recognize the external mag in addition to the GPS?

EDIT: I know in betaflight it is possible to disable mag, but I'm not sure if it turns the function off entirely or just disables the particular hardware on the board
Last edited by RC Slater; Sep 07, 2015 at 08:21 PM.
Sep 07, 2015, 08:22 PM
Build, fly, crash, repeat :-D
DigitalEntity's Avatar
Quote:
Originally Posted by RC Slater
Ok thanks, now assuming I can disable it or there isn't one there to begin with (acro board), is it a trivial thing to get the FC and cleanflight software to recognize the external mag in addition to the GPS?
If you have an acro board, just connect magnetometer SCL and SDA lines to corresponding pins of your flight controller and you are good to go. Just make sure you set your mag_align properly and did a compass calibration.

EDIT: you can disable mag completely, neither betaflight nor naw-rewrite has ability to distinguish between onboard mag and external mag as long as they use the same chip.


Quick Reply
Message:
Thread Tools