Java Code Style Guide

The first part of a class should hold a Copyright comment. You may add your name to the copyright if you have contributed to 20% or more of the class.

All major sections (methods etc.) should start with a comment in the form of:

 *  A short description
 * <p> A full description
 *  @see SomeRelatedClass
 *  @version <tt>$Revision: 1.1 $</tt>
 *  @author <a href="mailto:{sfmail}">{full name}</a>

All comments inside of a major section should only use // style comments.

4 spaces are used for indentation. No tabs should be used, only spaces. Most IDEs have a convert tabs to spaces fuction. The reason behind this is that cvs does see spacing in a diff. And if a tab replaces 4 spaces, it will show it as a revision diff.

All vars should be lower case and names should use _ to seperate words. ex.: gps_altitude gps_sog etc.

Methods should use upper and lower case starting with a lower case. ex.: getAltitude(), setAltitude().

Classes should start with an upper case as in TelemetryData, or all upper case is acceptable as in CRC.

Major sections should be seperated by 3 linefeeds.

Inside of a method etc. there should never be more than 2 linefeeds in a row.