paparazzi-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Paparazzi-devel] Issues building


From: Nathan Aherne
Subject: Re: [Paparazzi-devel] Issues building
Date: Sun, 30 May 2010 11:36:41 +1000

Hi Jeremy,

Thanks for pointing me in the right direction!

I have tested this out and your idea works. I was trying to find a more elegant solution and discovered the below:

You do not need to put the Bungee Takeoff values in your airframe file to use PolygonSurvey. All you need to do is delete any reference to the other functions and leave the below code in the OSAMNav.c file (I left it at the bottom of the file after all the PolySurvey code):

****************************************************************************
/*
Translates point so (transX, transY) are (0,0) then rotates the point around z by Zrot
*/

void TranslateAndRotateFromWorld(struct Point2D *p, float Zrot, float transX, float transY)
{
float temp;

p->x = p->x - transX;
p->y = p->y - transY;

temp = p->x;
p->x = p->x*cos(Zrot)+p->y*sin(Zrot);
p->y = -temp*sin(Zrot)+p->y*cos(Zrot);
}

/*
Rotates point round z by -Zrot then translates so (0,0) becomes (transX,transY)
*/
void RotateAndTranslateToWorld(struct Point2D *p, float Zrot, float transX, float transY)
{
float temp = p->x;

p->x = p->x*cos(Zrot)-p->y*sin(Zrot);
p->y = temp*sin(Zrot)+p->y*cos(Zrot);

p->x = p->x + transX;
p->y = p->y + transY;
}

void FindInterceptOfTwoLines(float *x, float *y, struct Line L1, struct Line L2)
{
*x = ((L2.b-L1.b)/(L1.m-L2.m));
*y = L1.m*(*x)+L1.b;
}

float EvaluateLineForY(float x, struct Line L)
{
return (L.m*x)+L.b;
}

float EvaluateLineForX(float y, struct Line L)
{
return ((y-L.b)/L.m);
}

float DistanceEquation(struct Point2D p1,struct Point2D p2)
{
return sqrt((p1.x-p2.x)*(p1.x-p2.x)+(p1.y-p2.y)*(p1.y-p2.y));
}

********************************************************************************************************

Kindest regards,
 
Nathan Aherne
Reddog Technology
Mob: 0402 555 080

On 30/05/2010, at 10:27 AM, Jeremy Reinertsen wrote:

Hi Nathan,
 
I tried modifying OSAMNav.c but had similar errors. So I reverted to the original version and found that the least I needed to do to stop compile errors was to include the Bungee Takeoff values in my airframe file even though I don't use them.
 
I now have polygon survey working perfectly with no compile warnings or errors. The other OSAMNav.c routines are there in the background if I decide to use them.
 
Cheers
Jeremy
 
 
 
 
----- Original Message -----
Sent: Saturday, May 29, 2010 2:00 PM
Subject: Re: [Paparazzi-devel] Issues building

As I have asked the same question twice in one month and not received a reply, I assume its something I have done which is stupid. Saying this, I have read everything I can on the subject and cannot find my error, so I would really appreciate some help. I have used this flight plan before and it worked, hence why I am confused.

I have some more information on my issue. If I remove any reference to PolygonSurvey from my flight plan (but still keep the references to OSAMNav.c and OSAMNav.h) and try to compile, I still get the same RotateAndTranslateToWorld compile issue, see below:

************************************************************************************************************************
CC /home/nathanaherne/paparazzi3/var/Hopper/sim/OSAMNav.o
OSAMNav.c: In function ‘InitializePolygonSurvey’:
OSAMNav.c:66: warning: ‘Corners’ may be used uninitialized in this function
LD /home/nathanaherne/paparazzi3/var/Hopper/sim/simsitl
/home/nathanaherne/paparazzi3/var/Hopper/sim/OSAMNav.o: In function `PolygonSurvey':
OSAMNav.c:(.text+0x98): undefined reference
************************************************************************************************************************

Sometimes after the "OSAMNav.c:(.text+0x98): undefined reference" it references RotateAndTranslateToWorld" (a number of times) which is why I know this is where the issue is.

Kindest regards,
 
Nathan Aherne
Reddog Technology
Mob: 0402 555 080

On 27/05/2010, at 3:28 PM, Nathan Aherne wrote:

Hi All,

I have some further information about my issue, it seems like corners is not being initialised 90:

OSAMNav.c:66: warning: ‘Corners’ may be used uninitialized in this function

I am not sure why this warning is happening and this seems to be related to the RotateAndTranslateToWorld issue.

I am declaring my waypoints in a convex manner, so I am unsure about how I have managed to get this error to occur.

Kindest regards,
 
Nathan Aherne
Reddog Technology
Mob: 0402 555 080

On 27/05/2010, at 1:24 PM, Nathan Aherne wrote:

Hi All,

I sent this question a while ago and I am still having trouble with it.

 I am using Polygon survey and when I build I am getting an error : undefined reference to `RotateAndTranslateToWorld'

I have commented out the routines that I do not need from OSAMNav.c so I do not get compile errors from them (it seems this is still required).

I am using the latest SVN code.

Can someone point me in the right direction?

Kindest regards,
 
Nathan Aherne

On 07/05/2010, at 2:37 PM, Nathan Aherne wrote:

I am trying to build my flight plan that previously built fine using another laptop. I am using Polygon survey and when I build I am getting an error : undefined reference to `RotateAndTranslateToWorld'

I have commented out the routines that I do not need from OSAMNav.c so I do not get compile errors from them.

I am using the latest SVN code.

Can someone point me in the right direction?

Kindest regards,

Nathan Aherne
Reddog Technology
Web: www.reddog.com.au
Email: address@hidden
Mob: 0402 555 080

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel

_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel




No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.819 / Virus Database: 271.1.1/2902 - Release Date: 05/29/10 06:17:00
_______________________________________________
Paparazzi-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/paparazzi-devel


reply via email to

[Prev in Thread] Current Thread [Next in Thread]