Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rocket monitoring refactor #76

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Rocket monitoring refactor #76

wants to merge 18 commits into from

Conversation

klemie
Copy link
Owner

@klemie klemie commented Jun 12, 2024

👀Any time during your review if you think there's anything UI changes that would be useful for LC 2024, please comment below or dm me, mock ups would be cool👀

OK OK OK

This is a big one.

Major Changes

  • New UI for active Mission. Condensed all important information into one view, no more stepper for different stages of the flight
  • Data saving to the database.
  • Data exporting JSON/Txt
  • Feedback alerts when things work/break.

Whats New & how to Test

  • Youll need rust and python to test

1. Getting to Active Mission

You'll probably want to start by creating a new rocket
image
At first it will say rocket not found. To fix that go back to rocket select and click on your rocket from there.

Now you can create a new mission. You can ignore components
image

From here you enter an active mission by clicking on the table row

What to Test

  • Creating multiple missions
  • Editing mission and trying to enter weird data

2. Active mission

Once youre in this is what you should see
image

If you have any suggestions for the FAQ that'd be nice. Think on the lines of BRB hardware support and so on.

To connect you must be running the telemetry service. Which is configured in test mode atm. To do this open a terminal and navigate to Ground-Support/services/telemetry and run cargo run.

It worked if you see the following
image

If you get infinite new lines go to services/telemetry/tools/decode_test.sh and change python to python3

You can

What to Test

  • Attempting to connect without the telemetry service running
  • Connecting multiple time
  • discounting out of nowhere
  • different retrieval packet rates (this is how often the frontend polls the telemetry service for new packets. This is not how sockets are suppose to work 😬 but its what were working with currently)
  • Look for visual issues with the graph and the map

3. Saving Data

Once you've collected enough data
image

look for a success alert to popup if so you'll get redirected to the rocket details

What to Test

  • publish button
  • Chrome debugger tools -> check network tab. If you dont know anything about this than dont bother

4. Exporting Data

Go back to the missions tab and click on any published mission.
image

What to Test

  • Saving in both data types.
  • try on multiple browsers

@klemie klemie marked this pull request as ready for review June 16, 2024 05:36
@JackCotter
Copy link
Contributor

These values seem to be repeating a lot when they shouldn't
image

@JackCotter
Copy link
Contributor

Same with the values in export log
image

@JackCotter
Copy link
Contributor

My graph got stuck at ymax of 1000 for some reason
image

@JackCotter
Copy link
Contributor

When the connection to telemetry closes, so does the front end window and all data is lost. Might be a later PR but I could see that happening in competition and we just lose all of our data

@klemie
Copy link
Owner Author

klemie commented Jun 18, 2024

These values seem to be repeating a lot when they shouldn't image

The weird this is they all have unique ids, which is set when there decoded right? I assume how the telemetry service processes them holds is accidentally getting two at once. We could test with the actual BRB and see if it does that. If its not that I think it might be due to the retrieval rate on the frontend side accidentally retrieving more copies. However since the packet id doesnt repeat im thinking thats less likely.

This is how the socket context handles new packets.

	const handleIncomingPacket = (data: IncomingPacket) => {
		if (data.type === 'data') {
			const packet = data.packets.find((packet) => packet.id === data.last_id);
			packetDispatch({ type: 'SET_PACKET', payload: packet });
			setLogs((prevLogs) => [...prevLogs, ...data.packets]);	
		}
	}

The setLogs() could be causing the problem

@klemie
Copy link
Owner Author

klemie commented Jun 18, 2024

When the connection to telemetry closes, so does the front end window and all data is lost. Might be a later PR but I could see that happening in competition and we just lose all of our data

Ill add local storage so we don't have to relay fully on the socket context

@VShawFluenta
Copy link

VShawFluenta commented Jun 20, 2024

