brata-hsdc / brata.station

Automatically exported from code.google.com/p/brata.station
Apache License 2.0
0 stars 0 forks source link

Add support to enter six angles into station for Return to Earth (RTE) #13

Open kjones27 opened 9 years ago

kjones27 commented 9 years ago

Need to update the CTS code from last year to support RTE capability of entering 6 angles into the station. This includes displaying the 6 angles on the LED display.

I don't see Jaron or Mike on here, so I'm not sure how we discuss this issue. Perhaps I need to send an email. Maybe @ellerychan has an opinion? The first thing I notice is the LED display is a 2x16 display. Which means all 6 angles can't be displayed at once: image

We could use arrows to indicate to the user that there are more angles to enter to the right: image

And, then once they shift over, we'd show an arrow the other way to indicate there's more back to the left: image

Thoughts? I think it could get confusing, honestly. How badly do we want 6 angles? Would 5 be sufficient?

ellerychan commented 9 years ago

Weird. I thought I responded to this message through email, but my response ended up attached to Issue #14. Maybe I was answering two posts at once. I'll repeat the relevant parts of what I said on #14 here:

I agree, that it is a small display. It is also a pretty slow display, so it is difficult to do any nice animation. Given those constraints, I think a dialogue style of interaction works better. If you look at my code you will see my attempt at setting up that sequence of interactions. I hope I made a little flow diagram or something to help explain what is going on. Probably the base sequencing mechanism could be enhanced to be more configurable and less messy. (I haven't looked at the code since before the last competition, so I hope I'm not being inaccurate.)

There are also a couple of LCD display features that I didn't explore much:

jawaad-ahmad commented 9 years ago

I like the arrow idea. It should be very easy to navigate.

I'm not sure how we would want to handle scrolling. I can understand that for Line 1 if it's static text, but we were using Line 2 for input, so it would look a bit odd to have that scroll as we try to enter angles on it.

Since we're doing more than three angles, I recommend allowing the number of angles to be configurable so we can change to support 3, 4, 5, or N angles for future years. I suppose this would make the change backward compatible so we could go back to a CTS station next year if needed.

Regarding why - it's part of the original spec. I don't have details on it from the notes I took from Mike, so I don't know if only five would work for whatever calculation he wants. The notes I have will be in the spec when I post it up for brata-hsdc/brata#96.

He mentioned something about six angles being measured from a prop by the students for a vector A, and then their BRATA computes a vector B from them consisting of another six angles. It's the six angles for vector B that the students will enter into the former CTS station as their answer.

We'll get more details on this when Mike finishes his spec for the students. We can study it more then.

If you make the number of angles configurable, then changing from six down to five angles will be trivial.

kjones27 commented 9 years ago

I talked to Mike on Monday during lunch, and he said we definitely need 6 angles (just so the back story of the task makes sense). We talked through a few scenarios:

  1. Having the user enter one angle at a time.
  2. Have all 6 angles on the screen, and just utilize line 1 for entry, too.
  3. Have two sets of 3 angles.

I think the scrolling might be a bit confusing for the user, so I think I'm going to steer away from that. I still need to figure out how to get the actual CTS to get into the mode where I can see what it looked like last year1. Once I do that, I'll do some mockups here, and get some input.

I'll keep the "configurable" option in mind. My first goal is to get it working as it should for this challenge. If I have time, I'll make it configurable.

1 While talking to Mike on Monday, he mentioned there's a way to get the master server and the station running on the same pi (so they can talk to each other and you can test the station). is there any documentation on that, or does anyone know how to do that? Also, if I can get that going, is that enough to get into the CTS scenario where I can see what the prompts look like on the LCD screen, or is there something more I need to do?

ellerychan commented 8 years ago

This wiki doc tells you how to set up the station from scratch. However, you should be able to get a full system image to start with, so you can bypass most of the setup. At the bottom, the 4-window debug configuration is described.

One of the tricks is to follow the instructions to grep for the helpful commands that you can copy/paste to run.

I think the configurations just had a copy of the MS running on the localhost, so all you had to do was change one URL somewhere, I think. I'm not really remembering.

I think you can run through most of the CTS functionality without the MS. You can send the Start Challenge command from the command line using one of the curl commands that grep will find for you. Then it runs autonomously until you submit the result to the MS. Then the MS responds with a success/fail message IIRC. You might also be able to simulate that with a curl command.

Also, keep your eye out for a state diagram I made that will help you understand the dialogue sequence, since it is broken up in the code by the event-based structure. Let me know if you need help finding the diagram.

ellerychan commented 8 years ago

I looked in the brata.station repo and did not see the diagram. I'll have to look on my other laptop when I get home.

jawaad-ahmad commented 8 years ago

using one of the curl commands

Consider HTTPie as a replacement for cURL. It's probably available in the repositories for Raspbian so it might be a simple apt-get install command to get it on there.

ellerychan commented 8 years ago

I am using /HTTPie/ now. The commands embedded in code comments in the old code use /curl/, though.

I believe I added /HTTPie/ to the install notes in brata.masterserver.

-=

DragonmasterJ commented 8 years ago

@thoughtmonk has agreed to help out with the RTE challenge, so I've changed the assignee to him.