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
15f53fb2
Commit
15f53fb2
authored
Sep 01, 2017
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set precision for some results
parent
a74b095d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
25 deletions
+37
-25
index.js
js/index.js
+1
-1
ui_align.js
js/ui_align.js
+36
-24
No files found.
js/index.js
View file @
15f53fb2
...
...
@@ -409,7 +409,7 @@ function init_maps(){
var
center
=
map
.
getCenter
();
var
zoom
=
map
.
getZoom
();
window
.
history
.
pushState
(
""
,
"x3d models index"
,
"?lat="
+
center
.
lat
+
"&lng="
+
center
.
lng
+
"&zoom="
+
zoom
+
"&rating="
+
SETTINGS
.
rating
);
window
.
history
.
pushState
(
""
,
"x3d models index"
,
"?lat="
+
center
.
lat
.
toFixed
(
8
)
+
"&lng="
+
center
.
lng
.
toFixed
(
8
)
+
"&zoom="
+
zoom
+
"&rating="
+
SETTINGS
.
rating
);
if
(
!
BLOCK_MOVEEND
){
...
...
js/ui_align.js
View file @
15f53fb2
...
...
@@ -172,6 +172,13 @@ function x3dom_align_hll(){
//de = -de;
//convert to conventional range
xyh
[
2
]
=
(
xyh
[
2
]
+
360
)
%
360
;
// round coordinates to 1e-8
xyh
[
0
]
=
xyh
[
0
].
toFixed
(
8
);
xyh
[
1
]
=
xyh
[
1
].
toFixed
(
8
);
// round degrees to 0.0001
xyh
[
2
]
=
xyh
[
2
].
toFixed
(
4
);
//init apply dialog
apply_alignment_dialog_hll
([
x0
,
y0
,
h0
],
xyh
,
counter
,
s1
,
de
);
...
...
@@ -345,6 +352,13 @@ function x3dom_align_hll2(){
//de = -de;
//convert to conventional range
xyh
[
2
]
=
(
xyh
[
2
]
+
360
)
%
360
;
// round coordinates to 1e-8
//xyh[0] = xyh[0].toFixed(8);
//xyh[1] = xyh[1].toFixed(8);
// round degrees to 0.0001
xyh
[
2
]
=
xyh
[
2
].
toFixed
(
4
);
//init apply dialog
apply_alignment_dialog_hll
([
x0
,
y0
,
h0
],
xyh
,
counter
,
s1
,
de
);
...
...
@@ -394,8 +408,16 @@ function x3dom_align_hll3(){
//calc distance error
de
=
distance_error
(
x0
,
y0
,(
h0
>
180
)?
h0
-
360
:
h0
);
//de = -de;
//convert to conventional range
xyh
[
2
]
=
(
xyh
[
2
]
+
360
)
%
360
;
// round coordinates to 1e-8
xyh
[
0
]
=
xyh
[
0
].
toFixed
(
8
);
xyh
[
1
]
=
xyh
[
1
].
toFixed
(
8
);
// round degrees to 0.0001
//xyh[2] = xyh[2].toFixed(4);
//init apply dialog
apply_alignment_dialog_hll
([
x0
,
y0
,
h0
],
xyh
,
counter
,
s1
,
de
);
...
...
@@ -427,7 +449,14 @@ function x3dom_align_art(){
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
);
result
.
v
[
0
]
=
result
.
v
[
0
]
*
180
/
Math
.
PI
;
// round degrees to 0.0001
result
.
v
[
0
]
=
result
.
v
[
0
].
toFixed
(
4
);
// round meters to 0.001
result
.
v
[
1
]
=
result
.
v
[
1
].
toFixed
(
3
);
apply_alignment_dialog_art
([
0
,
0
,
0
],[
result
.
v
[
0
],
0
,
result
.
v
[
1
]],
result
.
count
,
result
.
error
,
false
);
return
;
...
...
@@ -441,6 +470,13 @@ function x3dom_align_art(){
result
.
v
[
0
]
=
result
.
v
[
0
]
*
180
/
Math
.
PI
;
result
.
v
[
1
]
=
result
.
v
[
1
]
*
180
/
Math
.
PI
;
// round degrees to 0.0001
result
.
v
[
0
]
=
result
.
v
[
0
].
toFixed
(
4
);
// round degrees to 0.0001
result
.
v
[
1
]
=
result
.
v
[
1
].
toFixed
(
4
);
// round meters to 0.001
result
.
v
[
2
]
=
result
.
v
[
2
].
toFixed
(
3
);
//result.v[0] = bring_angle_to_range_deg(result.v[0],-180,180);
//result.v[1] = bring_angle_to_range_deg(result.v[1],-180,180);
...
...
@@ -671,27 +707,3 @@ function test_height_alignment_set3_2points(){
];
}
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