There needs to a read me, or some documentation for how to use it and start it up. (Eg you need and then go to webside:3000 etc

open server and then open the localhost:300

in section 5 of the nontechnical installation there needs to be "sudo" in front of the last two commands. These two also need to be somewhere for quick reference for the quick use guide.

Must indicate clearly that users must be in Ground-Support to run things

@TechGal
Copy link

TechGal commented Jun 20, 2024

image
On my laptop part of the text is cut off, and it cannot be scrolled to. Full screen does not change this. I'm using Firefox on Ubuntu, and this is pretty minor.

@TechGal
Copy link

TechGal commented Jun 20, 2024

In the "New Mission Page", could you clarify if the 'Launch Altitude' is the starting altitude or the intended apogee?

@TechGal
Copy link

TechGal commented Jun 20, 2024

Entered date 2024-10-10, displayed October 9 2025 in the mission date. Also, can you please add an easier way to update the page without having to navigate back to the previous breadcrumb? Going back means having to re select the rocket, save the configurations, and click the mission tab, which feels cluncky

@TechGal
Copy link

TechGal commented Jun 20, 2024

When editing a mission, it would be good to auto-populate the fields with current values to make it clear what information is being kept and what is being changed

@VShawFluenta
Copy link

VShawFluenta commented Jun 20, 2024

Need to add an "add image" or similar to the "SVG" button. Or it should show a similar message if you hover over it.
image

@TechGal
Copy link

TechGal commented Jun 20, 2024

No feedback when mission is made with invalid data and so not saved. (Name = 7464859, Lat = hello, Long = world, alt = purple). Please include red asterisk or other indicator of what fields are required to save. Also does not save when all field empty, so some fields are required

@VShawFluenta
Copy link

Need to add "git clone" before the URL in the installation guide

@PokeyOne
Copy link
Contributor

Screenshot 2024-06-20 at 15 48 27

https://xkcd.com/327/

@VShawFluenta
Copy link

VShawFluenta commented Jun 20, 2024

Cannot type/add text if using liquid. If there was already text, then it stays.

image
image

@TechGal
Copy link

TechGal commented Jun 20, 2024

image
Not displaying all data, nothing changed from default

@VShawFluenta
Copy link

VShawFluenta commented Jun 20, 2024

Most letters cannot be put in, but sometimes e can be. Not sure why. This is the same for both mass and height.
image

It seems there can only be one e
image

I can add a plus sign, but it crashes after.
image

@TechGal
Copy link

TechGal commented Jun 20, 2024

Please add a way we can not enter a lat/long/alt when creating a new mission for which we are using the transmitter. We don't want to have a rocket flight where the rocket appears to 'jump' at the beginning of it's flight because we entered the nearest known coordinates, but they aren't exactly what the transmitter says. It would be helpful for the first packet received to populate the initial values in the mission.

@VShawFluenta
Copy link

VShawFluenta commented Jun 20, 2024

Entering no data for height or mass will crash the Localhost:3000.

Interestingly, once it resets it sets the values to 0. (this was the prior value I think).

Also note to self, the name can handle 1000 characters.

@VShawFluenta
Copy link

image
It appears that I can type when I am not actually editing the rocket values.

@VShawFluenta
Copy link

I cannot seem to add components. It all seems to work, but once I exit it seems to just stop existing.

@VShawFluenta
Copy link

VShawFluenta commented Jun 20, 2024

Should indicate the units (ie decimals vs min sec etc)
image

@TechGal
Copy link

TechGal commented Jun 20, 2024

Please add some test values with decimals, it is important to preserve as many decimals as possible in the displayed values to allow the most precise rocket recovery location

@VShawFluenta
Copy link

Need to have an error message if you put in invalid data (eg location of the mission) note that words for the location (lat) does not crash the program, but it didn't save the mission.

@VShawFluenta
Copy link

Need a way to switch from local to remote. Either manually (and need clear instructions) , or some file we can run (still need instructions)

@TechGal
Copy link

TechGal commented Jun 20, 2024

It would be great to have a single config file or runnable file to do all of the docker opening and configuration. Things to configure:

  • Python or Python3
  • Local or remote

@VShawFluenta
Copy link

Comments on the date feature:

Cannot click on the calendar icon to select dates visually
image

While it does recognize that February cannot have 30 days, it doesn't give any warning and doesn't save the mission (Even with the resetting by going back and forth)

@VShawFluenta
Copy link

VShawFluenta commented Jun 21, 2024

Mission UI notes:

Need to indicate units somewhere. There also should be a way to <finish thought here>
image

The FAQ needs to be filled in. Content to put in includes:

  • A reiteration of how to connect, including any commands that need to be run with docker (and where to run them)

image

@VShawFluenta
Copy link

Missions seem to be deleting themselves. I click on a mission, click connect and then begin seeing packets come in and height update, but then when I publish it, it pops up "are you sure?" and then nothing when I say yes.

PokeyOne and others added 5 commits June 20, 2024 19:44
…ath instead of the vendored

Also fix a bug where the site crashes when empty packets are received
Add new command line option to telemetry service to use binaries in path instead of the vendored
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants