Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
x3domlet
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
3
Issues
3
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Elphel
x3domlet
Commits
c81cecee
Commit
c81cecee
authored
Jul 31, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
height optimisation fix
parent
f1b48c14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
3 deletions
+17
-3
align_functions.js
js/align_functions.js
+6
-3
ui_align.js
js/ui_align.js
+11
-0
No files found.
js/align_functions.js
View file @
c81cecee
...
@@ -194,6 +194,8 @@ function art_f_3d_i(i,v){
...
@@ -194,6 +194,8 @@ function art_f_3d_i(i,v){
res
+=
Math
.
cos
(
v
[
0
])
*
Math
.
cos
(
v
[
1
])
*
yi
;
res
+=
Math
.
cos
(
v
[
0
])
*
Math
.
cos
(
v
[
1
])
*
yi
;
res
+=
-
Math
.
sin
(
v
[
0
])
*
zi
;
res
+=
-
Math
.
sin
(
v
[
0
])
*
zi
;
res
+=
v
[
2
];
return
res
;
return
res
;
}
}
...
@@ -201,7 +203,7 @@ function art_f_3d_i(i,v){
...
@@ -201,7 +203,7 @@ function art_f_3d_i(i,v){
function
art_f_map_i
(
i
,
v
){
function
art_f_map_i
(
i
,
v
){
var
mark
=
Data
.
markers
[
i
];
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){
...
@@ -243,7 +245,7 @@ function art_dr_dy_i(i,v){
}
}
function
art_dr_da_i
(
i
,
v
){
function
art_dr_da_i
(
i
,
v
){
return
-
1
;
return
1
;
}
}
function
art_l_i
(
i
){
function
art_l_i
(
i
){
...
@@ -258,5 +260,6 @@ function art_l_i(i){
...
@@ -258,5 +260,6 @@ function art_l_i(i){
}
}
function
art_w_i
(
i
,
v
){
function
art_w_i
(
i
,
v
){
return
1
/
art_l_i
(
i
);
return
1
;
//return 1/art_l_i(i);
}
}
js/ui_align.js
View file @
c81cecee
...
@@ -264,6 +264,7 @@ function distance_error(x,y,h){
...
@@ -264,6 +264,7 @@ function distance_error(x,y,h){
function
x3dom_align_art
(){
function
x3dom_align_art
(){
//test_height_alignment_set1();
//test_height_alignment_set1();
//test_height_alignment_set2();
if
(
Data
.
markers
.
length
<
2
){
if
(
Data
.
markers
.
length
<
2
){
console
.
log
(
"Too few points"
);
console
.
log
(
"Too few points"
);
...
@@ -400,7 +401,17 @@ function test_height_alignment_set1(){
...
@@ -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
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment