Could you also explain in other words what did you mean "angle of attack"?
Angle of attack is same as ACC Nick.(The angle the nose of the plane points)
Could you also explain in other words what did you mean "angle of attack"?
For sure: on two state (LOW, HIGH) switch you have ARM at LOW, MID is useless because there is never such state
...does your plane disarm when reaches home?
rbirdie001 wrote:.
2) After several RTH attempts from close distance (~50-200m) I tried RTH from bigger distance ~400m (at about 7:00) but despite I was clicking RTH switch up and down, plane kept flying away without taking care of it so at 7:13 I had to turn it back manually. I don't have explanation for that.
Code: Select all
if (GPS_distanceToHome <=5) dif=0;
// Wrap Heading 180
if (dif <= - 180) dif += 360;
if (dif >= + 180) dif -= 360;
This shouldn't be the case because I'm using Promini serial GPS. Additionally I don't think that I'd be more than 500m away. Easystar have wingspan 130cm and from my experience it's difficult to control such plane visually over 500m.PatrikE wrote:Yes I2c coded was overflowing on distance to home.
I dont know if it's fixed yet.
I'll test that but from my first feeling the "home deadband" should be little bigger. Cruise speed of my plane is about 6m/s and this "nervous behaviour" of servos takes usually at least 3-4 seconds so I tend to use as a first value 25m. I think there shouldn't be any risk, what do you think?I have seen the nervous behaivour on servos when the plane is very near home.
Especially when we miss wp really close.
It can be "filtered" with a if( dist < 5meters ) set dif=0.
It will remove the jitter around home and pass over home on level Wings.
PatrikE wrote:5 meter was just a example..
In the code i only use gps values comming from MWii.
Direction to waypoint and distance.
One thing that can cancel navigation is if you loose 3D fix.(5 Sats.)
rbirdie001 wrote: More I suspect short power dropout because all 4 digital servos in the plane are powered from the same BEC as MWi and if all moved at the same time and needed lot of current...
Roman
So I believe that current Patrik's implementation (FW_Nav_130322) is stable!
Code: Select all
#define RTH_BAILOUT true
Code: Select all
#define RTH_BAILOUT true
crashlander wrote:@PatrikE: How to enable RTH when FAIL_SAFE is triggered (it seems it is not working right now)
Code: Select all
#if RTH_BAILOUT
if(curr_Gps_Alt < 15) navDiff=0; // Forced Climbout with Level Wings below 15 meters
#endif
Code: Select all
if(curr_Gps_Alt < 15){dif=0;}
#define FAILSAFE_RTH false
Code: Select all
#define RTH_BAILOUT true
Code: Select all
if (GPS_distanceToHome <=15) dif=0; //fly straight over home
// Wrap Heading 180
crashlander wrote:If not than there must be problem with my setup (Spektrum DX7, and AR7000something) since when I switch of my TX it only sets TH to 0 and MWII does not activate anything.
Code: Select all
if (GPS_distanceToHome <=15) dif=0; //fly straight over home
Code: Select all
if(curr_Gps_Alt < 15){dif=0;}
There should be some dampening on servo otputs to avoid the ratteling...
Also the Stalls is not so nice.
Maby even force it to dive 1-2 degrees when power off?
brm wrote:you need to define the 'stallspeed' and then this speed should be in place rel. to the wind.
when the rel. speed to the wind is below the stallspeed then you need to dive.
brm wrote:regardless of the motor speed the plane should fly.
if not then adjust the cog.
crashlander wrote:For this to work we need to know wind speed and direction...
...and this IMO is impossible/hard without air speed sensor.
crashlander wrote:brm wrote:regardless of the motor speed the plane should fly.
if not then adjust the cog.
That definitely goes for normal planes without auto leveling electronics but in our case level/horizon mode tries to keep plane level disregarding speed and thus aerodynamic forces that governs planes during glide descend.
rbirdie001 wrote:There was also discussion here viewtopic.php?f=7&t=2456&start=120#p33438 about slow introduction of navigation control to allow controlling also very fast planes.
msev wrote:Maybe in the next code release from Patrik, that support for airspeed sensor could be merged in (hint, hint )
Alexinparis wrote:Adding a new sensor type might be a good thing.
But the purpose of this sensor needs to be clearly explain before adding code.
I see no interest for a multi rotor.
crashlander wrote:Even very fast planes will not break apart when actual turns are limited to 15 deg. in bank turns. Since the G force is proportional to degree of banking (http://en.wikipedia.org/wiki/Banked_turn) the only difference is that the radius of turns will be bigger.
rbirdie001 wrote:I can be wrong, but I'm afraid that degree of banking is relative to levelled plane. So in (theoretical) situation when the fast plane is already 45 deg. or even more tilted nose down and diving at 250 km/h when at once navigation is activated (maybe pilot lost control because of lost LOS and he wants to save the plane), it will immediately set full elevator throw to level the plane and wings can break...
Some entertaining math 250km/h with 45 deg. dive means that the plane is loosing aprox. 35m/s
Code: Select all
// Test to slowdown servos NOTE!.. Untested
#define SERVOSPEED 3 // zero to disable Increase for faster speed reverse with minus
#define SLOW_ANGLE 100 // Ajust where slow servos activates >> if (dif > SLOW_ANGLE) <<
static int16_t slowNav = dif;
if (slowNav < dif ){slowNav+=SERVOSPEED;}else if(slowNav > dif){slowNav-=SERVOSPEED;}
if(abs(dif) > SLOW_ANGLE && SERVOSPEED != 0) dif = (constrain(slowNav,-GPS_MAXCORR*10, GPS_MAXCORR*10));
// Test to slowdown servos *******************
// Limit outputs
.....
crashlander wrote:...Some entertaining math 250km/h with 45 deg. dive means that the plane is loosing aprox. 35m/s
PatrikE wrote:...
I use a function to slowdown Flaps.
It could be possible to use similar function for Nav if Nav error is bigger than ex.100.
And if the error is less use full speed.
It could look like this....Code: Select all
// Test to slowdown servos NOTE!.. Untested
#define SERVOSPEED 3 // zero to disable Increase for faster speed reverse with minus
#define SLOW_ANGLE 100 // Ajust where slow servos activates >> if (dif > SLOW_ANGLE) <<
static int16_t slowNav = dif;
if (slowNav < dif ){slowNav+=SERVOSPEED;}else if(slowNav > dif){slowNav-=SERVOSPEED;}
if(abs(dif) > SLOW_ANGLE && SERVOSPEED != 0) dif = (constrain(slowNav,-GPS_MAXCORR*10, GPS_MAXCORR*10));
// Test to slowdown servos *******************
// Limit outputs
.....
Code: Select all
if (slowNav < dif ){slowNav+=SERVOSPEED;}else if(slowNav > dif){slowNav-=SERVOSPEED;}
crashlander wrote:brm wrote:you need to define the 'stallspeed' and then this speed should be in place rel. to the wind.
when the rel. speed to the wind is below the stallspeed then you need to dive.
For this to work we need to know wind speed and direction...
...and this IMO is impossible/hard without air speed sensor. Maybe long time integration/calculation of level flying with known heading would help but even then it would be impossible to compensate for wind gusts.brm wrote:regardless of the motor speed the plane should fly.
if not then adjust the cog.
That definitely goes for normal planes without auto leveling electronics but in our case level/horizon mode tries to keep plane level disregarding speed and thus aerodynamic forces that governs planes during glide descend.
Best Regards
Andrej
brm wrote:take a crashcourse in physics.
electronics in combination with sw cannot overrule the physics....
brm wrote:the electronics is much faster as your eyes.
10km what ... height ... depth ... per hour ...
this is exact the feeling i have when i look at mw software components.
PatrikE wrote:This really seems to work good now.
Acyually the first proven rescue with RTH!
Have you made any tests with"Long distance" RTH?
I would like to know what modifications i suggested that you use in the code.
Can you post the FW_Naw file + the settings in config?