All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.sf.marineapi.nmea.sentence.HeadingSentence Maven / Gradle / Ivy

The newest version!
/* 
 * HeadingSentence.java
 * Copyright (C) 2011 Kimmo Tuukkanen
 * 
 * This file is part of Java Marine API.
 * 
 * 
 * Java Marine API is free software: you can redistribute it and/or modify it
 * under the terms of the GNU Lesser General Public License as published by the
 * Free Software Foundation, either version 3 of the License, or (at your
 * option) any later version.
 * 
 * Java Marine API is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
 * for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Java Marine API. If not, see .
 */
package net.sf.marineapi.nmea.sentence;

/**
 * Interface for sentences that provide vessel's true or magnetic heading.
 * 
 * @author Kimmo Tuukkanen
 */
public interface HeadingSentence extends Sentence {

	/**
	 * Returns the vessel's current heading.
	 * 
	 * @return Heading in degrees.
	 * @see #isTrue()
	 */
	double getHeading();

	/**
	 * Tells if the heading returned and set by {@link #getHeading()} and
	 * {@link #setHeading(double)} methods is true or magnetic
	 * .
	 * 
	 * @return true if true heading, otherwise false
	 *         for magnetic heading.
	 */
	boolean isTrue();

	/**
	 * Sets the heading value.
	 * 
	 * @param hdt Heading in degrees
	 * @see #isTrue()
	 * @throws IllegalArgumentException If heading value out of range [0..360]
	 */
	void setHeading(double hdt);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy