Commit 4ca50b10 authored by Leonardo Solis's avatar Leonardo Solis
Browse files

corrected assignment of map_angle to genes in LS


Former-commit-id: 28ccc213
parent 994e7836
......@@ -151,9 +151,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3); }
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3); }}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3); }
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3); }}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS1_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -177,9 +180,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3); }
else { tmp3 = map_angle_360(tmp3); }}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3); }
else { tmp3 = map_angle_360(tmp3); }}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS1_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS2_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS2_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3); }
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3); }}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3); }
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3); }}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS3_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS3_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS4_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS4_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS5_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS5_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS6_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS6_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS7_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,13 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS7_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS8_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS8_genotype, tmp3);
......
......@@ -154,9 +154,12 @@ while(valid) {
fixedpt fixpt_tmp2 = fixpt_tmp1 + tmp_bias;
fixedpt fixpt_tmp3 = (positive_direction == true)? (genotype [i] + fixpt_tmp2):
(genotype [i] - fixpt_tmp2);
/*
if (i>3) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
*/
if (i>2) {if (i==4) { fixpt_tmp3 = fixedpt_map_angle_180(fixpt_tmp3);}
else { fixpt_tmp3 = fixedpt_map_angle_360(fixpt_tmp3);}}
entity_possible_new_genotype [i] = fixpt_tmp3;
write_channel_altera(chan_LS2Conf_LS9_genotype, fixedpt_tofloat(fixpt_tmp3));
......@@ -180,9 +183,12 @@ while(valid) {
float tmp2 = tmp1 + tmp_bias;
float tmp3 = (positive_direction == true)? (genotype [i] + tmp2): (genotype [i] - tmp2);
/*
if (i>3) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
*/
if (i>2) {if (i==4) { tmp3 = map_angle_180(tmp3);}
else { tmp3 = map_angle_360(tmp3);}}
entity_possible_new_genotype [i] = tmp3;
write_channel_altera(chan_LS2Conf_LS9_genotype, tmp3);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment