Commit c81cecee authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

height optimisation fix

parent f1b48c14
......@@ -194,6 +194,8 @@ function art_f_3d_i(i,v){
res += Math.cos(v[0])*Math.cos(v[1])*yi;
res += -Math.sin(v[0])*zi;
res += v[2];
return res;
}
......@@ -201,7 +203,7 @@ function art_f_3d_i(i,v){
function art_f_map_i(i,v){
var mark = Data.markers[i];
return (v[2]+mark.align.altitude);
return mark.align.altitude;
}
......@@ -243,7 +245,7 @@ function art_dr_dy_i(i,v){
}
function art_dr_da_i(i,v){
return -1;
return 1;
}
function art_l_i(i){
......@@ -258,5 +260,6 @@ function art_l_i(i){
}
function art_w_i(i,v){
return 1/art_l_i(i);
return 1;
//return 1/art_l_i(i);
}
......@@ -264,6 +264,7 @@ function distance_error(x,y,h){
function x3dom_align_art(){
//test_height_alignment_set1();
//test_height_alignment_set2();
if (Data.markers.length<2){
console.log("Too few points");
......@@ -400,7 +401,17 @@ function test_height_alignment_set1(){
}
function test_height_alignment_set2(){
//call set 1 but change heights
test_height_alignment_set1();
Data.markers[0].align.altitude = 0;
Data.markers[1].align.altitude = 0;
Data.markers[2].align.altitude = 0;
Data.markers[3].align.altitude = 2;
}
......
Markdown is supported
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