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
8971d8cf
Commit
8971d8cf
authored
Jul 24, 2018
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tmp
parent
8e2d0106
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
numbers.calculus.extra.js
js/numbers/numbers.calculus.extra.js
+3
-0
ui_align.js
js/ui_align.js
+8
-5
No files found.
js/numbers/numbers.calculus.extra.js
View file @
8971d8cf
...
@@ -84,6 +84,9 @@ numbers.calculus.GaussNewton = function(v,n,r,dr,eps,w){
...
@@ -84,6 +84,9 @@ numbers.calculus.GaussNewton = function(v,n,r,dr,eps,w){
var
wsum
=
ws
(
v
,
n
)
var
wsum
=
ws
(
v
,
n
)
var
J
=
jacobian
(
v
,
n
,
dr
)
var
J
=
jacobian
(
v
,
n
,
dr
)
console
.
log
(
J
);
var
Jt
=
numbers
.
matrix
.
transpose
(
J
)
var
Jt
=
numbers
.
matrix
.
transpose
(
J
)
for
(
var
i
=
0
;
i
<
n
;
i
++
){
for
(
var
i
=
0
;
i
<
n
;
i
++
){
...
...
js/ui_align.js
View file @
8971d8cf
...
@@ -248,8 +248,6 @@ function apply_alignment_dialog_hll(xyh0,xyh1,c,e,de){
...
@@ -248,8 +248,6 @@ function apply_alignment_dialog_hll(xyh0,xyh1,c,e,de){
*/
*/
function
apply_alignment_hll
(
xyh
){
function
apply_alignment_hll
(
xyh
){
//console.log("Applying Ze Alignment!");
for
(
var
i
=
0
;
i
<
xyh
.
length
;
i
++
){
for
(
var
i
=
0
;
i
<
xyh
.
length
;
i
++
){
xyh
[
i
]
=
parseFloat
(
xyh
[
i
]);
xyh
[
i
]
=
parseFloat
(
xyh
[
i
]);
}
}
...
@@ -375,13 +373,13 @@ function x3dom_align_hll3(){
...
@@ -375,13 +373,13 @@ function x3dom_align_hll3(){
// need at least 3 points
// need at least 3 points
if
(
Data
.
markers
!=
undefined
){
if
(
Data
.
markers
!=
undefined
){
if
(
Data
.
markers
.
length
<
2
){
if
(
Data
.
markers
.
length
<
1
){
var
msg
=
"Alignment error: place at least
2 markers
"
;
var
msg
=
"Alignment error: place at least
1 marker
"
;
ui_showMessage
(
"window-error"
,
msg
);
ui_showMessage
(
"window-error"
,
msg
);
return
-
1
;
return
-
1
;
}
}
}
else
{
}
else
{
var
msg
=
"Alignment error: place at least
2 markers
"
;
var
msg
=
"Alignment error: place at least
1 marker
"
;
ui_showMessage
(
"window-error"
,
msg
);
ui_showMessage
(
"window-error"
,
msg
);
return
-
1
;
return
-
1
;
}
}
...
@@ -447,10 +445,13 @@ function x3dom_align_art(){
...
@@ -447,10 +445,13 @@ function x3dom_align_art(){
return
;
return
;
}
}
var
tra0
=
[
Data
.
camera
.
kml
.
tilt
-
90
,
Data
.
camera
.
kml
.
roll
,
Data
.
camera
.
kml
.
altitude
];
if
(
Data
.
markers
.
length
==
2
){
if
(
Data
.
markers
.
length
==
2
){
console
.
log
(
"2 Markers provided: align Height'n'Tilt only (while Roll = 0)"
);
console
.
log
(
"2 Markers provided: align Height'n'Tilt only (while Roll = 0)"
);
// use [tra[0],tra[2]]
var
result
=
numbers
.
calculus
.
GaussNewton
([
0
,
0
],
Data
.
markers
.
length
,
art2_r_i
,[
art2_dr_dx_i
,
art2_dr_da_i
],
epsilon
,
art2_w_i
);
var
result
=
numbers
.
calculus
.
GaussNewton
([
0
,
0
],
Data
.
markers
.
length
,
art2_r_i
,[
art2_dr_dx_i
,
art2_dr_da_i
],
epsilon
,
art2_w_i
);
console
.
log
(
result
);
console
.
log
(
result
);
...
@@ -562,6 +563,8 @@ function apply_alignment_art(tra){
...
@@ -562,6 +563,8 @@ function apply_alignment_art(tra){
// no need
// no need
Map
.
marker
.
_syncMeasureMarkersToBasePoint
();
Map
.
marker
.
_syncMeasureMarkersToBasePoint
();
// sets in degrees?
Map
.
marker
.
setHeading
(
Data
.
camera
.
heading
);
x3d_initial_camera_placement
();
x3d_initial_camera_placement
();
}
}
...
...
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