1A Statics Notes
Apr 12th 2005
Janet Lees (jml2) is revising the IA Statics lab.
Currently there are no computing requirements for this lab, however
she would like to introduce a computing element. The vision -
- There will be three groups of the 8 students.
- There will be three unique trusses.
- Each truss will have its own computer.
- Each group of set of students will work on one truss at a time
(until each group has worked on every truss).
- Each group has its own set of weights.
- Every bar on the truss has a digital gauge which measures
strain.
- As weights are added, so the students take a reading from each
bar.
- The students input the data into the workstation next to the
truss.
As the data is collected, so it is sent to a fourth machine. This
machine produces and displays (on screen) a graph based on the
inputted data.
Eventually (although not needed for the first phase) Janet
would like the results and graphs to get put on the web. This
is because this lab is used for exposition, during which the
students are required to write a report based on the lab.
Bob Hepburn has offered to lend Janet 4 PCs for the lab.
She would like to try the lab out on the Headstart and Sutton Trust
people (6th formers who are on a "try before they buy" day out around
June/July time).
|
Today I produced
a very drafty prototype - see the 1A Statics page. It's a PIN-protected facility that has
tables for data entry. Tables can be made 'read-only'. Output is currently
text-only but graphics would be welcomed.
Recorded with each piece of data stored is who stored the data, and
there's provision for storing the person's 'group' too.
The "group" concept isn't yet used - maybe 'read-only' pages could be
unlocked only by those in the same group as the original locker?
Navigation's not tidy either.
It uses 2 mysql (database) tables - Statics1AData and Statics1ALocking
April 14th
Using gd looks like the easiest way to provide on-the-fly
graphics in various formats. It's not currently installed on the webserver,
but the odds are it will be within a few weeks.
April 15th
Some other points and issues
- The experiment's used heavily for the first few weeks of the
first term. Use tapers off.
- There needs to be provision for immediate graphical output and also for
output to be later used in expositions. The data will remain in the database
long after the experiment. A drop-down menu on the OUTPUT page
could offer files in a variety of formats - raw data in
CSV files for spreadsheets, and *.m file for matlab;
graphics in whatever formats that gd
offers - PNG, JPEG and GIF, I think. I've added an actionless menu to the output
page just to show how things must look.
- How are groups to be set-up? A supervisory mode would be useful, so
that a staff member could change the group of a student if need be.
- The data could be time-stamped to monitor student progress etc
- Simultaneous edits/saves of the same data need to be worried about.
Currently it's possible for one student to save data that's just been
'locked' by a student on another machine.
April 18th
Another database table (1AStaticsUser) added, to record when
users were active and to store who the supervisors are.
April 19th
In the development version (which you're welcome to try) I've added a facility so that supervisors (currently just me!)
are offered a chance to go into supervisor mode. Currently the mode lets supervisors
list users by date of last access.
April 21st
Access controls in general need to be
thought about - what type of access should an individual have to their own
group's data and to other data? What should supervisors be able to do - move
someone from one group to another? Can the computer do some admin chores?
April 25th
The Development version's been tidied up a little. Users can't save if the data's
currently locked by the user. Also the menu that offers file download
formats now produces files in the required formats. The CSV (spreadsheet)
file might contain
the correct contents. The other varieties contain dummy output.
April 28th
In the Development version supervisors now can add/remove supervisor powers
for users - note that they can currently remove their own supervisor powers.
July 19th
In the Development version supervisors now can add new users.
Here's a checklist of things to worry about
- Administrative Issues
- Users will need to know their PINs or passwords. If they have
forgotten them, they'll have to visit the operators
- The system needs to know beforehand which group each student is in.
What are the groups called and how soon are they known? Are 1AStatics
staff prepared to set them up given suitable support?
- Supervisor Mode
- Currently any registered user can be made into a supervisor by another
supervisor. What further extra powers should supervisors have?
Currently they can list the last time each user logged in.
- Input Mode
- Data is lost if the browser is closed or the page changed before a
"Save" is done.
- Users can currently "lock" the data if they think it's complete. Who
should be able to unlock it? Just the individual who locked it?
- Should there be a "clear table" option
- Output Mode
- I've forgotten what kind of processing is required. What should be
calculated? Should groups be able to use data provided by other
groups even if they're not allowed to see it?
- What formats should be provided for output? Currently CSV (for
spreadsheets), Matlab, PNG and GIF are on the menu, though only
the 1st 2 option are easy for me to complete.
- Cosmetics -
I've not yet worried much about making the pages easy to read or use.
July 22nd
After discussion with jml2 I've changed a few things
August 1st
GD's installed. The GIF and PNG options on the output page now produces
sample graphical output -
August 3rd
Tidying up. Work done on the output options - can now choose the material,
and the matlab-format option now produces a file containing the supplied
data. Here's a sample output file
% matlab file for tpl showing Steel data
kn=[0, 0.249, 0.498, 0.747, 0.996, 1.245, 1.495, 1.744, 1.993, 2.242];
displacements=[-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
0, -1, 3, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
100, -1, 4, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
200, 300, 5, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
300, -1, 6, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
400, -1, 7, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1;
];
I need to make the graph provision more general, but options could easily
ramify. What do users and supervisors need? Variables include
- Material
- Member
- Phase
- X and Y axis units
but the behaviour of steel member 2 and aluminium member 5 may need to
be compared on the same graph (indeed, I suspect graphs will most
often be used for making comparisons). As a start I'll add options to
the interface on the "output" page.
August 5th, 9th
- New house style added
- Several graphical output options added for students. The graphs now
show the data that's been typed in (rather than dummy data!). Out-of-range
data is silently ignored
- Graphs are created in new windows so that they can be compared
- The Supervisor's page now offers options to draw typical comparative
graphs
- 1346 lines of code
To think about
- Support graphs with "member force" y axes.
- Do the readings when weights added and readings when weights removed
both need to be stored in the database?
August 25th
jml2 has given the program 2 recent tests and has provided pages of feedback.
I've fixed some bugs and have improved/added features.
Progress so far
- Data output routines made more flexible so that P, Q, or R can be used
- More graphics options available
- Tabbing control better
- Supervisor has an option to zap a user's data
- Phase 3 no longer uses phase 1's data
- "all" added to some menus (in addition to phase 1, phase 1+2, and phase 3)
- When supervisor's "Load cell calibration for all materials" graph is drawn
for "all" phases, the datapoints for phase 3 are shown as crosses. The
same
happens for some user graphs.
- Estimated Member Forces are no longer shown to 10 decimal places.
- Code re-organised
September 12th
After a rehearsal some mods are going to be suggested by jml2. Meanwhile,
we've come to a compromise on authentication. Each session's worth of
students will have a password, and supervisors will have a password to
an account that's sufficient to start a browser.
I've had to change several things to make the "group password" thing work.
The first page (which needs more work to make it friendlier) now invites
people either to login as a supervisor using their PIN, or to login as a
group. I've removed mention of the term "user" where it's inappropriate.
Once people have managed to log in, things should be much as before. Note
-
There's now a "logout" button on the main page. It's like the hermes
webmail logout button except that it times out after 4 hours rather than
after a few minutes. It's not vital, but during testing it's useful.
- The
supervisor page shows the password (if any) that works on the current day.
The idea is that the supervisor can turn up on the day of a lab, login as
supervisor, look-up the current password, then start-up the
student-machines accordingly. Then during the de-briefing the supervisor
can bring the password to the students' attention. There's also an option
to find out the password for other sessions (the passwords are just
samples. I'll change them before term starts)
September 15th
Another round of revisions, and some regression testing done. Here's a
brief summary of work done and work remaining.
- Done
- R and Q fields added in input tables
- The graphs now have different y axes ranges depending on their purpose.
- Graphs are bigger and have bigger texts
- Calibration factor shown on some graphs
- An extra "forces v Q" graph added
- Users can view the same graphs as the supervisors can
- Re-organised supervisor page:more presentation-centered - admin
features are a link away
- There's an attendance list feature (when the 1A
lists appear I'll add more names). The
attendance page now lets you cancel the date of a student (in case you
ticked them off by accident).
- To do
- bigger legends
- always displaying phase 3 data in a different way from phase 1+2 data when "all" data is being displayed
- displaying calibration info on graphs
- tidy locking (currently it zaps unsaved data in other phases).
These are tedious/time-consuming rather than difficult to implement. The last item in particular risks messing up the save/load routines if I rush things.
June 2006
The 1AStatic lab uses 5 database tables owned by tpl -
- Statics1AAttendance - user, datedone, number (the number of the session they're expected to attend)
- Statics1AData - user, material, thegroup, phase, thecolumn, therow, value, locked
- Statics1ALocking- user, material, thegroup, phase, locked
- Statics1ASessioninfo - number, password, thedate
- Statics1AUser - user, supervisor, thegroup, last_change
On 28th June 2006 I made copies of these. The copies have an extra "2005"
on the end of their names - Statics1AAttendance2005, etc.
September 2006
Here I'll made a list of what needs to be changed each year.
- Statics1AData and Statics1ALocking need to be cleared except for the data for group1 in Statics1AData - that's sample data
- Statics1ASessioninfo needs to be filled with the dates of each session, and a password for each session
- Statics1AAttendance - can't be filled until the labgroups have been determined. "~tpl/bin/yearlists 1astatics" creates the SQL commands needed.
And here are some modifications I made on 5th September.
- http://www.eng.cam.ac.uk/to/1AStatics is a short-cut to the 1AStatics page
- I've added this year's session dates and passwords. Passwords are more
memorable
- On the main page I've added
"For help with adding data/graphics from this experiment into a
report, see the hardcopy tips page.". I've put some info on that page, but not enough.
- During mich2005 I changed the input pages so that the photo at the
top of the page was different for each material. I've now changed the
table-header color according to the material as well.
I also removed some unused code (code in the student-code that only
supervisors use, and vice versa).
Other mods were suggested. Here are my short-hand replies
- I've not looked at the attendance stuff yet
- Adding another line of input to stage 2 means tweaking various bits of
code, and means that last year's data won't load in - i.e. things might
go wrong unless I'm careful
- The option to display the averages for each frame might already be there.
- The extrapolation mod might already have been done.
- I've not looked at the details of making the data non-modifiable. The
underlying mechanism is there, and it may well be that supervisors
already have the power to un/lock a day's values.
Several fixes were made at the end of September
- suppression of out-of-bounds line-drawing was wrong - if the
first segment of a line was out-of-bounds, future segments weren't drawn either
- load cell calibrations for phase 1 were wrong because I forgot that
in some situations, PHP reports "1" and "1plus2" as being equal.
To-do list
- Add a "remove user" option to the supervisor page
- Fix the repetitions that arise in the user list (users sometimes have
2 entries - for group 0 and group 1)
- in terms of the attendance would it be possible to have an additional
column for comments? DONE
- Fix averages DONE
October
The input data might be shown as read-only because
- It's been locked by people who are doing the lab that day (an UNLOCK
button is available)
- the data isn't for the lab that's running on that day (no UNLOCK
button is available)
I've added a "Data locking" option to the Supervisor page. For each group
it shows the Locking status of the data.
Old data is by default "Locked by age". There's an "unlock" button to
override this locking.
If that button's used, then the data becomes "Unlocked by supervisor".
There's a "lock" button which will change the state to "Locked by
supervisor."
Data relating to the current day's lab or to a future lab is marked as
"not done".
Updated October 2006
Tim Love