java 实现EME2000(国家大地坐标系)转ECEF坐标系(地心地固坐标系)

EME2000 = J2000 俗称国家大地坐标系

ECEF坐标系 称为地心地固坐标系

先上代码。传入经度、维度、以及高度。经过的年月日时分秒

private List EME2000toECEF(double longitude, double latitude, double height, int year, int month, int day, int hour, int minute, double second) {
    File home = new File(this.orekitPath);
    if (!home.exists()) {
        home.mkdirs();
    }

    File orekitData = new File(home, "orekit-data/UTC-TAI.history");
    if (!orekitData.exists()) {
        try {
            if (!orekitData.getParentFile().exists()) {
                orekitData.getParentFile().mkdirs();
            }

            orekitData.createNewFile();
            this.fileLoad(orekitData);
        } catch (IOException var25) {
            var25.printStackTrace();
        }
    }

    DataProvidersManager manager = DataContext.getDefault().getDataProvidersManager();
    manager.addProvider(new DirectoryCrawler(orekitData.getParentFile()));
    Frame inertial_frame = FramesFactory.getEME2000();
    Frame earth_frame = FramesFactory.getITRF(IERSConventions.IERS_2010, false);
    AbsoluteDate t_epoch = new AbsoluteDate(year, month, day, hour, minute, second, TimeScalesFactory.getUTC());
    Vector3D eciPos = new Vector3D(longitude, latitude, height);
    Vector3D eciVel = new Vector3D(6.229593617887584D, 3.957732763271321D, -1.898435654082505D);
    PVCoordinates pv = new PVCoordinates(eciPos, eciVel);
    PVCoordinates pv_itrf = inertial_frame.getTransformTo(earth_frame, t_epoch).transformPVCoordinates(pv);
    Vector3D vector3D = pv_itrf.getPosition();
    return Lists.newArrayList(new Double[]{vector3D.getX() * 1000.0D, vector3D.getY() * 1000.0D, vector3D.getZ() * 1000.0D});
}

相关jar包我就不上传了。有需要的可以联系我。如果有疑问欢迎下方评论!!!

你可能感兴趣的:(java,地图,坐标系)