diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..723ef36f --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.idea \ No newline at end of file diff --git a/README.md b/README.md index 6ba5c3c0..f6fccc99 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,8 @@ -# Basic template for iDP report +# CDE4301 ASI-401 Swarm of Drones project -## Tools used +Welcome to the GitHub repository for our project! You may find our project site [here](https://cde-4301-asi-401.github.io/midterm-report/) + +## Acknowledgement for Tools used - Grid.js for generating table - Shoelace for custom web-components + diff --git a/assets/arena.jpg b/assets/arena.jpg new file mode 100644 index 00000000..ab41abe2 Binary files /dev/null and b/assets/arena.jpg differ diff --git a/assets/blackranger.png b/assets/blackranger.png old mode 100644 new mode 100755 diff --git a/assets/blueranger.png b/assets/blueranger.png old mode 100644 new mode 100755 diff --git a/assets/matthew/arena.png b/assets/matthew/arena.png new file mode 100644 index 00000000..dcef13d8 Binary files /dev/null and b/assets/matthew/arena.png differ diff --git a/assets/matthew/arenaWithPillarZone.png b/assets/matthew/arenaWithPillarZone.png new file mode 100644 index 00000000..ebb8aa48 Binary files /dev/null and b/assets/matthew/arenaWithPillarZone.png differ diff --git a/assets/matthew/hoveringTest.png b/assets/matthew/hoveringTest.png new file mode 100644 index 00000000..c8a7cf13 Binary files /dev/null and b/assets/matthew/hoveringTest.png differ diff --git a/assets/matthew/lineOfSightDoesNotPickUpPillar.png b/assets/matthew/lineOfSightDoesNotPickUpPillar.png new file mode 100644 index 00000000..07f21a16 Binary files /dev/null and b/assets/matthew/lineOfSightDoesNotPickUpPillar.png differ diff --git a/assets/matthew/matthew.png b/assets/matthew/matthew.png new file mode 100644 index 00000000..cf8ed30b Binary files /dev/null and b/assets/matthew/matthew.png differ diff --git a/assets/matthew/mockUp.png b/assets/matthew/mockUp.png new file mode 100644 index 00000000..58ee2145 Binary files /dev/null and b/assets/matthew/mockUp.png differ diff --git a/assets/matthew/newPillar.png b/assets/matthew/newPillar.png new file mode 100644 index 00000000..503b9f82 Binary files /dev/null and b/assets/matthew/newPillar.png differ diff --git a/assets/matthew/oldPillar.png b/assets/matthew/oldPillar.png new file mode 100644 index 00000000..a0ef7893 Binary files /dev/null and b/assets/matthew/oldPillar.png differ diff --git a/assets/matthew/studio1.png b/assets/matthew/studio1.png new file mode 100644 index 00000000..1df74f59 Binary files /dev/null and b/assets/matthew/studio1.png differ diff --git a/assets/matthew/tlabComputerRoom.png b/assets/matthew/tlabComputerRoom.png new file mode 100644 index 00000000..c098c93e Binary files /dev/null and b/assets/matthew/tlabComputerRoom.png differ diff --git a/assets/matthew/zigZagFlightPath.png b/assets/matthew/zigZagFlightPath.png new file mode 100644 index 00000000..a64cae7d Binary files /dev/null and b/assets/matthew/zigZagFlightPath.png differ diff --git a/assets/pinkranger.png b/assets/pinkranger.png old mode 100644 new mode 100755 diff --git a/assets/redranger.png b/assets/redranger.png old mode 100644 new mode 100755 diff --git a/assets/section-1/figure_1_10_specifications_of_danger_zones.png b/assets/section-1/figure_1_10_specifications_of_danger_zones.png new file mode 100644 index 00000000..7a6257c1 Binary files /dev/null and b/assets/section-1/figure_1_10_specifications_of_danger_zones.png differ diff --git a/assets/section-1/figure_1_11_penalty_process_avoid_danger_zones.png b/assets/section-1/figure_1_11_penalty_process_avoid_danger_zones.png new file mode 100644 index 00000000..cc75b697 Binary files /dev/null and b/assets/section-1/figure_1_11_penalty_process_avoid_danger_zones.png differ diff --git a/assets/section-1/figure_1_12_specifications_of_navigation_aids.png b/assets/section-1/figure_1_12_specifications_of_navigation_aids.png new file mode 100644 index 00000000..598cf7d2 Binary files /dev/null and b/assets/section-1/figure_1_12_specifications_of_navigation_aids.png differ diff --git a/assets/section-1/figure_1_13_potential_navigation_aids.png b/assets/section-1/figure_1_13_potential_navigation_aids.png new file mode 100644 index 00000000..dcba5fe9 Binary files /dev/null and b/assets/section-1/figure_1_13_potential_navigation_aids.png differ diff --git a/assets/section-1/figure_1_14_specifications_of_pillar_obstacles.png b/assets/section-1/figure_1_14_specifications_of_pillar_obstacles.png new file mode 100644 index 00000000..873bcd31 Binary files /dev/null and b/assets/section-1/figure_1_14_specifications_of_pillar_obstacles.png differ diff --git a/assets/section-1/figure_1_15_potential_pillar_obstacles.png b/assets/section-1/figure_1_15_potential_pillar_obstacles.png new file mode 100644 index 00000000..4d4a31c8 Binary files /dev/null and b/assets/section-1/figure_1_15_potential_pillar_obstacles.png differ diff --git a/assets/section-1/figure_1_1_indoorArena.png b/assets/section-1/figure_1_1_indoorArena.png new file mode 100644 index 00000000..99191298 Binary files /dev/null and b/assets/section-1/figure_1_1_indoorArena.png differ diff --git a/assets/section-1/figure_1_2_scoringTable.png b/assets/section-1/figure_1_2_scoringTable.png new file mode 100644 index 00000000..fa2f2161 Binary files /dev/null and b/assets/section-1/figure_1_2_scoringTable.png differ diff --git a/assets/section-1/figure_1_3_SAFMC_2025_playing_field.png b/assets/section-1/figure_1_3_SAFMC_2025_playing_field.png new file mode 100644 index 00000000..ca174a99 Binary files /dev/null and b/assets/section-1/figure_1_3_SAFMC_2025_playing_field.png differ diff --git a/assets/section-1/figure_1_4_SAFMC_2025_dimensions_of_elements.png b/assets/section-1/figure_1_4_SAFMC_2025_dimensions_of_elements.png new file mode 100644 index 00000000..1497ee61 Binary files /dev/null and b/assets/section-1/figure_1_4_SAFMC_2025_dimensions_of_elements.png differ diff --git a/assets/section-1/figure_1_5_known_search_area.png b/assets/section-1/figure_1_5_known_search_area.png new file mode 100644 index 00000000..6299cb98 Binary files /dev/null and b/assets/section-1/figure_1_5_known_search_area.png differ diff --git a/assets/section-1/figure_1_6_unknown_search_area.png b/assets/section-1/figure_1_6_unknown_search_area.png new file mode 100644 index 00000000..fa779893 Binary files /dev/null and b/assets/section-1/figure_1_6_unknown_search_area.png differ diff --git a/assets/section-1/figure_1_7_pillar_area.png b/assets/section-1/figure_1_7_pillar_area.png new file mode 100644 index 00000000..347ebf95 Binary files /dev/null and b/assets/section-1/figure_1_7_pillar_area.png differ diff --git a/assets/section-1/figure_1_8_specifications_of_victim_markers.png b/assets/section-1/figure_1_8_specifications_of_victim_markers.png new file mode 100644 index 00000000..a3104165 Binary files /dev/null and b/assets/section-1/figure_1_8_specifications_of_victim_markers.png differ diff --git a/assets/section-1/figure_1_9_scoring_process_rescue_victims.png b/assets/section-1/figure_1_9_scoring_process_rescue_victims.png new file mode 100644 index 00000000..fad56d01 Binary files /dev/null and b/assets/section-1/figure_1_9_scoring_process_rescue_victims.png differ diff --git a/assets/section-10/figure_10_1_project_gantt_chart.png b/assets/section-10/figure_10_1_project_gantt_chart.png new file mode 100644 index 00000000..b195c29f Binary files /dev/null and b/assets/section-10/figure_10_1_project_gantt_chart.png differ diff --git a/assets/section-2/figure_2_1_1_basic_bitcraze_crazyflie_without_add_ons.png b/assets/section-2/figure_2_1_1_basic_bitcraze_crazyflie_without_add_ons.png new file mode 100644 index 00000000..961963f1 Binary files /dev/null and b/assets/section-2/figure_2_1_1_basic_bitcraze_crazyflie_without_add_ons.png differ diff --git a/assets/section-2/figure_2_1_2_1_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png b/assets/section-2/figure_2_1_2_1_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png new file mode 100644 index 00000000..3bb85f26 Binary files /dev/null and b/assets/section-2/figure_2_1_2_1_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png differ diff --git a/assets/section-2/figure_2_1_2_2_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png b/assets/section-2/figure_2_1_2_2_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png new file mode 100644 index 00000000..6a21bee3 Binary files /dev/null and b/assets/section-2/figure_2_1_2_2_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png differ diff --git a/assets/section-2/figure_2_1_2_3_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png b/assets/section-2/figure_2_1_2_3_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png new file mode 100644 index 00000000..f7c06d8a Binary files /dev/null and b/assets/section-2/figure_2_1_2_3_expansion_decks_left_ai_deck_middle_flow_deck_right_multi_ranger_deck.png differ diff --git a/assets/section-2/figure_2_1_3_configuration_of_upgraded_crazyflie_with_expansion_decks.png b/assets/section-2/figure_2_1_3_configuration_of_upgraded_crazyflie_with_expansion_decks.png new file mode 100644 index 00000000..0f1b27c6 Binary files /dev/null and b/assets/section-2/figure_2_1_3_configuration_of_upgraded_crazyflie_with_expansion_decks.png differ diff --git a/assets/section-2/figure_2_1_4_upgraded_crazyflie_used_as_the_development_platform_in_this_project.png b/assets/section-2/figure_2_1_4_upgraded_crazyflie_used_as_the_development_platform_in_this_project.png new file mode 100644 index 00000000..e3ce5175 Binary files /dev/null and b/assets/section-2/figure_2_1_4_upgraded_crazyflie_used_as_the_development_platform_in_this_project.png differ diff --git a/assets/section-2/figure_2_2_1_ROS2_humble.png b/assets/section-2/figure_2_2_1_ROS2_humble.png new file mode 100644 index 00000000..7029395b Binary files /dev/null and b/assets/section-2/figure_2_2_1_ROS2_humble.png differ diff --git a/assets/section-4/figure 4_1_search_strat_differences.png b/assets/section-4/figure 4_1_search_strat_differences.png new file mode 100644 index 00000000..e53f22d5 Binary files /dev/null and b/assets/section-4/figure 4_1_search_strat_differences.png differ diff --git a/assets/section-4/figure 4_2_map_using_multiranger.png b/assets/section-4/figure 4_2_map_using_multiranger.png new file mode 100644 index 00000000..9fb7b67b Binary files /dev/null and b/assets/section-4/figure 4_2_map_using_multiranger.png differ diff --git a/assets/section-4/figure_4_1_1_comparison_between_mapped_centralised_and_unmapped_decentralised.png b/assets/section-4/figure_4_1_1_comparison_between_mapped_centralised_and_unmapped_decentralised.png new file mode 100644 index 00000000..ba6ac429 Binary files /dev/null and b/assets/section-4/figure_4_1_1_comparison_between_mapped_centralised_and_unmapped_decentralised.png differ diff --git a/assets/section-4/figure_4_1_1_illustration_of_MSBA.png b/assets/section-4/figure_4_1_1_illustration_of_MSBA.png new file mode 100644 index 00000000..f74b311e Binary files /dev/null and b/assets/section-4/figure_4_1_1_illustration_of_MSBA.png differ diff --git a/assets/section-4/figure_4_1_2_navigation_architecture_diagram_of_MSBA_Running_onboard_of_crazyflie.png b/assets/section-4/figure_4_1_2_navigation_architecture_diagram_of_MSBA_Running_onboard_of_crazyflie.png new file mode 100644 index 00000000..1554da3b Binary files /dev/null and b/assets/section-4/figure_4_1_2_navigation_architecture_diagram_of_MSBA_Running_onboard_of_crazyflie.png differ diff --git a/assets/section-4/figure_4_4_1_navigation_architecture_diagram_of_simulated_crazyflie.png b/assets/section-4/figure_4_4_1_navigation_architecture_diagram_of_simulated_crazyflie.png new file mode 100644 index 00000000..7b1b5ceb Binary files /dev/null and b/assets/section-4/figure_4_4_1_navigation_architecture_diagram_of_simulated_crazyflie.png differ diff --git a/assets/section-4/figure_4_4_2_path_of_3_crazyflie_simulated_in_webots.png b/assets/section-4/figure_4_4_2_path_of_3_crazyflie_simulated_in_webots.png new file mode 100644 index 00000000..6d306a66 Binary files /dev/null and b/assets/section-4/figure_4_4_2_path_of_3_crazyflie_simulated_in_webots.png differ diff --git a/assets/section-5/figure_5_1_components_on_ai_deck.png b/assets/section-5/figure_5_1_components_on_ai_deck.png new file mode 100644 index 00000000..2b6841b0 Binary files /dev/null and b/assets/section-5/figure_5_1_components_on_ai_deck.png differ diff --git a/assets/section-5/figure_5_2_AprilTags_as_our_target_type.png b/assets/section-5/figure_5_2_AprilTags_as_our_target_type.png new file mode 100644 index 00000000..fa2bb79b Binary files /dev/null and b/assets/section-5/figure_5_2_AprilTags_as_our_target_type.png differ diff --git "a/assets/section-5/figure_5_3_camera_mount_at_0 \302\260_45\302\260_and_90\302\260_with_respect_to_the_vertical_axis.png" "b/assets/section-5/figure_5_3_camera_mount_at_0 \302\260_45\302\260_and_90\302\260_with_respect_to_the_vertical_axis.png" new file mode 100644 index 00000000..d09c3776 Binary files /dev/null and "b/assets/section-5/figure_5_3_camera_mount_at_0 \302\260_45\302\260_and_90\302\260_with_respect_to_the_vertical_axis.png" differ diff --git a/assets/section-5/figure_5_4_original_vs_updated_image_streaming_firmware.png b/assets/section-5/figure_5_4_original_vs_updated_image_streaming_firmware.png new file mode 100644 index 00000000..7b74291f Binary files /dev/null and b/assets/section-5/figure_5_4_original_vs_updated_image_streaming_firmware.png differ diff --git a/assets/section-5/figure_5_5_victim_and_danger_zone_detection_chart.png b/assets/section-5/figure_5_5_victim_and_danger_zone_detection_chart.png new file mode 100644 index 00000000..484adcca Binary files /dev/null and b/assets/section-5/figure_5_5_victim_and_danger_zone_detection_chart.png differ diff --git a/assets/section-5/figure_5_7_segmentation_of_playing_field.png b/assets/section-5/figure_5_7_segmentation_of_playing_field.png new file mode 100644 index 00000000..fdacc2e9 Binary files /dev/null and b/assets/section-5/figure_5_7_segmentation_of_playing_field.png differ diff --git a/assets/section-6/figure_6_5_1_zig_zag_flight_path.png b/assets/section-6/figure_6_5_1_zig_zag_flight_path.png new file mode 100644 index 00000000..0353438e Binary files /dev/null and b/assets/section-6/figure_6_5_1_zig_zag_flight_path.png differ diff --git a/assets/section-8/figure_8_5_layout_of_run_1.png b/assets/section-8/figure_8_5_layout_of_run_1.png new file mode 100644 index 00000000..46104d24 Binary files /dev/null and b/assets/section-8/figure_8_5_layout_of_run_1.png differ diff --git a/assets/section-8/figure_8_7_successful_rescue_of_crazyflie.png b/assets/section-8/figure_8_7_successful_rescue_of_crazyflie.png new file mode 100644 index 00000000..80ba02ff Binary files /dev/null and b/assets/section-8/figure_8_7_successful_rescue_of_crazyflie.png differ diff --git a/assets/section-8/figure_8_8_layout_of_run_2.png b/assets/section-8/figure_8_8_layout_of_run_2.png new file mode 100644 index 00000000..186abf83 Binary files /dev/null and b/assets/section-8/figure_8_8_layout_of_run_2.png differ diff --git a/assets/title_page/blackranger.png b/assets/title_page/blackranger.png new file mode 100644 index 00000000..5e80783d Binary files /dev/null and b/assets/title_page/blackranger.png differ diff --git a/assets/title_page/blueranger.png b/assets/title_page/blueranger.png new file mode 100644 index 00000000..424ebc16 Binary files /dev/null and b/assets/title_page/blueranger.png differ diff --git a/assets/title_page/nus_logo.png b/assets/title_page/nus_logo.png new file mode 100644 index 00000000..84d3b505 Binary files /dev/null and b/assets/title_page/nus_logo.png differ diff --git a/assets/title_page/pinkranger.png b/assets/title_page/pinkranger.png new file mode 100644 index 00000000..9cc21e2f Binary files /dev/null and b/assets/title_page/pinkranger.png differ diff --git a/assets/title_page/redranger.png b/assets/title_page/redranger.png new file mode 100644 index 00000000..476f24a6 Binary files /dev/null and b/assets/title_page/redranger.png differ diff --git a/assets/title_page/shuhui.jpeg b/assets/title_page/shuhui.jpeg new file mode 100644 index 00000000..decf81d3 Binary files /dev/null and b/assets/title_page/shuhui.jpeg differ diff --git a/assets/title_page/yanyew.jpg b/assets/title_page/yanyew.jpg new file mode 100644 index 00000000..8fadb0e0 Binary files /dev/null and b/assets/title_page/yanyew.jpg differ diff --git a/assets/yellowranger.png b/assets/yellowranger.png old mode 100644 new mode 100755 diff --git a/components/comparision-safmc/comparison-safmc.js b/components/comparision-safmc/comparison-safmc.js new file mode 100644 index 00000000..9dcdf9d6 --- /dev/null +++ b/components/comparision-safmc/comparison-safmc.js @@ -0,0 +1,52 @@ +new gridjs.Grid({ + columns: ["", "SAFMC 2024", "SAFMC 2025"], + data: [ + ["Field layout", "Unknown layout prior to Competition Day Mission. Disclosed layout on Competition Day Mission", "Unknown layout prior to Competition Day Mission. Disclosed layout for Known Search Area on Competition Day Mission. Undisclosed layout for Unknown Search Area on Competition Day Mission."], + ["Pillar Obstacle", "No Pillar Obstacles.", "8 Pillar Obstacles."], + ["Rescue Victim", "Maximum 4 Single-Rescue Victims Maximum 4 Double-Rescue Victims.", "Total 8 Victims (Includes Regular and Bonus Victims)."], + ["Danger Zone", "No Danger Zones.", "Maximum 4 Danger Zones."], + ["Navigation Aid", "Maximum 10 Navigation Aids within Search Area. Unlimited Navigation Aids within Start Area.", "Maximum 10 Navigation Aids within Known Search Area. Unlimited Navigation Aids within Start Area. No Navigation Aids allowed within Unknown Search Area."], + ], +}).render(document.getElementById("comparison-safmc")); + +class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } +} + +customElements.define("comparison-safmc", TableComponent); diff --git a/components/comparison-raw-jpeg/comparison-raw-jpeg.js b/components/comparison-raw-jpeg/comparison-raw-jpeg.js new file mode 100644 index 00000000..64b7811b --- /dev/null +++ b/components/comparison-raw-jpeg/comparison-raw-jpeg.js @@ -0,0 +1,52 @@ +new gridjs.Grid({ + columns: ["RAW file (Original)", "JPEG file (Improved)"], + data: [ + ["Must be processed to become a viewable image.", "Ready to view immediately without additional processing."], + ["File size is 2 to 6 times larger than JPEG.", ""], + ["Higher quality than JPEG due to uncompressed data.", "Lossy format with lower quality than raw files due to compression.m"], + ["Visible lags", "Smoother stream"], + ], + }).render(document.getElementById("comparison-raw-jpeg")); + + class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("comparison-raw-jpeg", TableComponent); + \ No newline at end of file diff --git a/components/drift-test/drift-test.js b/components/drift-test/drift-test.js new file mode 100644 index 00000000..f893292e --- /dev/null +++ b/components/drift-test/drift-test.js @@ -0,0 +1,54 @@ +new gridjs.Grid({ + columns: ["Drone ID", "Suitable for use?", "x_inital (cm)", "x_final (cm)","∆x (cm)","y_inital (cm)","y_final (cm)", "∆y (cm)"], + data: [ + ["CF19", "Yes", "0", "110.0", "10.0", "0", "9.5", "9.5"], + ["CF17", "Yes", "0", "110.5", "10.5", "0", "7.5", "7.5"], + ["CZ01", "Yes", "0", "115.0", "15.0", "0", "10.0", "10.0"], + ["CZ02", "Yes", "0", "123.2", "23.2", "0", "9.5", "9.5"], + ["CZ03", "Yes", "0", "97.4" , "-2.6", "0", "14.5", "14.5"], + ["CF34", "Yes", "0", "81.6" , "19.4", "0", "4.0", "4.0"], + ], + }).render(document.getElementById("drift-test")); + + class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("drift-test", TableComponent); + \ No newline at end of file diff --git a/components/key-events/key-events.js b/components/key-events/key-events.js new file mode 100644 index 00000000..9e08bb01 --- /dev/null +++ b/components/key-events/key-events.js @@ -0,0 +1,53 @@ +new gridjs.Grid({ + columns: ["Week", "Date", "Key Events", "Location"], + data: [ + ["4", "10-02-2025", "Test 1", "Utown Indoor Sports Hall"], + ["6", "23-02-2025", "Test 2 + Team Challenge Video Recording Video editing", "Utown Indoor Sports Hall"], + ["Recess", "24-02-2025", "Submission Deadline: Team Challenge Video [28-02-2025]", ""], + ["7", "09-03-2025", "Test 3", "Utown Indoor Sports Hall"], + ["10", "23-03-2025", "[TBC] Competition Challenge and Competition Presentation", ""], + ], + }).render(document.getElementById("key-events")); + + class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("key-events", TableComponent); + \ No newline at end of file diff --git a/components/msba-configuration/msba-configuration.js b/components/msba-configuration/msba-configuration.js new file mode 100644 index 00000000..61428fcb --- /dev/null +++ b/components/msba-configuration/msba-configuration.js @@ -0,0 +1,53 @@ +new gridjs.Grid({ + columns: ["Drone ID", "1", "2", "3"], + data: [ + ["Preferred Direction", "-60 deg", "0 deg", "60 deg"], + ["Wall-Following Direction", "Left", "Right", "Left"], + ["Wall Distance", "0.3m [Left]", "0.6 m [Right]", "0.3m [Left]"], + ["Altitude", "0.3 m", "0.3 m", "0.3 m"], + ["Flight Speed", "0.5 m/s", "0.5 m/s", "0.5 m/s"], + ], + }).render(document.getElementById("msba-configuration")); + + class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("msba-configuration", TableComponent); + \ No newline at end of file diff --git a/components/run1_params/run1_params.js b/components/run1_params/run1_params.js new file mode 100644 index 00000000..0c250c6e --- /dev/null +++ b/components/run1_params/run1_params.js @@ -0,0 +1,53 @@ +new gridjs.Grid({ + columns: ["Drone ID", "1", "2", "3"], + data: [ + ["Preferred Direction", "-60 deg", "0 deg", "60 deg"], + ["Wall-Following Direction", "Left", "Right", "Left"], + ["Wall Distance", "0.3m [Left]", "0.6 m [Right]", "0.3m [Left]"], + ["Altitude", "0.3 m", "0.3 m", "0.3 m"], + ["Flight Speed", "0.5 m/s", "0.5 m/s", "0.5 m/s"], + ], + }).render(document.getElementById("run1_params")); + + class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("run1_params", TableComponent); + \ No newline at end of file diff --git a/components/scope-of-work/scope-of-work.js b/components/scope-of-work/scope-of-work.js new file mode 100644 index 00000000..de30d4c7 --- /dev/null +++ b/components/scope-of-work/scope-of-work.js @@ -0,0 +1,52 @@ +new gridjs.Grid({ + columns: ["Subsystem", "Member(s)"], + data: [ + ["Search Strategy", "Govindanath Samuel Sudharsanan; Low Yan Yew" ], + ["Simulation", "Low Yan Yew"], + ["Object Detection", "Foo Shu Hui"], + ["Collision Avoidance", "Matthew Yip Tze Heng"], + ], + }).render(document.getElementById("scope-of-work")); + + class TableComponent extends HTMLElement { + static get observedAttributes() { + return ["subtitle"]; + } + + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + attributeChangedCallback(name, _, newValue) { + this[name] = newValue; + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + ${this.subtitle} + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("scope-of-work", TableComponent); + \ No newline at end of file diff --git a/components/table-of-abbreviations/table-of-abbreviations.js b/components/table-of-abbreviations/table-of-abbreviations.js new file mode 100644 index 00000000..33dae543 --- /dev/null +++ b/components/table-of-abbreviations/table-of-abbreviations.js @@ -0,0 +1,43 @@ +new gridjs.Grid({ + columns: ["Abbreviation", "Description"], + data: [ + ["SAFMC", "Singapore Amazing Flying Machine Competition"], + ["DSO", "Defence Science Organisation"], + ["LOS", "Line of Sight"], + ["MSBA", "Modified Swarm Bug Algorithm"], + ["ToF", "Time-of-Flight"], + ["ROS", "Robot Operating System"], + ["FPS", "Frames Per Second"], + ["CNN", "Convolutional Neural Networks"], + ["iDP", "Innovation and Design Programme"], + ], + }).render(document.getElementById("table-of-abbreviation")); + + class TableOfAbbreviations extends HTMLElement { + constructor() { + super(); + this.attachShadow({ mode: "open" }); + } + + connectedCallback() { + this.render(); + } + + render() { + const div = document.createElement("div"); + div.innerHTML = ` + + + `; + + this.shadowRoot.appendChild(div); + } + } + + customElements.define("table-of-abbreviations", TableOfAbbreviations); + \ No newline at end of file diff --git a/components/team-member/team-member.js b/components/team-member/team-member.js index 86c9928d..b5aa94a0 100644 --- a/components/team-member/team-member.js +++ b/components/team-member/team-member.js @@ -1,6 +1,6 @@ class TeamMember extends HTMLElement { static get observedAttributes() { - return ["avatar", "name", "department", "year"]; + return ["avatar", "name", "department", "matric_number"]; } constructor() { @@ -22,7 +22,7 @@ class TeamMember extends HTMLElement { ${this.name}

${this.name}

${this.department}

-

${this.year}

+

${this.matric_number}