Class mdlGeodesic

java.lang.Object
armyc2.c5isr.JavaTacticalRenderer.mdlGeodesic

public final class mdlGeodesic extends Object
Class to calculate the geodesic based shapes for the Fire Support Areas
  • Constructor Details

  • Method Details

    • GetAzimuth

      public static double GetAzimuth(POINT2 c1, POINT2 c2)
      Returns the azimuth from true north between two points
      Parameters:
      c1 -
      c2 -
      Returns:
      the azimuth from c1 to c2
    • geodesic_distance

      public static double geodesic_distance(POINT2 c1, POINT2 c2, ref<double[]> a12, ref<double[]> a21)
      Calculates the distance in meters between two geodesic points. Also calculates the azimuth from c1 to c2 and from c2 to c1.
      Parameters:
      c1 - the first point
      c2 - the last point
      a12 - OUT - an object with a member to hold the calculated azimuth in degrees from c1 to c2
      a21 - OUT - an object with a member to hold the calculated azimuth in degrees from c2 to c1
      Returns:
      the distance in meters between c1 and c2
    • geodesic_coordinate

      public static POINT2 geodesic_coordinate(POINT2 start, double distance, double azimuth)
      Calculates a geodesic point and given distance and azimuth from the srating geodesic point
      Parameters:
      start - the starting point
      distance - the distance in meters
      azimuth - the azimuth or bearing in degrees
      Returns:
      the calculated point
    • GetGeodesicArc

      public static ArrayList<POINT2> GetGeodesicArc(POINT2[] pPoints)
      Calculates an arc from geodesic point and uses them for the change 1 circular symbols
      Parameters:
      pPoints - array of 3 points, currently the last 2 points are the same. The first point is the center and the next point defines the radius.
      Returns:
      points for the geodesic circle
    • GetGeodesicArc2

      public static boolean GetGeodesicArc2(ArrayList<POINT2> pPoints, ArrayList<POINT2> pPoints2)
      Calculates the sector points for a sector range fan.
      Parameters:
      pPoints - array of 3 points. The first point is the center and the next two points define either side of the sector
      pPoints2 - OUT - the calculated geodesic sector points
      Returns:
      true if the sector is a circle
    • IntersectLines

      public static POINT2 IntersectLines(POINT2 p1, double brng1, POINT2 p2, double brng2)
      Deprecated.
      returns intersection of two lines, each defined by a point and a bearing Creative Commons License
      This work is licensed under a Creative Commons Attribution 3.0 Unported License.
      Parameters:
      p1 - 1st point
      brng1 - first line bearing in degrees from true north
      p2 - 2nd point
      brng2 - 2nd point bearing in degrees from true north
      Returns:
    • normalize_points

      public static ArrayList<POINT2> normalize_points(ArrayList<POINT2> geoPoints)
      Normalizes geo points for arrays which span the IDL
      Parameters:
      geoPoints -
      Returns:
    • geodesic_mbr

      public static Rectangle2D.Double geodesic_mbr(ArrayList<POINT2> geoPoints)
      calculates the geodesic MBR, intended for regular shaped areas
      Parameters:
      geoPoints -
      Returns:
    • geodesic_center

      public static POINT2 geodesic_center(ArrayList<POINT2> geoPoints)
      Currently used by AddModifiers for greater accuracy on center labels
      Parameters:
      geoPoints -
      Returns:
    • getGeoEllipse

      public static POINT2[] getGeoEllipse(POINT2 ptCenter, double majorRadius, double minorRadius, double rotation)
      Calculates points for a geodesic ellipse and rotates the points by rotation
      Parameters:
      ptCenter -
      majorRadius -
      minorRadius -
      rotation - rotation angle in degrees
      Returns: