Yes the first testflight is over, and the seagull 2200 are still alive.I planed a small 5 waypoint route on a open area near Aalborg, Denmark.After calibration on the FMA sensor I was ready to give it a try.After a little manual flight I pushed the auto button on my remote CH 5.. So far so good. The plane started making bit of rocking with the rudder - after a sec or two the plane gets stabel and just holding the course... hmmm.. Not navigating as it surpose to do. I tried about 5 times to se if there are any sign of showing just a little navigation for the first waypoint. But just a straight path.So what might be the problem?If I try "flying by wire" without the gps I have one very weak control over the rudder and elev.Anybody out there! anybody.. :-(Here is the function on the board... It looks right to me.
In the original code (and in your original post at the top) wp_lat[0] and wp_lon[0] were commented out and so are not set to zero. They would be set in the Navigation function Save_Launch_Parameters as the actual GPS position of the launch point. You then added 57 degrees to the latitude and 10 degrees to longitude to calculate your first waypoint, which would be very far away. You want to add on the very small increment from your starting position, don't use the full lat/lon.
In your latest post, you are now setting waypoint 0 to 0,0 which is off the coast of Africa. Probably not where you want the airplane to end up.
Clayton is right.
Notice that the comment in your waypoint tab states:
//0.000009 degrees is about 1 meter...
Your first waypoint adds 57.082534 degrees to lat.
Thats a lot of meters!!
First, I have been known to be wrong. Frequently. But I think you have a bit of a problem with your waypoints. The waypoints, as set in the code, are relative to the starting point of the airplane as determined by the GPS. So I think you may have attempted to send your drone to the north pole by adding about 60 degrees to waypoint[0]. Try adding a much smaller number to waypoint[0] or at least print them out to see where your airplane thinks it is going.
Like I said I could be wrong, but it looks suspicious to me.
Chris,
I think he is using 2.0.
Hooks,
The code is optimized for the Easystar so there is going to be some tweeking to get another airframe flying WP or RTL. Before you relaunch, switch to RTL or WP to make sure it activates. If it doesn't, press the reset button.I do this test every time now before I launch. I frequently have to press the reset button, otherwise I experience the same thing you did. I would suggest walking the plane around while in RTL to make sure it steers you back to home. Then try flying under RTL first to see what the plane is doing. Fly downwind around 1000' away, turn around into a heading not more than 45 deg away from home and switch to RTL. Does plane aim towards you? Does it pitch up or down to fly at right altitude? Does it finally stabilize?
Comments
void setup_waypoints(void)
{
//0.000009 degrees is about 1 meter...
wp_alt[0]=50;
//wp_lat[0]=0;
//wp_lon[0]=0;
// You don't want to change this. It is set via GPS as the launch location.
// Set the relative position from the launch point
wp_alt[1]=50;
wp_lat[1]=wp_lat[0]+0.002; //1
wp_lon[1]=wp_lon[0]+0.002;
wp_alt[2]=50;
wp_lat[2]=wp_lat[0]+0.004; //2
wp_lon[2]=wp_lon[0]+0.002;
// etc. for the rest of the waypoints.
}
Or set them to absolute values rather than relative:
void setup_waypoints(void)
{
//0.000009 degrees is about 1 meter...
wp_alt[0]=50;
//wp_lat[0]=0;
//wp_lon[0]=0;
// You don't want to change this. It is set via GPS as the launch location.
wp_alt[1]=50;
wp_lat[1]=57.082534; //1
wp_lon[1]=9.940846;
wp_alt[2]=50;
wp_lat[2]=57.081286; //2
wp_lon[2]=9.941318;
// ...
}
Is that clearer?
Clayton please show me how my Waypoints should be. Evt. copy/past the test I used.
In your latest post, you are now setting waypoint 0 to 0,0 which is off the coast of Africa. Probably not where you want the airplane to end up.
Notice that the comment in your waypoint tab states:
//0.000009 degrees is about 1 meter...
Your first waypoint adds 57.082534 degrees to lat.
Thats a lot of meters!!
void setup_waypoints(void)
{
//0.000009 degrees is about 1 meter...
wp_alt[0]=50;
wp_lat[0]=0;
wp_lon[0]=0;
wp_alt[1]=50;
wp_lat[1]=wp_lat[0]+57.082534; //1
wp_lon[1]=wp_lon[0]+9.940846;
wp_alt[2]=50;
wp_lat[2]=wp_lat[0]+57.081286; //2
wp_lon[2]=wp_lon[0]+9.941318;
First, I have been known to be wrong. Frequently. But I think you have a bit of a problem with your waypoints. The waypoints, as set in the code, are relative to the starting point of the airplane as determined by the GPS. So I think you may have attempted to send your drone to the north pole by adding about 60 degrees to waypoint[0]. Try adding a much smaller number to waypoint[0] or at least print them out to see where your airplane thinks it is going.
Like I said I could be wrong, but it looks suspicious to me.
Bryan I can see your idear, but if I press the reset button before launch, will the calibration FMA not be damage?
I think he is using 2.0.
Hooks,
The code is optimized for the Easystar so there is going to be some tweeking to get another airframe flying WP or RTL. Before you relaunch, switch to RTL or WP to make sure it activates. If it doesn't, press the reset button.I do this test every time now before I launch. I frequently have to press the reset button, otherwise I experience the same thing you did. I would suggest walking the plane around while in RTL to make sure it steers you back to home. Then try flying under RTL first to see what the plane is doing. Fly downwind around 1000' away, turn around into a heading not more than 45 deg away from home and switch to RTL. Does plane aim towards you? Does it pitch up or down to fly at right altitude? Does it finally stabilize?