Skip to content

Commit

Permalink
cosmetic changes
Browse files Browse the repository at this point in the history
  • Loading branch information
adenjonah committed May 17, 2024
1 parent 783d43e commit 5f9c523
Show file tree
Hide file tree
Showing 14 changed files with 261 additions and 2,233 deletions.
2,064 changes: 30 additions & 2,034 deletions server/initdb.py

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion server/json_databases/boundary_lines.json

Large diffs are not rendered by default.

128 changes: 1 addition & 127 deletions server/json_databases/equipment_repair.json
Original file line number Diff line number Diff line change
@@ -1,127 +1 @@
{
"procedures": [
{
"id": 1,
"title": "Structural Damage Repair",
"steps": [
{
"step": "Comm Tower Base 1",
"role": "EV1",
"description": "Collect structural repair materials including metal patches, welding tools, and adhesives."
},
{
"step": "Comm Tower Base 2",
"role": "EV2",
"description": "Assemble safety gear for climbing and securing both crew members."
},
{
"step": "Comm Tower 3",
"role": "EV1",
"description": "Assess tower for visible structural damage."
},
{
"step": "Comm Tower 4",
"role": "EV2",
"description": "Assist in removing debris and damaged components."
},
{
"step": "Comm Tower 5",
"role": "EV1",
"description": "Apply metal patches over holes or tears using welding tools."
},
{
"step": "Comm Tower 6",
"role": "EV2",
"description": "Provide support in applying patches or adhesives."
},
{
"step": "Comm Tower 7",
"role": "EV1",
"description": "Secure larger structural issues with adhesives and temporary supports."
},
{
"step": "Comm Tower 8",
"role": "EV2",
"description": "Ensure safety protocols are followed during high or difficult access points."
}
]
},
{
"id": 2,
"title": "Power System Troubleshooting and Repair",
"steps": [
{
"step": "Tower Base PSU 1",
"role": "EV1",
"description": "Assemble diagnostic kit, spare batteries, solar cells, and electrical repair tools."
},
{
"step": "Tower Base PSU 2",
"role": "EV2",
"description": "Carry additional spare parts and protective equipment."
},
{
"step": "Tower Base PSU 3",
"role": "EV1",
"description": "Perform diagnostics to identify power supply issues."
},
{
"step": "Tower Base PSU 4",
"role": "EV2",
"description": "Assist in identifying damaged components."
},
{
"step": "Tower Base PSU 5",
"role": "EV1",
"description": "Replace faulty batteries or solar cells."
},
{
"step": "Tower Base PSU 6",
"role": "EV2",
"description": "Help in repairing or replacing wiring, ensuring secure connections."
},
{
"step": "Tower Base PSU 7",
"role": "EV1",
"description": "Verify power system functionality post-repair."
}
]
},
{
"id": 3,
"title": "Antenna Alignment and Calibration",
"steps": [
{
"step": "Comm Tower Antenna 1",
"role": "EV1",
"description": "Prepare alignment tools and calibration software on a portable device."
},
{
"step": "Comm Tower Antenna 2",
"role": "EV2",
"description": "Assemble securing gear and safety equipment for both crew members."
},
{
"step": "Comm Tower Antenna 3",
"role": "EV1",
"description": "Adjust the antenna to correct orientation using tools."
},
{
"step": "Comm Tower Antenna 4",
"role": "EV2",
"description": "Assist in antenna inspection for misalignment or damage."
},
{
"step": "Comm Tower Antenna 5",
"role": "EV1",
"description": "Secure antenna position; perform calibration test."
},
{
"step": "Comm Tower Antenna 6",
"role": "EV2",
"description": "Support in adjustment and calibration process; maintain communication with mission control."
}
]
}
]
}
{"procedures": [{"id": 1, "title": "Structural Damage Repair", "steps": [{"step": "Comm Tower Base 1", "role": "EV1", "description": "Collect structural repair materials including metal patches, welding tools, and adhesives."}, {"step": "Comm Tower Base 2", "role": "EV2", "description": "Assemble safety gear for climbing and securing both crew members."}, {"step": "Comm Tower 3", "role": "EV1", "description": "Assess tower for visible structural damage."}, {"step": "Comm Tower 4", "role": "EV2", "description": "Assist in removing debris and damaged components."}, {"step": "Comm Tower 5", "role": "EV1", "description": "Apply metal patches over holes or tears using welding tools."}, {"step": "Comm Tower 6", "role": "EV2", "description": "Provide support in applying patches or adhesives."}, {"step": "Comm Tower 7", "role": "EV1", "description": "Secure larger structural issues with adhesives and temporary supports."}, {"step": "Comm Tower 8", "role": "EV2", "description": "Ensure safety protocols are followed during high or difficult access points."}]}, {"id": 2, "title": "Power System Troubleshooting and Repair", "steps": [{"step": "Tower Base PSU 1", "role": "EV1", "description": "Assemble diagnostic kit, spare batteries, solar cells, and electrical repair tools."}, {"step": "Tower Base PSU 2", "role": "EV2", "description": "Carry additional spare parts and protective equipment."}, {"step": "Tower Base PSU 3", "role": "EV1", "description": "Perform diagnostics to identify power supply issues."}, {"step": "Tower Base PSU 4", "role": "EV2", "description": "Assist in identifying damaged components."}, {"step": "Tower Base PSU 5", "role": "EV1", "description": "Replace faulty batteries or solar cells."}, {"step": "Tower Base PSU 6", "role": "EV2", "description": "Help in repairing or replacing wiring, ensuring secure connections."}, {"step": "Tower Base PSU 7", "role": "EV1", "description": "Verify power system functionality post-repair."}]}, {"id": 3, "title": "Antenna Alignment and Calibration", "steps": [{"step": "Comm Tower Antenna 1", "role": "EV1", "description": "Prepare alignment tools and calibration software on a portable device."}, {"step": "Comm Tower Antenna 2", "role": "EV2", "description": "Assemble securing gear and safety equipment for both crew members."}, {"step": "Comm Tower Antenna 3", "role": "EV1", "description": "Adjust the antenna to correct orientation using tools."}, {"step": "Comm Tower Antenna 4", "role": "EV2", "description": "Assist in antenna inspection for misalignment or damage."}, {"step": "Comm Tower Antenna 5", "role": "EV1", "description": "Secure antenna position; perform calibration test."}, {"step": "Comm Tower Antenna 6", "role": "EV2", "description": "Support in adjustment and calibration process; maintain communication with mission control."}]}, {"id": 4, "title": "Transceiver Module Replacement", "steps": [{"step": "Comm Tower Transceiver 1", "role": "EV1", "description": "Collect replacement transceiver module and non-conductive tools."}, {"step": "Comm Tower Transceiver 2", "role": "EV2", "description": "Prepare electrostatic discharge safety equipment."}, {"step": "Comm Tower Transceiver 3", "role": "EV1", "description": "Remove the faulty module."}, {"step": "Comm Tower Transceiver 4", "role": "EV2", "description": "Assist in isolating power supply."}, {"step": "Comm Tower Transceiver 5", "role": "EV1", "description": "Install the new module ensuring all connections are secure."}, {"step": "Comm Tower Transceiver 6", "role": "EV2", "description": "Ensure module installation is correctly performed; conduct systems check to verify functionality."}]}]}
44 changes: 44 additions & 0 deletions server/json_databases/geojson/boundary_lines.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Name": "MapBounds",
"stroke": "#555555",
"stroke-width": 2,
"stroke-opacity": 1,
"fill": "#ffffff",
"fill-opacity": 0.1
},
"geometry": {
"type": "Polygon",
"coordinates": [
[
[
-95.0820575321341,
29.5643510431781
],
[
-95.08087325776518,
29.5643510431781
],
[
-95.08087325776518,
29.5654789690085
],
[
-95.0820575321341,
29.5654789690085
],
[
-95.0820575321341,
29.5643510431781
]
]
]
},
"id": 0
}
]
}
39 changes: 39 additions & 0 deletions server/json_databases/geojson/default_pins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Name": "Comm Tower",
"marker-color": "#f4aeae",
"marker-size": "medium",
"marker-symbol": "circle"
},
"geometry": {
"coordinates": [
-95.0812619802509,
29.56490763560322
],
"type": "Point"
},
"id": 1
},
{
"type": "Feature",
"properties": {
"Name": "UIA",
"marker-color": "#f4aeae",
"marker-size": "medium",
"marker-symbol": "circle"
},
"geometry": {
"coordinates": [
-95.08141454127517,
29.56460538049521
],
"type": "Point"
},
"id": 2
}
]
}
90 changes: 90 additions & 0 deletions server/json_databases/geojson/geological_sites.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Name": "C",
"stroke": "#000000"
},
"geometry": {
"coordinates": [
-95.08171325163919,
29.564815614505832
],
"type": "Point"
},
"id": 2
},
{
"type": "Feature",
"properties": {
"Name": "A"
},
"geometry": {
"coordinates": [
-95.08179186649113,
29.56462838562973
],
"type": "Point"
},
"id": 5
},
{
"type": "Feature",
"properties": {
"Name": "B"
},
"geometry": {
"coordinates": [
-95.0816345852645,
29.564746533746927
],
"type": "Point"
},
"id": 5
},
{
"type": "Feature",
"properties": {
"Name": "D"
},
"geometry": {
"coordinates": [
-95.08162028697159,
29.56485224510341
],
"type": "Point"
},
"id": 5
},
{
"type": "Feature",
"properties": {
"Name": "E"
},
"geometry": {
"coordinates": [
-95.08145764388514,
29.564823485407146
],
"type": "Point"
},
"id": 5
},
{
"type": "Feature",
"properties": {
"Name": "F"
},
"geometry": {
"coordinates": [
-95.08126998010785,
29.564989047701275
],
"type": "Point"
},
"id": 5
}
]
}
1 change: 1 addition & 0 deletions server/json_databases/geojson/user_pins.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type": "FeatureCollection", "features": []}
47 changes: 1 addition & 46 deletions server/json_databases/golden_er_procedure.json
Original file line number Diff line number Diff line change
@@ -1,46 +1 @@
{
"id": 1,
"title": "Structural Damage Repair",
"steps": [
{
"step": "Comm Tower Base 1",
"role": "EV1",
"description": "Collect structural repair materials including metal patches, welding tools, and adhesives."
},
{
"step": "Comm Tower Base 2",
"role": "EV2",
"description": "Assemble safety gear for climbing and securing both crew members."
},
{
"step": "Comm Tower 3",
"role": "EV1",
"description": "Assess tower for visible structural damage."
},
{
"step": "Comm Tower 4",
"role": "EV2",
"description": "Assist in removing debris and damaged components."
},
{
"step": "Comm Tower 5",
"role": "EV1",
"description": "Apply metal patches over holes or tears using welding tools."
},
{
"step": "Comm Tower 6",
"role": "EV2",
"description": "Provide support in applying patches or adhesives."
},
{
"step": "Comm Tower 7",
"role": "EV1",
"description": "Secure larger structural issues with adhesives and temporary supports."
},
{
"step": "Comm Tower 8",
"role": "EV2",
"description": "Ensure safety protocols are followed during high or difficult access points."
}
]
}
{"message": "No Procedure has been sent"}
3 changes: 2 additions & 1 deletion server/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,14 @@
app = FastAPI()

