

PatrikE wrote:I Packed all All tools and Modified Versions I Used For Dev.
Info in the Package.
FixedWingNav.rar
All major problems is fixed and It feels Stable now.
/Patrik
PatrikE wrote:Set Yaw I to zero.
Not in current version.Do you know the BARO is working for airplane ?
PatrikE wrote:GPS_hold works.
It will save the pos in 3D where it's enabled and repetedly return to the same point.
Altitude from GPS is used.
Should keep around +/- 2m.
Code: Select all
/*############### New FUNCTION ###############*/
// Force the Plane moving forward in headwind
#define AIR_MAXSPEED 3000 // Vne, ~108km/h. Airframe dependant.
#define AIR_NAVSPEED 1500 // Desired air speed in NAV mode ~54km/h
#define GPS_MINSPEED 500 // 500= ~18km/h
#define I_TERM 0.1f
int spDiff = 0;
int spAdd = 0;
if (GPS_speed < GPS_MINSPEED) { // check for too slow ground speed
spAdd += (GPS_MINSPEED - GPS_speed)*I_TERM; // increase nav air speed
} else {
spAdd -= spAdd*I_TERM; // decrease nav air speed
}
spAdd = constrain(spAdd, 0, AIR_MAXSPEED - AIR_NAVSPEED - 100);
if (airspeedSpeed < AIR_NAVSPEED - 100 + spAdd || airspeedSpeed > AIR_NAVSPEED + 100 + spAdd) { // maintain air speed between NAVSPEED and MAXSPEED
spDiff = (AIR_NAVSPEED + spAdd - airspeedSpeed)*I_TERM;
SpeedBoost += spDiff;
}
SpeedBoost = constrain(SpeedBoost,0,500);
NAV_Thro += SpeedBoost;
/*############################################*/
PatrikE wrote:Using ground speed can be really wrong with Head/Tailwind.
Current Code only use GPS speed to ensure the plane moves toward Home with a minimum 400cm/s (~12 km/h)
It should be possible to Change to TrueAirspeed instead of GPS speed.
But there should still be a check to make sure Plane is moving forward in strong Headwind.
PatrikE wrote:Not in current version.Do you know the BARO is working for airplane ?
It will only control throttle but not Elevator.
PatrikE wrote:Looks really nice!.
You don't need a Baro for Airplane.
Altitude from GPS is used.
MPU6050 + GPS is enough.
PatrikE wrote:The big issue is if I2C_GPS is used.
that it requires the modified I2C_GPS.
OSD Data from original I2C_GPS gives wrong OSD data witch FixedWing use for navigation.
If you use wrong I2C_GPS the plane will not navigate correct!
For Serial GPS there's no such problems.
Rangarid wrote:PatrikE wrote:Looks really nice!.
You don't need a Baro for Airplane.
Altitude from GPS is used.
MPU6050 + GPS is enough.
Thanks mate. BTW this is nanowii from hobbyking if you dont know it already.
PatrikE wrote:I Want a Afro32!....
aydineser wrote:How about this board
http://witespyquad.gostorego.com/the-flip32-249.html
PatrikE wrote:I Packed all All tools and Modified Versions I Used For Dev.
Info in the Package.
FixedWingNav.rar
All major problems is fixed and It feels Stable now.
/Patrik
PatrikE wrote:@i3dm
Sorry i don't have any experience of Ublox.
I only use NMEA Gps.
Non of my patches should effect it.
It just changes some calculations.
PatrikE wrote:I'll check if there's any difference.
Not recommended!i3dm wrote:can i use the stock I2C_GPS with your airplane setup?
PatrikE wrote:Not recommended!i3dm wrote:can i use the stock I2C_GPS with your airplane setup?
I patched the file you linked to.
https://dl.dropboxusercontent.com/u/975 ... _Mod_x.rar
Compiles But Not tested but.
Test if it works with you Ublox.
PatrikE wrote:You can find the changes if you search in I2C_GPS_NAV.ino for
#define FIXEDWING // Patches for Navigation on Fixedwing.
#define I2CPATCH //Corrects OSD data and Navigation on Fixedwing.
PatrikE wrote:Not much but some NEO 6 stuff is added/changed in your files.
Short answer YES!How does your version perform RTH? simply turn home and fly in a straight line on steady altitude? and then circling home or..?
#1
Start Climb to >20 m
#2
Begin Navigating while Climbing to RTH Alt.
#3
Navigate to home maintaining altitude.
#4
After Home is reached.
Keep RTH Altitude and return to home Pos after Passing it.(Hold Pos)
PatrikE wrote:Short answer YES!How does your version perform RTH? simply turn home and fly in a straight line on steady altitude? and then circling home or..?
Long answer...
When RTH is activated.#1
Start Climb to >20 m
#2
Begin Navigating while Climbing to RTH Alt.
#3
Navigate to home maintaining altitude.
#4
After Home is reached.
Keep RTH Altitude and return to home Pos after Passing it.(Hold Pos)
If RTH is activated Higher than programmed it will keep the current Alt
and start Descend when home is reached 1:st time.
GPS HOLD sets a 3D WP that it will go for repeatedly!
POSR_D => Set RTH altitude 0.250 = 250 meter over home pos
PatrikE wrote:Not much but some NEO 6 stuff is added/changed in your files.
hinkel wrote:@PatrikE
Just a noob question , is your code available on Naze32 ?