The Software section of MAST handles everything programming and computer-based.

New? Check out the Software Learning Guide for a list of the most important wiki pages.

This category should include information on

Find our exciting google code here!


Recent Code Changes:

Loading RSS data...

Timeline 2010/2011Edit


For a list of small useful programs to be written and tested, see the Software Function Development page.

  • Pololu control of motors
    • test Pololu responding to RS232 from the computer
    • serial output from the micro-controller test to run motor -> determine what was causing program to crash
  • Sensor input into body of program
    • ensure data being received is not corrupted (optional; there's a checksum we can enable)
    • setup a program to write to the wind sensor and modify it's default 'send' settings
    • compass is fine as-is
  • revise sailing logic
    • research this
    • look at past years code to see what they've done and why
  • simulation program? (maybe from WRSC contacts?)
    • research sailing info
    • includes: simulating the boat's response to motors being activated, possibly include delays; simulating the boat's response to changes in the wind, including slowing down as a result of having sails set incorrectly; can simulate tacking, which would be very difficult, or just assume all tacks taken above a minimum speed were successful
  • PID control
    • research this
    • look at past years code to see what they've done and why
  • Polar logic for wind sensor data
    • research this; do we have boat speed information from our present sensor setup?
    • look at past years code to see what they've done
  • menu setup for program operation
    • build basic text-response menu setup and test with zigbee
    • make list of "options" that can be selected
    • split code into discrete functions (should be ok), returning all variables necessary
  • X-CTU workaround to minicom?
    • find out why minicom isn't working via zigbee
    • see if straight-up sending commands to the dev/ttyS0 device works; look into this.. it's something like
echo "text to send" | > /dev/ttyS0
    • could this be a Zigbee settings/firmware problem?
  • make a guide for the software setup
    • how to install embedded linux on the micro-controller
    • how to setup linux as it is on the MAST computer (which packages installed, and where?)
    • guide to minicom
    • guide to zigbee setup
    • guide to programming (already written)


postponed delayed complete

  • August
    • get Pololu working
    • test autonomous-ness of boat's code
    • get ready to demo for Eng Banquet, sidewalk sale
    • make guides to linux, software
  • Dec
    • Test all ported code together ->requires functional RS232->TTL converter!! Problems with serial data corruption; also needs error checking
    • revise code, land test/water test if lake not frozen (shouldn't be?)
    • Use menu to test RC/autonomous switch-overs with multiplexer old MUX working with LEDs, not tested properly with motors (believe that while testing, arduino wasnt properly connected to Pololu)
    • Alpha test sail code before lake freezes Problems with serial data; wont be able to water test until March/April/When the lake melts/We get a swimming pool
    • if alpha successful, start working on Polar and PID logic
    • Change parser() to accept $xxxx,256,,N,135,N,...*FF type of data which will still clear the checksum Reading and Parsing Data Steve
    • Move to version-controlled code Version Control
    • Find a way to test code from home - arduino-specific would be great, if it doesn't exist just C is fine Compilers and Simulators
  • Jan
    • revise code, land test
    • Write/find code to check the "checksum" on the NMEA data (*hh)needs testing on arduino, & include more rigorous data checking of NMEA sequences based on their status codes inside parser(); also look for any errors which occur if the data checking fails -> perhaps check the length of the data string before parsing to save time if fields are guaranteed blank, or check for NULLs returned during parsing Jan 17thJan 21 Val
    • Complete a FULL systems test including multiplexer - Jan 31; Pololu broke so this is delayed until Pololu is replaced
    • Use benchmarking code on a full sailing loop to determine main delays in code Benchmarking
    • Integrate menu into alpha code
    • Obtain sailing systems prototype to use in parking lot - Jan 24th?? depends on Pololu
    • Start to optimize compass and wind data packet frequency; trouble with compass writing
    • Look into interrupt-driven serial data, learning about interrupts
    • Improve basics of the rudder and sail control algorithm in design/code/test cycles, with land-testing - Jan 24th*** Improve basic course navigation functions*** Improve motor control/response to inputs
      • Determine if we need to change the rate that compass/wind data is sent to the boat, what is sent
      • Benchmark alternative solutions where applicable

    • Plan a "stay in the box" navigation function
  • Feb
    • Write a "stay in the box" navigation function
    • Ensure reliable basic "sailing" on land (parking lot with portable elec system)
    • complete code, get ready for Beta Alpha test when lake thaws
    • Work on more advanced sail control algorithm improvements Features will be worked on if there's time before the lake melts*** Collecting sailing data via zigbee; applications to polar plots and tuning boat construction
      • Advanced sailing techniques
      • Simulation code for testing (this could be as simple as outside data simulation, instead of getting data from a serial port, get it from a class which generates data depending on the wind conditions and the boat's internal variables)
      • Add updated and accurate GPS
      • Testing, map compass direction vs actual speed over ground from GPS to determine boat's leeway
    • Write a function to approach a target angle based on sensor data
  • March
    • final code revisions, water testing
    • bug fixing of water bugs
    • check serial data code by itself; then combine with pololu motor turning (which we know already is working by itself)
  • April
    • code deadline

Goals and PrioritiesEdit

Software Planning has our goals laid out.

Boat Sailing Performance criteria - quantify/rank our goals for:

  • Autonomous navigation accuracy
  • Speed obtained (from sail trim/ rudder control/ canting keel)
  • Collision avoidance (for year after)

Team performance criteria - qualify/quantify/rank goals for:

  • Skills attained
  • Interest/ attendance/ involvement / responsibility /communication

Other key decisions/rank priorities of these:

  • what level of interfacing with the people on the shore is appropriate?
  • would interrupts be a good way to program the sail code?
  • should we work on a simulation program?
  • other?

Software Design GuidelinesEdit

Testing ProceduresEdit

Testing is important! It will save much time and grief later, and a few comments go a huge way.

  • Comment each line explaining why it's necessary as you write.
  • Test the code as you write.
    • This can be done with the ELEC299 simulator; or with the Arduino 0021 IDE for code which cannot be compiled on the simulator (specific to the Arduino Mega 2560)
    • Test for functional accuracy (expected results) with the simulator
      • before and after drastic changes to the structure
      • every 10 lines of coding
    • Record unexpected testing results in a comment, either at the top of the function or at the line of code which had unexpected behaviour
    • Test in both "expected conditions" and "abnormal conditions" ie parsing a line of normal data from sensors, and data that starts half-way through a line

Interesting article about Software Quality Assurance

Software Team ManagementEdit

Here's some interesting resources on how to create good productivity in software teams.

Producing better code the first time


Writing code specifications

External LinksEdit

These links, ideally, need to be sorted into their appropriate pages, now that there are many more pages on the wiki.

RS232 guide

Linux Serial comm

the PWM controller that simmons has

sample linux RS232 code that doesnt work

example of input and output processing with RS232

great guide to TS7260 XDIO commands

FTP with a few more sample programs

mailing list archive

TS-SER4 expansion board description

programming guide

programming guide 2

yahoo users group

All items (47)

Community content is available under CC-BY-SA unless otherwise noted.