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
72e22368
Commit
72e22368
authored
Aug 29, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. weights for d^-1 2. fixed marker placing
parent
e1e6b047
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
ui_align.js
js/ui_align.js
+8
-3
ui_init.js
js/ui_init.js
+6
-1
No files found.
js/ui_align.js
View file @
72e22368
...
...
@@ -241,6 +241,7 @@ function apply_alignment_hll(xyh){
function
distance_error
(
x
,
y
,
h
){
var
sum
=
0
;
var
wsum
=
0
;
for
(
var
i
=
0
;
i
<
Data
.
markers
.
length
;
i
++
){
var
angle0
=
h
;
...
...
@@ -248,14 +249,18 @@ function distance_error(x,y,h){
var
z_map
=
Math
.
cos
(
Math
.
PI
/
180
*
(
angle0
-
angle1
))
*
Data
.
markers
[
i
].
d_map
;
//var z_x3d = -Data.markers[i].align.z;
var
z_x3d
=
x3dom_2d_distance
(
Data
.
markers
[
i
].
align
.
real
.
x
,
Data
.
markers
[
i
].
align
.
real
.
z
,
false
);
sum
+=
1
/
z_map
-
1
/
z_x3d
;
var
weight
=
Math
.
sqrt
(
z_map
*
z_x3d
);
wsum
+=
weight
;
sum
+=
(
1
/
z_map
-
1
/
z_x3d
)
*
weight
;
console
.
log
(
"Marker: "
+
i
+
", Camera heading: "
+
angle0
+
", Point azimuth: "
+
angle1
+
" , z_map: "
+
z_map
+
", z_x3d: "
+
z_x3d
+
", error^-1: "
+
(
1
/
z_map
-
1
/
z_x3d
));
}
sum
=
sum
/
Data
.
markers
.
length
;
//sum = sum/Data.markers.length;
sum
=
sum
/
wsum
;
console
.
log
(
"Final sum averaged: "
+
sum
);
...
...
js/ui_init.js
View file @
72e22368
...
...
@@ -704,7 +704,12 @@ function leaf_events(){
altitude
:
0
,
x
:
0
,
y
:
0
,
z
:
0
z
:
0
,
real
:{
x
:
0
,
y
:
0
,
z
:
0
}
};
mark
.
d_x3d
=
"<font style='color:red;'>drag over 3D</font>"
;
...
...
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