ProjectionHelper
works.
UAAppliHelper.jar
library contains a ProjectionHelper class allowing to:UAAppliHelper.jar
library, you will need to reference it in your application configuration. For example: <applications> <application name="uaappli"> <deployment> <lib url="UAApplication.jar" /> <lib url="UAAppliHelper.jar" /> </deployment> <modules> <module name="uaappli"/> </modules> </application> </applications>
ProjectionHelper helper = new ProjectionHelper(); helper.setPRP(<latitude>, <longitude>); helper.setRange(40, 25000); // the range is 40 nautical miles corresponding to 25000 100th of MM
MapPosition point1 = new MapPosition.Double(<latitude>, <longitude>); MapPosition point2 = new MapPosition.Double(<latitude>, <longitude>); double bearing = ProjectionHelper.getBearing(point1, point2);
MapPosition point1 = new MapPosition.Double(<eastNM>, <northNM>); MapPosition point2 = new MapPosition.Double(<eastNM>, <northNM>); double bearing = ProjectionHelper.getBearing(point1, point2);The ProjectionHelper.getBearingFromLatLong(MapPosition, MapPosition) return the bearing between two points on the map, knowing their positions in (latitude, longitude).
MapPosition point1 = new MapPosition.Double(<latitude>, <longitude>); MapPosition point2 = new MapPosition.Double(<latitude>, <longitude>); double bearing = ProjectionHelper.getBearing(point1, point2);
MapPosition point1 = new MapPosition.Double(<latitude>, <longitude>); MapPosition point2 = new MapPosition.Double(<latitude>, <longitude>); double bearing = ProjectionHelper.getDistanceTo(point1, point2);
MapPosition point = new MapPosition.Double(<latitude>, <longitude>); MapPosition pointNM = ProjectionHelper.getEastNorthPosition(point);
MapPosition point = new MapPosition.Double(<eastNM>, <northNM>); MapPosition pointlatLong = ProjectionHelper.getLatLongPosition(point);The ProjectionHelper.getLatLongPosition(MapPosition, MapPosition) return the (latitude, longitude) position of a point from a reference point, knowing its east/north position in nautical miles.
MapPosition refpoint = new MapPosition.Double(<latitude>, <longitude>); MapPosition relativeNM = new MapPosition.Double(<eastNM>, <northNM>); MapPosition pointlatLong = ProjectionHelper.getLatLongPosition(refpoint, relativeNM);
MapPosition refpoint = new MapPosition.Double(<latitude>, <longitude>); MapPosition relativeMM = new MapPosition.Double(<x_mm>, <y_mm>); MapPosition pointlatLong = ProjectionHelper.getLatLongPosition(refpoint, relativeMM);The ProjectionHelper.getLatLongPositionFromMM(MapPosition, double, double) return the (east, north) (latitude, longitude) position of a point from a reference point, knowing its distance in mm and its bearing relative to the reference point.
MapPosition refpoint = new MapPosition.Double(<latitude>, <longitude>); MapPosition pointlatLong = ProjectionHelper.getLatLongPosition(refpoint, <distance_mm>, <bearing_mm>);
double angle2 = angle + 90; angle2 = UnitsConverter.convert(angle2, Units.DEG, Units.DEG360);
Copyright 2017-2020 Dassault Aviation. All Rights Reserved. Documentation and source under the LGPL v3 licence