*** empty log message ***

This commit is contained in:
Franck Wajsburt 2002-09-03 11:37:10 +00:00
parent 55a2a0202d
commit 5afebf41a0
1 changed files with 157 additions and 54 deletions

View File

@ -123,6 +123,7 @@ int main (int ac, char *av[])
{RDS_LAYER_ALU6, RDS_LAYER_TALU6}}; {RDS_LAYER_ALU6, RDS_LAYER_TALU6}};
int Index; int Index;
ht_t *dejavu = htinit (63179); ht_t *dejavu = htinit (63179);
ht_t *dejala = htinit (63179);
char buffer[1000]; char buffer[1000];
/* read parameters & environment */ /* read parameters & environment */
@ -391,34 +392,72 @@ int main (int ac, char *av[])
); );
first = 0; first = 0;
} }
if ((IsRdsObstacle(ScanRec) & OBSTACLE_NORTH) == 0) /* les fils font 4 lambdas pas 5 pour pouvoir retrouver leur orientation */
{ if ((Layer == RDS_ALU2) || (Layer == RDS_ALU4))
NewRec->DY += Pitch-RDS_LAMBDA; /* les fils font 4 lambdas pas 5*/ {
} if ((IsRdsObstacle(ScanRec) & OBSTACLE_EAST) == 0)
else {
if ((IsRdsObstacle(ScanRec) & OBSTACLE_EAST) == 0) NewRec->DX += Pitch-RDS_LAMBDA;
{ NewRec->X -= Pitch-RDS_LAMBDA;
NewRec->DX += Pitch-RDS_LAMBDA; sprintf (buffer, "%d %d %d %d %d",
NewRec->X -= Pitch-RDS_LAMBDA; ScanRec->X, ScanRec->Y, ScanRec->DX, ScanRec->DY, ScanRec->FLAGS);
} }
else else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_SOUTH) == 0) if ((IsRdsObstacle(ScanRec) & OBSTACLE_WEST) == 0)
{ {
NewRec->DY += Pitch-RDS_LAMBDA; NewRec->DX += Pitch-RDS_LAMBDA;
NewRec->Y -= Pitch-RDS_LAMBDA; }
} else
else if ((IsRdsObstacle(ScanRec) & OBSTACLE_NORTH) == 0)
if ((IsRdsObstacle(ScanRec) & OBSTACLE_WEST) == 0) {
{ NewRec->DY += Pitch-RDS_LAMBDA;
NewRec->DX += Pitch-RDS_LAMBDA; }
} else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_SOUTH) == 0)
{
NewRec->DY += Pitch-RDS_LAMBDA;
NewRec->Y -= Pitch-RDS_LAMBDA;
}
else
{
if (first) printf ("LAYER = %s\n", RDS_LAYER_NAME[Layer]);
printf ("ERROR X=%.2f, Y=%.2f, DX=%.2f, DY=%.2f CANNOT BE REPAIRED\n",
(float)ScanRec->X/RDS_UNIT, (float)ScanRec->Y/RDS_UNIT,
(float)ScanRec->DX/RDS_UNIT, (float)ScanRec->DY/RDS_UNIT);
first = 0;
}
}
else else
{ {
if (first) printf ("LAYER = %s\n", RDS_LAYER_NAME[Layer]); if ((IsRdsObstacle(ScanRec) & OBSTACLE_NORTH) == 0)
printf ("ERROR X=%.2f, Y=%.2f, DX=%.2f, DY=%.2f CANNOT BE REPAIRED\n", {
(float)ScanRec->X/RDS_UNIT, (float)ScanRec->Y/RDS_UNIT, NewRec->DY += Pitch-RDS_LAMBDA;
(float)ScanRec->DX/RDS_UNIT, (float)ScanRec->DY/RDS_UNIT); }
first = 0; else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_SOUTH) == 0)
{
NewRec->DY += Pitch-RDS_LAMBDA;
NewRec->Y -= Pitch-RDS_LAMBDA;
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_EAST) == 0)
{
NewRec->DX += Pitch-RDS_LAMBDA;
NewRec->X -= Pitch-RDS_LAMBDA;
}
else
if ((IsRdsObstacle(ScanRec) & OBSTACLE_WEST) == 0)
{
NewRec->DX += Pitch-RDS_LAMBDA;
}
else
{
if (first) printf ("LAYER = %s\n", RDS_LAYER_NAME[Layer]);
printf ("ERROR X=%.2f, Y=%.2f, DX=%.2f, DY=%.2f CANNOT BE REPAIRED\n",
(float)ScanRec->X/RDS_UNIT, (float)ScanRec->Y/RDS_UNIT,
(float)ScanRec->DX/RDS_UNIT, (float)ScanRec->DY/RDS_UNIT);
first = 0;
}
} }
} }
else else
@ -475,26 +514,58 @@ int main (int ac, char *av[])
{ {
SHRINK_BOT = 3; SHRINK_BOT = 3;
SHRINK_TOP = 1; SHRINK_TOP = 1;
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + SHRINK_BOT * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - SHRINK_TOP * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - RDS_LAMBDA)) / RDS_UNIT ,
"obs");
} }
else else
{ {
SHRINK_BOT = 1; SHRINK_BOT = 1;
SHRINK_TOP = 3; SHRINK_TOP = 3;
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + SHRINK_BOT * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - SHRINK_TOP * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - 0 * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - 0 * RDS_LAMBDA)) / RDS_UNIT ,
"obs");
} }
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + SHRINK_BOT * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - SHRINK_TOP * RDS_LAMBDA)) / RDS_UNIT ,
ScanRec->NAME);
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DX) / RDS_UNIT,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY - RDS_LAMBDA)) / RDS_UNIT ,
"obs");
} }
else else
{ {
@ -503,26 +574,58 @@ int main (int ac, char *av[])
{ {
SHRINK_RIG = 3; SHRINK_RIG = 3;
SHRINK_LEF = 1; SHRINK_LEF = 1;
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + SHRINK_RIG * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - SHRINK_LEF * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
"obs");
} }
else else
{ {
SHRINK_RIG = 1; SHRINK_RIG = 1;
SHRINK_LEF = 3; SHRINK_LEF = 3;
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + SHRINK_RIG * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - SHRINK_LEF * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
/*
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
*/
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - 0 * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
"obs");
} }
addphseg (PhFig, MbkLayer,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + SHRINK_RIG * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - SHRINK_LEF * RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
ScanRec->NAME);
addphseg (PhFig, MbkLayer_bis,
(SCALE_X * ScanRec->DY) / RDS_UNIT,
(SCALE_X * (ScanRec->X + RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
(SCALE_X * (ScanRec->X + ScanRec->DX - RDS_LAMBDA)) / RDS_UNIT ,
(SCALE_X * (ScanRec->Y + ScanRec->DY / 2)) / RDS_UNIT ,
"obs");
} }
} }
for (PhSeg = PhFig->PHSEG; PhSeg; PhSeg = PhSeg->NEXT) for (PhSeg = PhFig->PHSEG; PhSeg; PhSeg = PhSeg->NEXT)