The Microship Status Reports

Microship Status 12/27/93 by Steven K. Roberts

In This Issue:
Microship Visualization
Noise Czar Wanted!
Forth Development Environment
Excel Projects

Microship Visualization

This evening the Microship suddenly seems more real. Bright yellow gelcoat is being sprayed into kayak molds in British Columbia, Mark Reynolds of Sobstad Sails faxed an innovative sail design with carbon-fiber unstayed wing masts, Robb Walker was here this evening with a blueprint sketch of the boat, and Len Wanger from SDSC brought over three JPEG images in exchange for pizza. On the Mac IIFX (back here and happy, thanks to Mike Clark) we can now gaze in wonder at something that is approaching a real image of the ship! Over the next few days, this will be refined, tweaked, and detailed, whereupon we will have hardcopy to distribute to the press and to sponsors. Hey, it might even be time for the Microship T-shirt, rev 1...
I can't tell you how exciting it is to see the dreams of the past two years begin to take visible shape. While we're still far from something that sails, these images reflect hundreds of hours of brainstorming -- insights collected from engineers, vagabonds, sailors, kayakers, ship designers, composites experts, and even a few smart people who are into everything...


Noise Czar Wanted!

Deep in the bowels of the system, far below all this visualization and ship design, microprocessors are forming alliances. I had a reminder last night of just now non-trivial this is -- I took a first pass at building a packet-radio-linked front end to the FORTH control system. I hacked BEHEMOTH's packet station to be on permanently and linked to an old Yaesu 290 2-meter multimode transceiver, then fired up my "fannypacket" station consisting of an HP-95 palmtop, PacComm Handi-Packet TNC, and Icom dual-band handheld transceiver. They connected, sort of, once I set the bike's transmit delay to match the older radio, but the noise level in this lab is intense. With three Macs, 2 PCs, and a couple of 68HC11s all wailing away, I had S9 noise on the HT, and retries were legion.

Please note, all you who will be involved in control systems! Micros are broadband transmitters, and there will be enough of them on the boat to seriously hose any and all radio communications unless we start from the beginning with a noise reduction program in force (something I ignored on the bike until too late). I would like to build an ongoing student project around this: if you are an EE with interests in digital, analog, and RF... and if you want to be a well-paid hero in industry... you could gain some valuable background by becoming our resident noise expert. It doesn't sound glamorous, but if you can lick RFI problems, you'll be in demand forever. Trust me, I've been there, and whole companies have gone belly-up due to their inability to meet FCC emission specs on an otherwise wonderful new product.
If you want to become the noise czar, see me, and we'll talk to faculty about making it official. I have a few industry noise experts I can steer you to for background, and you can then establish standards and techniques that will guide the fabrication, packaging, and cabling efforts of everyone else.
Anyway, once the packet link works, I should be able to control the MCS hub processor from anywhere within a couple of miles, hacking FORTH, reading I/O, writing to the LCD, and prowling the multidrop network while swilling a cuppa on some sunny collegiate lawn. Ain't technology wonderful?

Forth Development Environment

Speaking of FORTH, there has been a bit of progress. I'm no wiz at the language, though I have a little experience, so I'm finding my way around by tinkering. We'll all be sharing a learning curve on this one...
It's interesting stuff, FORTH. The language comes with about 300 words in ROM, and programming is a matter of adding new ones, each defined in terms of the old. All parameters and calculations take place on a stack (HP calculator users have a head start here), and new words simply extend the vocabulary. There's no "program" in the traditional sense of jumping around and calling subroutines. For example, if you want to create a table of squares from 1 to 10, you could create the new word SQUARES as follows:
: SQUARES CR 10 0 DO I I I . * . CR LOOP ;
The colon means that this is a new definition, terminated by the semicolon. As compilation proceeds through the line (which happens as soon as you hit return), the first action is a carriage return, then the loop limit (10) and initial index (0) are pushed onto the stack and immediately inhaled by the DO. I is the index, and each time through the loop it is pushed on the stack three times. The single dot means to print the top of the stack and then delete it. The * multiplies the remaining top two items on the stack, then the following dot prints the result. CR does a carraige return, then it LOOPs until the limit is reached. Voila. The result is:

Squares
0 0
1 1
2 4
3 9
4 16
5 25
6 36
7 49
8 64
9 81
Ok
The really neat thing about this is that SQUARES is now a new word in the language that can be used within anything else -- it has just as much validity as any that are built in. If you grew up with traditional procedural languages, this is going to seem a little strange at first, but it is GREAT for hacking around with real-time hardware control... you start with the low-level interface tools and get them working. Only after you have a handle on the relationship between controller and machine do you start adding abstraction. Feedback is immediate, since there's no edit-compile-download- debug-curse-ROMerase-retry cycle to get in the way of feeling the bits between your toes.

As I mentioned in the last issue, I have very basic tools working for both DOS and Mac environments. I just finished a MicroPhone II script based on some of Mike Perry's old BEHEMOTH work, so you can maintain files in the Mac and download them to the MCS development system. The LCD driver routines are now such a file, so we can write English or Katakana text on the 2-line by 40-character LCD as well as output to the host machine. Here's the script, in case you're curious:
Set Variable * FORTHFILE from File Dialog "'Upload FORTH file?'" Send text string "'^M'" Send File * Text Line by Line "FORTHFILE" Repeat Wait Sixtieths "30" Send Line * Until Failure Send Local to Screen "'FORTH file transfer complete^M'" Send Text String "'^M'"
It's a bit wordy, but that's the MicroPhone II script language for ya... at least they make it easy to hack, with all editing menu-driven. The open-loop half-second delay for each line is a bit of a kluge, but there are subtleties in MaxFORTH that make handshaking non-trivial and it was getting late.

Excel Projects

Finally, I'm enjoying some new appreciation of something I have apparently undervalued -- spreadsheets. I've always vaguely associated them with "business and finance" and used them only for rather pedestrian functions (decision support, logging training rides, tracking journal subscriptions, etc.). But Robb Walker and Scott Poorman are using Excel for the Microship weight analysis, so I finally installed the latest version, sponsored by Microsoft, on the Mac. Quite amazing.

At the moment, Sok Sun Chang is working on some front-end Excel macros and forms that will give us an integrated ship's inventory system. This will consist of about 30 spreadsheets (databases), one for each major equipment or gear category. For each item listed, there will be a cell for name, description, vendor and contact info, price, serial number, spares, maintenance interval, weight, center of gravity in each axis, stowage area, and notes. The entry process will be automated to the point of shuttling items off to the appropriate file and generating the CG data if a known location is specified by name. The whole thing will generate summary data, interface with the weight and moment calculations needed by Robb, and provide a tool for managing the massive array of STUFF that has to be integrated into this system.

Notes

That's it for this update. I had planned to include the text of my video system chapter from the control system spec book, but too much else was going on. (I'm hoping to finish that massive document by the end of the year, since it will be the input to much of the design work that lies immediately ahead.) There's also a lot of "literature received," but we'll get to it another day.
By the way, Sok Sun has also put together the basic tools for indexing these status reports, so in time we might actually have this entire archive searchable in some online resource. In the meantime, all the back issues are in hardcopy and electronic form, so bug me if you need more background.
Finally, I might be taking a week to go to Seattle and Victoria in January to pick up the boats, do a sailing show, visit a few people, meet my possible new base manager, and take a much-needed ROAD TRIP!!!

Cheers, Steve