debugging
This commit is contained in:
parent
d645f9e197
commit
e61437be78
4 changed files with 27 additions and 22 deletions
|
@ -3,5 +3,7 @@
|
|||
<option name="DESCRIPTION" value="Uncommitted changes before Update at 3/24/25, 12:40 PM [Changes]" />
|
||||
<binary>
|
||||
<option name="BEFORE_PATH" value="crates/client/dist/wxbox-client-505f3eac107f11ba_bg.wasm" />
|
||||
<option name="AFTER_PATH" />
|
||||
<option name="SHELVED_PATH" />
|
||||
</binary>
|
||||
</changelist>
|
4
.idea/workspace.xml
generated
4
.idea/workspace.xml
generated
|
@ -8,7 +8,9 @@
|
|||
</component>
|
||||
<component name="ChangeListManager">
|
||||
<list default="true" id="2d855648-9644-469a-afa2-59beb52bb1d6" name="Changes" comment="feat: client work">
|
||||
<change beforePath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_3_24_25__12_40PM__Changes_.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/shelf/Uncommitted_changes_before_Update_at_3_24_25__12_40PM__Changes_.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/lib/Map.svelte" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/lib/Map.svelte" afterDir="false" />
|
||||
<change beforePath="$PROJECT_DIR$/client/src/lib/map/fragment.glsl" beforeDir="false" afterPath="$PROJECT_DIR$/client/src/lib/map/fragment.glsl" afterDir="false" />
|
||||
</list>
|
||||
<option name="SHOW_DIALOG" value="false" />
|
||||
|
@ -17,7 +19,7 @@
|
|||
<option name="LAST_RESOLUTION" value="IGNORE" />
|
||||
</component>
|
||||
<component name="DarkyenusTimeTracker">
|
||||
<option name="totalTimeSeconds" value="1475" />
|
||||
<option name="totalTimeSeconds" value="2996" />
|
||||
</component>
|
||||
<component name="Git.Settings">
|
||||
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
|
||||
|
|
|
@ -249,6 +249,7 @@
|
|||
gl.getUniformLocation(this.program, 'startRange'),
|
||||
drd.radials[0].product?.data?.startRange
|
||||
);
|
||||
console.log(drd.radials[0].product?.data?.startRange);
|
||||
gl.uniform1f(
|
||||
gl.getUniformLocation(this.program, 'sampleInterval'),
|
||||
drd.radials[0].product?.data?.sampleInterval
|
||||
|
|
|
@ -78,15 +78,33 @@ void main() {
|
|||
float deltaLambda = radians(lng - radarLng);
|
||||
float d_m = acos(sin(phi1) * sin(phi2) + cos(phi1) * cos(phi2) * cos(deltaLambda)) * R;
|
||||
|
||||
//fragColor = vec4(d_m / 459296.0, 0.0, 0.0, 1.0);
|
||||
//return;
|
||||
float distance_km = d_m / 1000.0;
|
||||
float first_gate_distance_km = startRange / 1000.0;
|
||||
float gate_spacing_km = sampleInterval / 1000.0;
|
||||
int gate = int(round((distance_km - first_gate_distance_km) / gate_spacing_km));
|
||||
|
||||
float y = sin(lambda2 - lambda1) * cos(phi2);
|
||||
float x = cos(phi1) * sin(phi2) - sin(phi1) * cos(phi2) * cos(lambda2 - lambda1);
|
||||
float theta = atan(y, x);
|
||||
float azimuth = mod((theta * 180.0 / PI + 360.0), 360.0);
|
||||
|
||||
fragColor = vec4(azimuth / 360.0, 0.0, 0.0, 1.0);
|
||||
if (distance_km < 10.0) {
|
||||
fragColor = vec4(0.0,1.0,0.0,1.0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (distance_km < first_gate_distance_km || gate < 0) {
|
||||
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (gate > 1832) {
|
||||
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
fragColor = vec4(float(gate) / 1832.0, 0.0, 0.0, 1.0);
|
||||
//fragColor = vec4(float(gate) / 1832.0, 0.0, azimuth / 360.0, 1.0);
|
||||
return;
|
||||
|
||||
LocateRadialResult maybeRadial = locateRadial(azimuth);
|
||||
|
@ -95,25 +113,7 @@ void main() {
|
|||
return;
|
||||
}
|
||||
|
||||
float distance_km = d_m / 1000.0;
|
||||
float first_gate_distance_km = startRange / 1000.0;
|
||||
float gate_spacing_km = sampleInterval / 1000.0;
|
||||
|
||||
if (distance_km < first_gate_distance_km) {
|
||||
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
int gate = int(round((distance_km - first_gate_distance_km) / gate_spacing_km));
|
||||
if (gate > 1832) {
|
||||
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!maybeRadial.didFindRadial) {
|
||||
fragColor = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
return;
|
||||
}
|
||||
|
||||
ivec2 coords = ivec2(maybeRadial.radialIndex, gate);
|
||||
float rawValue = texelFetch(scaledData, coords, 0).r;
|
||||
|
|
Loading…
Add table
Reference in a new issue