i am not able find exact calculation to find line of sight calculation from one latitude and longitude with human vision over buildings
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
code-------------------
var theta=360 ; //bearing in degre
var R= 5000 ; // distance in meters
for(var i=0;i<=theta;i++){
var dx1 = R * Math.cos(i) ;
console.log("dx=="+dx1);
var dy1 = R * Math.sin(i);
console.log("dy=="+dy1);
var delta_longitude1 = dx1/(111320*Math.cos(42.25732445310803));
console.log(delta_longitude1);
var delta_latitude1 = dy1/110540;
console.log(delta_latitude1);
Final_longitude1 = longitude + delta_longitude1;
Final_latitude1 = latitude + delta_latitude1;
var value=longitude+","+latitude+","+height+","+Final_longitude1+","+Final_latitude1+","+height;
var arr=[value];
var res = value.split(",");
glowingLine = viewer.entities.add({
name : 'Glowing blue line on the surface',
polyline : {
//positions : Cesium.Cartesian3.fromDegreesArray(res),
positions : Cesium.Cartesian3.fromDegreesArrayHeights(res),
width : 1,
material : Cesium.Color.ORANGE.withAlpha(0.5),
}
});
-------------------------------------
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I want to show a line of sight visibility thru human vision and only with one latitude and longitude & 360 as bearing angle as input and I want to show vision over buildings how much a human can see from top of the building.
4. The Cesium version you're using, your operating system and browser.
cesuim 1.39, browser- google chrome,OS= windows 10
var viewer = new Cesium.Viewer('cesiumContainer');var thetaMax = 360; //bearing in degreesvar dTheta = 10;var R = 5000; // distance in meters
var centerLLH = Cesium.Cartographic.fromDegrees(-75.5966, 40.0386 , 0.0); var centerXYZ = Cesium.Cartographic.toCartesian(centerLLH);
// We'll need the transformation from local coordinates to Earth-Centered, Earth-Fixedvar enuTransform = Cesium.Transforms.eastNorthUpToFixedFrame(centerXYZ);
for (var theta = 0; theta < thetaMax; theta += dTheta) {
var dX = R * Math.cos(Cesium.Math.toRadians(theta)) ; var dY = R * Math.sin(Cesium.Math.toRadians(theta));
var limitENU = new Cesium.Cartesian4(dX, dY, 0.0, 1.0); // Transform point in local coordinate system (East-North-Up) to ECEF var limitECF = new Cesium.Cartesian4(); limitECF = Cesium.Matrix4.multiplyByVector(enuTransform, limitENU, limitECF);
var glowingLine = viewer.entities.add({ name : 'Ray at ' + theta + ' degrees ENU', polyline : { positions : [ centerXYZ, limitECF ], width : 1, material : Cesium.Color.ORANGE.withAlpha(0.5), } });}
var centerEntity = viewer.entities.add({ name: 'Center', position: new Cesium.ConstantPositionProperty(centerXYZ), point: { size: 8 }});viewer.zoomTo(centerEntity);
--
You received this message because you are subscribed to a topic in the Google Groups "cesium-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/cesium-dev/HS-c_0oyAmQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and all its topics, send an email to cesium-dev+...@googlegroups.com.