new homework

This commit is contained in:
2026-05-28 15:38:58 -07:00
parent 859ac19ac9
commit f79d70de9f

View File

@@ -1,48 +1,20 @@
--- ● Good commit — all four issues are now addressed. A couple of small things to note:
Still Needs Attention
1. float altitude is now listed twice in target_data_structure (lines 130 and 136).
float altitude; // in meters ← line 130, was originally "float height"
...
float altitude; // meters, but 0 for boats ← line 136
It looks like the original float height (structural height of the vessel) got accidentally renamed to altitude,
creating a duplicate. The structural height of the vessel is a distinct concept from flight altitude. float
height should be restored at line 130, or the duplicate removed if structural height is intentionally dropped
from the structure.
2. getMaterialProfile parameter still mismatches the switch.
The function signature is getMaterialProfile(int aisTypeCode) but the switch operates on vessel_type. In actual
C++ code, vessel_type would be out of scope inside the function — the parameter would need to be named
vessel_type, or the switch would need to use aisTypeCode. Minor, but would cause a compile error.
3. Missing semicolons on the last two SSBO struct fields (lines 154155). The "uniform" wording on dynamic reflectivity is slightly off. The note you added says the dynamic reflectivity
int32_t police_boat // no semicolon "is to be passed to the shaders as a uniform," but reflectivity is a field inside
int type // no semicolon target_data_to_shader_structure, which goes through the SSBO — not a uniform. The correct statement is: the
Would be compile errors in real code. dynamic (glint-fluctuated) value is computed at SSBO write time and packed into the SSBO struct's reflectivity
field. It never gets written back to the database. The intent is right, just the word "uniform" is misleading
4. binary may_need_update in the database schema (line 1001) is still not a proper type. here.
int32_t police_boat was correctly fixed, but may_need_update still uses binary. In PostgreSQL this should be
BOOLEAN or SMALLINT. Should be consistent with police_boat.
5. timestamp elapsed_seconds — the name and type contradict each other. Minor formatting issue in the database workflow — step 4 appears twice (once as 4 and once as 4a/4b), and step 6
A PostgreSQL TIMESTAMP stores a calendar date+time (e.g., 2026-05-28 14:30:00), not a count of elapsed seconds. describes two actions (INSERT + run getMaterialProfile()) that might read more clearly if the derivation step
If the intent is seconds-since-epoch, the column type should be BIGINT (and the name elapsed_seconds makes comes before the INSERT, since you'd want the derived values computed before writing the new record to
sense). If the intent is an actual timestamp, use TIMESTAMP and name it last_seen or similar. The current PostgreSQL.
combination is confusing.
--- Neither of these affects implementation — any developer reading it will understand what you mean. But if you
Minor want to tighten the wording before moving on to the simulator, those are the two spots worth a quick pass.
Otherwise the traffic cop spec is complete and you're good to proceed.
- Line 1185: typo "shouse" → "should"
- The unresolved architectural question from before (does traffic_cop filter for the currently active scope
only, or does it maintain separate lists per radar?) is still implicit. This may become clear once the simulator
section is written, so it may not need addressing now.
✻ Crunched for 59s
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
 
──────────────────────────────────────────────────────────────────────────────────────────────────────────────────
? for shortcuts · ← for agents
✻ Sautéed for 23s