DATA_FILE = './server/json_databases/tss_data.json'
PINS_FILE = './server/json_databases/map_pins.json'
PINS_FILE = './server/json_databases/geojson/user_pins.json'
BOUNDARY_LINES_FILE = './server/json_databases/boundary_lines.json'
CONFIG_FILE = './server/json_databases/config_keys.json'
INGRESS_EGRESS_FILE = './server/json_databases/ingress_egress_procedures.json'
EQUIPMENT_REPAIR_FILE = './server/json_databases/equipment_repair.json'
ALERTS_FILE = './server/json_databases/alerts.json'
MESSAGES_FILE = './server/json_databases/messages.json'
GOLDEN_ER_FILE = './server/json_databases/golden_er_procedure.json'

# TSS Connection
if os.path.exists(CONFIG_FILE):
Expand Down
6 changes: 3 additions & 3 deletions src/components/Map.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const MapboxComponent = () => {
mapboxgl.accessToken = mapBoxAPIKey;
const newMap = new mapboxgl.Map({
container: "map",
style: "mapbox://styles/mapbox/satellite-v9",
style: "mapbox://styles/mapbox/satellite-v8",
center: [-95.08148549138448, 29.564911887991144],
zoom: 15,
zoom: 17,
});

newMap.on("load", () => {
Expand Down Expand Up @@ -106,7 +106,7 @@ const MapboxComponent = () => {

const addMarker = async (title, description, lat, lng) => {
try {
await fetch("http://localhost:8000/add_marker", {
await fetch("mapbox://styles/mapbox/satellite-streets-v12", {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand Down
Loading

0 comments on commit 5f9c523

Please sign in to comment.