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
3687e096
Commit
3687e096
authored
7 years ago
by
Oleg Dzhimiev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
autocolors: next color if prev marker was deleted
parent
5f62859f
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
5 deletions
+10
-5
ui_align.js
js/ui_align.js
+4
-3
ui_init.js
js/ui_init.js
+4
-1
x3dom_init.js
js/x3dom_init.js
+2
-1
No files found.
js/ui_align.js
View file @
3687e096
...
@@ -139,7 +139,7 @@ function x3dom_align_hll(){
...
@@ -139,7 +139,7 @@ function x3dom_align_hll(){
//calc distance error
//calc distance error
de
=
distance_error
(
x0
,
y0
,(
h0
>
180
)?
h0
-
360
:
h0
);
de
=
distance_error
(
x0
,
y0
,(
h0
>
180
)?
h0
-
360
:
h0
);
de
=
-
de
;
//
de = -de;
//convert to conventional range
//convert to conventional range
xyh
[
2
]
=
(
xyh
[
2
]
+
360
)
%
360
;
xyh
[
2
]
=
(
xyh
[
2
]
+
360
)
%
360
;
//init apply dialog
//init apply dialog
...
@@ -254,9 +254,10 @@ function distance_error(x,y,h){
...
@@ -254,9 +254,10 @@ function distance_error(x,y,h){
var
weight
=
Math
.
sqrt
(
z_map
*
z_x3d
);
var
weight
=
Math
.
sqrt
(
z_map
*
z_x3d
);
wsum
+=
weight
;
wsum
+=
weight
;
sum
+=
(
1
/
z_map
-
1
/
z_x3d
)
*
weight
;
//sum += (1/z_map-1/z_x3d)*weight;
sum
+=
(
1
/
z_x3d
-
1
/
z_map
)
*
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
));
console
.
log
(
"Marker: "
+
i
+
", Camera heading: "
+
angle0
+
", Point azimuth: "
+
angle1
+
" , z_map: "
+
z_map
+
", z_x3d: "
+
z_x3d
+
", error^-1: "
+
(
1
/
z_
x3d
-
1
/
z_map
));
}
}
//sum = sum/Data.markers.length;
//sum = sum/Data.markers.length;
...
...
This diff is collapsed.
Click to expand it.
js/ui_init.js
View file @
3687e096
...
@@ -77,6 +77,8 @@ var AUTOCOLORS = [
...
@@ -77,6 +77,8 @@ var AUTOCOLORS = [
"#a4f"
//purple
"#a4f"
//purple
];
];
var
AUTOCOLORS_COUNTER
=
0
;
var
MARKER_PREFIX
=
"my-sph-"
;
var
MARKER_PREFIX
=
"my-sph-"
;
// no comments
// no comments
...
@@ -676,7 +678,8 @@ function leaf_events(){
...
@@ -676,7 +678,8 @@ function leaf_events(){
if
(
Lm
!=
undefined
){
if
(
Lm
!=
undefined
){
var
color
=
SETTINGS
.
markercolor
;
var
color
=
SETTINGS
.
markercolor
;
color
=
AUTOCOLORS
[
Data
.
markers
.
length
%
AUTOCOLORS
.
length
];
color
=
AUTOCOLORS
[
AUTOCOLORS_COUNTER
%
AUTOCOLORS
.
length
];
AUTOCOLORS_COUNTER
++
;
var
mark
=
new
X3L
({
var
mark
=
new
X3L
({
latitude
:
Lm
.
_latlng
.
lat
,
latitude
:
Lm
.
_latlng
.
lat
,
...
...
This diff is collapsed.
Click to expand it.
js/x3dom_init.js
View file @
3687e096
...
@@ -1479,7 +1479,8 @@ X3DOMObject.createNewMarker = function(x,y,z){
...
@@ -1479,7 +1479,8 @@ X3DOMObject.createNewMarker = function(x,y,z){
// Create marker for Data
// Create marker for Data
var
color
=
SETTINGS
.
markercolor
;
var
color
=
SETTINGS
.
markercolor
;
color
=
AUTOCOLORS
[
Data
.
markers
.
length
%
AUTOCOLORS
.
length
];
color
=
AUTOCOLORS
[
AUTOCOLORS_COUNTER
%
AUTOCOLORS
.
length
];
AUTOCOLORS_COUNTER
++
;
var
xyz_real
=
x3dom_scene_to_real
(
x
,
y
,
z
);
var
xyz_real
=
x3dom_scene_to_real
(
x
,
y
,
z
);
...
...
This diff is collapsed.
Click to expand it.
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