Skip to content
Snippets Groups Projects
Commit 1d212e0e authored by Luc Maisonobe's avatar Luc Maisonobe
Browse files

Added a default linear model for line datation.

parent 46e35a8d
No related branches found
No related tags found
No related merge requests found
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
package org.orekit.rugged.api; package org.orekit.rugged.api;
/** Interface representing line datation model. /** Interface representing line datation model.
* @see LinearLineDatation
* @author Luc Maisonobe * @author Luc Maisonobe
*/ */
public interface LineDatation { public interface LineDatation {
......
/* Copyright 2013-2014 CS Systèmes d'Information
* Licensed to CS Systèmes d'Information (CS) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* CS licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.orekit.rugged.api;
/** Linear model for {@link LineDatation line datation}.
* <p>
* Instances of this class are guaranteed to be immutable.
* </p>
* @author Luc Maisonobe
*/
public class LinearLineDatation implements LineDatation {
/** Line number at reference date. */
private final double line0;
/** Rate of lines scanning (lines / seconds). */
private final double rate;
/** Simple constructor
* @param line0 line number at reference date
* @param rate rate of lines scanning (lines / seconds)
*/
public LinearLineDatation(final double line0, final double rate) {
this.line0 = line0;
this.rate = rate;
}
/** {@inheritDoc} */
@Override
public double getDate(double lineNumber) {
return (lineNumber - line0) / rate;
}
/** {@inheritDoc} */
@Override
public double getLine(double date) {
return line0 + rate * date;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment