public class Util
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
drawn_index |
Constructor and Description |
---|
Util()
Creates a new instance of Util
|
Modifier and Type | Method and Description |
---|---|
static void |
createDrawnPolygons() |
static java.lang.Object |
createObjectForInstance(edu.stanford.smi.protege.model.Instance inst,
java.lang.String pack)
Create object of instance direct type class.
|
static edu.stanford.smi.protege.model.Instance |
createOMTPolyInstance(com.bbn.openmap.omGraphics.OMPoly poly) |
static void |
execScenario(java.lang.String scenario)
Method of execution of scenario
|
static java.util.Collection<edu.stanford.smi.protege.model.Instance> |
filter(java.util.Collection<edu.stanford.smi.protege.model.Instance> coll,
edu.stanford.smi.protege.model.Cls cls)
Filter instances of only one class
|
static java.awt.Component |
getComponentOfClass(java.awt.Container container,
java.lang.String className) |
static edu.stanford.smi.protege.widget.TabWidget |
getTab(java.lang.String fullClassName) |
static java.util.Map<java.lang.Object,java.lang.Object> |
instanceMap(edu.stanford.smi.protege.model.Instance instance)
Create map from instance slots.
|
static double[] |
intersectionPoint(double lat1,
double lon1,
int course,
double[] llp,
boolean givePoint)
Intersection point with polygon along the course
|
static double |
middleCoord(double[] lla,
int off) |
static void |
printRadArrayInDeg(double[] rad_array,
int how_many) |
static double[] |
randomTack(double lt_deg,
double ln_deg,
double spd_knt,
double midtack_hrs,
double scatter_hrs,
OMTPoly poly)
Calculates a random tack for maneuvering in a closed area.
|
static double[] |
relPos(double lat,
double lon,
double azdeg,
double dist)
Point on some azimuth and distance from some point
|
public static java.util.Collection<edu.stanford.smi.protege.model.Instance> filter(java.util.Collection<edu.stanford.smi.protege.model.Instance> coll, edu.stanford.smi.protege.model.Cls cls)
coll
- - Collection of instancescls
- - Needed classpublic static double[] intersectionPoint(double lat1, double lon1, int course, double[] llp, boolean givePoint)
lat1
- - Latitude of current point (degrees)lon1
- - Longitude of current point (degrees)course
- - Current course (degrees)llp
- - Array of lat lon points of polygon (radians)givePoint
- - Flag if gives up point or only check fact of intersectionpublic static void execScenario(java.lang.String scenario) throws java.lang.Exception
scenario
- - String in form "FULLCLASS METHOD PARAM1 PARAM2 ..."java.lang.Exception
- -public static double[] relPos(double lat, double lon, double azdeg, double dist)
lat
- - latitude of initial point (degrees)lon
- - longitude of initial point (degrees)azdeg
- - azimuth of relative point (degrees)dist
- - distance of relative point from initial point (NM)public static edu.stanford.smi.protege.widget.TabWidget getTab(java.lang.String fullClassName)
public static java.awt.Component getComponentOfClass(java.awt.Container container, java.lang.String className)
public static void printRadArrayInDeg(double[] rad_array, int how_many)
public static double[] randomTack(double lt_deg, double ln_deg, double spd_knt, double midtack_hrs, double scatter_hrs, OMTPoly poly)
lt_deg
- - current latitude of the shipln_deg
- - current longitude of the shipspd_knt
- - current speed of the shipmidtack_hrs
- - middle tack timescatter_hrs
- - scatter of tack timepoly
- - OMTPoly of areapublic static java.util.Map<java.lang.Object,java.lang.Object> instanceMap(edu.stanford.smi.protege.model.Instance instance)
instance
- - Instancepublic static java.lang.Object createObjectForInstance(edu.stanford.smi.protege.model.Instance inst, java.lang.String pack)
inst
- - Instancepack
- - full name of class packagepublic static void createDrawnPolygons()
public static double middleCoord(double[] lla, int off)
public static edu.stanford.smi.protege.model.Instance createOMTPolyInstance(com.bbn.openmap.omGraphics.OMPoly poly)