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

added a getPoint method to TopocentricFrame

parent 6f7c4bfd
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,13 @@ public class TopocentricFrame extends Frame implements PVCoordinatesProvider {
return parentShape;
}
/** Get the surface point defining the origin of the frame.
* @return surface point defining the origin of the frame
*/
public GeodeticPoint getPoint() {
return point;
}
/** Get the zenith direction of topocentric frame, expressed in parent shape frame.
* <p>The zenith direction is defined as the normal to local horizontal plane.</p>
* @return unit vector in the zenith direction
......
......@@ -25,6 +25,9 @@
<action dev="luc" type="add">
added the UT1, TCB and GMST time scales used in CCSDS Orbit Data Messages
</action>
<action dev="luc" type="add">
added a getPoint method to TopocentricFrame
</action>
<action dev="luc" type="fix">
fixed a dut1 interpolation error for the day just before a leap second introduction
</action>
......
......@@ -110,6 +110,10 @@ public class TopocentricFrameTest {
// First point at latitude 45°
final GeodeticPoint point1 = new GeodeticPoint(FastMath.toRadians(45.), FastMath.toRadians(30.), 0.);
final TopocentricFrame topoFrame1 = new TopocentricFrame(earthSpheric, point1, "lon 30");
final GeodeticPoint p1 = topoFrame1.getPoint();
Assert.assertEquals(point1.getLatitude(), p1.getLatitude(), 1.0e-15);
Assert.assertEquals(point1.getLongitude(), p1.getLongitude(), 1.0e-15);
Assert.assertEquals(point1.getAltitude(), p1.getAltitude(), 1.0e-15);
// Second point at latitude -45° and same longitude
final GeodeticPoint point2 = new GeodeticPoint(FastMath.toRadians(45.), FastMath.toRadians(210.), 0.);
......
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