Commit 3687e096 authored by Oleg Dzhimiev's avatar Oleg Dzhimiev

autocolors: next color if prev marker was deleted

parent 5f62859f
...@@ -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;
......
...@@ -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,
......
...@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment