public class NavOb extends OMTRaster
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MAP_ERROR |
static double |
Pi10800
one arc minute in radians
|
static double |
Pi180 |
DECLUTTER_ANYWHERE, DECLUTTER_LOCALLY, DEFAULT_SPACING, handler, lat, lon, name, origXLabelOffset, origYLabelOffset, x, xOffset, y, yOffset
ADD_GRAPHIC_MASK, APP_OBJECT, BASIC_STROKE, CHANGE_APPEARANCE, clear, DECIMAL_DEGREES, DECLUTTERTYPE_LINE, DECLUTTERTYPE_MOVE, DECLUTTERTYPE_NONE, DECLUTTERTYPE_SPACE, DEFAULT_ROTATIONANGLE, DELETE_GRAPHIC_MASK, DESELECT_GRAPHIC_MASK, DESELECTALL_GRAPHIC_MASK, GRAPHICTYPE_ARC, GRAPHICTYPE_BITMAP, GRAPHICTYPE_CIRCLE, GRAPHICTYPE_ELLIPSE, GRAPHICTYPE_GRAPHIC, GRAPHICTYPE_GRID, GRAPHICTYPE_LINE, GRAPHICTYPE_POINT, GRAPHICTYPE_POLY, GRAPHICTYPE_RASTER, GRAPHICTYPE_RECTANGLE, GRAPHICTYPE_TEXT, INDEX, INFOLINE, LABEL, LINETYPE_GREATCIRCLE, LINETYPE_RHUMB, LINETYPE_STRAIGHT, LINETYPE_UNKNOWN, LOWER_GRAPHIC_MASK, LOWER_TO_BOTTOM_GRAPHIC_MASK, NO_ROTATE, OMGRAPHIC_ELT, OMGRAPHIC_TYPE_ATTR, RADIANS, RAISE_GRAPHIC_MASK, RAISE_TO_TOP_GRAPHIC_MASK, REMOVABLE, RENDERTYPE_LATLON, RENDERTYPE_OFFSET, RENDERTYPE_UNKNOWN, RENDERTYPE_XY, SELECT_GRAPHIC_MASK, SORT_GRAPHICS_MASK, TOOLTIP, UPDATE_GRAPHIC_MASK, UPDATED
Constructor and Description |
---|
NavOb()
Creates a new instance of MapOb
|
NavOb(edu.stanford.smi.protege.model.Instance instance)
Constructor that creates Navigating object from Protege Instance
|
Modifier and Type | Method and Description |
---|---|
boolean |
abaft(double lat,
double lon)
Check if point abaft the beam
|
boolean |
abaft(MapOb mo)
Check if Map Object abaft the beam
|
void |
addTow(Tow tow)
Add new Tow object to this object.
|
void |
clearTows()
Remove all tows at once
|
void |
control()
Create NavObFrame for this object to control it
|
static NavOb |
createNavOb(java.lang.String label,
java.lang.String type,
java.lang.String latitude,
java.lang.String longitude,
java.lang.String altitude,
java.lang.String course,
java.lang.String speed,
java.lang.String url)
Fabric method that creates Navigating Object from String parameters
|
void |
execTask()
Call RuNA method execTask with this object as argument
|
void |
fromSlotALTITUDE(edu.stanford.smi.protege.model.Instance instance) |
void |
fromSlotCOURSE(edu.stanford.smi.protege.model.Instance instance) |
void |
fromSlotICON_SCALE(edu.stanford.smi.protege.model.Instance instance) |
void |
fromSlotSPEED(edu.stanford.smi.protege.model.Instance instance) |
void |
fromSlotTANGAGE(edu.stanford.smi.protege.model.Instance instance) |
void |
fromSlotTOW(edu.stanford.smi.protege.model.Instance instance) |
void |
fromSlotTYPE(edu.stanford.smi.protege.model.Instance instance) |
int |
getAltitude()
Method for altitude of this object
|
int |
getCourse()
Return current course
|
double |
getCourseRad()
Return current course
|
java.util.Collection<Link> |
getLinks()
Return current links
|
double |
getSpeed()
Return current speed
|
double |
getTangage() |
java.util.Collection<Tow> |
getTows()
Return all current tows
|
java.lang.Object |
getType()
Return type of this object
|
boolean |
linked(MapOb mo)
Check if Map Object linked to this NavOb
|
boolean |
linkMapOb(MapOb mo,
java.lang.String color)
Link Map Object with this navob
Both objects must be on a map
|
void |
mapFromProtege(edu.stanford.smi.protege.model.Instance instance)
Setting main attributies of this object from slot values of
corresponding Protege Instance
|
void |
mapToProtege(edu.stanford.smi.protege.model.Instance instance)
Returning Back to Protege changed attributies of this
Navigatin object
|
void |
move(double currentTime)
Move this object for one step.
|
boolean |
near(double lat,
double lon,
double radius)
Check if point near then radius
|
boolean |
near(MapOb mo,
double radius)
Check if Map Object near then radius
|
boolean |
onTow(MapOb mo,
double angle,
double distance,
boolean relative)
Get Map Object on tow by this navob
Both objects must be on a map
|
double[] |
placeByTime(double time)
Return coordinates of object for given time (after last turn or before the last turn)
|
void |
reflect() |
void |
removeTow(MapOb mo)
Remove Tow object for Map Object from this Navigating Object
|
void |
setAltitude(int altitude)
Method for setting altitude of this object
|
void |
setAltitude(java.lang.String altitude)
Set Altitude from String
|
void |
setCourse(int deg)
Set Course from int
|
void |
setCourse(java.lang.String course)
Set Course from String
|
void |
setLatitude(double deglat)
Set Latitude from double
|
void |
setLatitude(java.lang.String dmlat)
Set Latitude from String
|
void |
setLocation(java.lang.String dmlat,
java.lang.String dmlon)
Change coordinates of this Nav object from the string representation in degrees and minutes:
"deg min"
|
void |
setLongitude(double deglon)
Set Longitude from double
|
void |
setLongitude(java.lang.String dmlon)
Set Longitude from String
|
void |
setSpeed(double knots)
Set Speed from double
|
void |
setSpeed(java.lang.String speed)
Set Speed from String
|
void |
setTangage(double angle)
Set Tangage from double
|
void |
setTangage(java.lang.String tangage)
Set Tangage from String
|
void |
setTowAngle(MapOb mo,
double a)
Put Map Object on tow in new position relative to this object
that is defined by angle
|
void |
setTowDistance(MapOb mo,
double d)
Put Map Object on tow in new position relative to this object
that is defined by distance
|
void |
unlinkMapOb(MapOb mo)
Link Map Object with this navob
|
void |
updateNavObFrame()
Update NavObFrame by refreshing its fields: latitude,
longitude, course, speed
|
void |
updateRPNOF() |
createOMTRaster, fromSlotANGLE, fromSlotURL, getURL, setGraphicLocations
addLinkToMe, bearingsDeg, bearingsDeg, bearingsDeg, bearingsRad, coordFromProtege, createMapOb, distanceNM, distanceNM, distanceNM, getDeg, getDegMin, getDescription, getDescriptionInstance, getInstance, getLatitude, getLatitudeDM, getLinksToMe, getLongitude, getLongitudeDM, getPgid, getToolTip, getWhoTows, hideLabel, offTow, position, removeLinkToMe, setDescription, setDescriptionInstance, setLabelText, setToolTip, setWhoTows, showLabel
setGraphicLocations, setGraphicLocations
convertCoordinateString, distance, generate, generate, getDeclutterLimit, getDetails, getHorizontalLabelBuffer, getLabel, getLocationHandler, getLocationMarker, getName, isAllowDecluttering, isShowLocation, isShowName, main, render, renderLocation, renderName, setAllowDecluttering, setDeclutterLimit, setDetails, setHorizontalLabelBuffer, setLabel, setLocation, setLocation, setLocation, setLocation, setLocationHandler, setLocationMarker, setLocationPaint, setName, setShowLocation, setShowName, showDetails
clone, deselect, getDeclutterType, getDisplayColor, getDisplayPaint, getEdgeMatchesFill, getFillColor, getFillPaint, getHasLabel, getLineColor, getLinePaint, getMattingPaint, getRenderType, getSelectColor, getSelectPaint, getShowEditablePalette, getStroke, getTextureMask, hasLineTypeChoice, isClear, isMatted, isSelected, normalizeDistanceForLineWidth, regenerate, renderLabel, restore, select, setDeclutterType, setFillColor, setFillPaint, setGraphicsColor, setGraphicsForEdge, setGraphicsForFill, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLabelLocation, setLineColor, setLinePaint, setMatted, setMattingPaint, setRenderType, setSelectColor, setSelected, setSelectPaint, setShowEditablePalette, setStroke, setTextureMask, shouldRenderEdge, shouldRenderFill
appendShapeEdge, appendShapeEdge, appendShapeEdge, appendShapeEdge, clearAttributes, contains, createBoxShape, createShape, createShape, describeShapeDetail, describeShapeDetail, distanceToEdge, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
clearAttributes, contains, distanceToEdge, draw, draw, fill, fill, getAppObject, getAttribute, getAttributes, getLineType, getNeedToRegenerate, getShape, isRenderable, isRenderable, isVisible, putAttribute, removeAttribute, setAppObject, setAttributes, setLineType, setNeedToRegenerate, setShape, setVisible
public static double Pi10800
public static double Pi180
public static final java.lang.String MAP_ERROR
public NavOb()
public NavOb(edu.stanford.smi.protege.model.Instance instance) throws java.lang.Exception
instance
- - Instance of this Navigating objectjava.lang.Exception
- -public static NavOb createNavOb(java.lang.String label, java.lang.String type, java.lang.String latitude, java.lang.String longitude, java.lang.String altitude, java.lang.String course, java.lang.String speed, java.lang.String url) throws java.lang.Exception
label
- -type
- -latitude
- -longitude
- -course
- -speed
- -url
- - path to Navigating Object Image Icon filejava.lang.Exception
- -public void setLatitude(java.lang.String dmlat)
dmlat
- - latitude string in form "degrees minutes"public void setLongitude(java.lang.String dmlon)
dmlon
- - longitude string in form "degrees minutes"public void setCourse(java.lang.String course)
course
- - course in form "degrees"public void setAltitude(java.lang.String altitude)
altitude
- - course in form "meters"public void setSpeed(java.lang.String speed)
speed
- - speed in form "knots"public void setTangage(java.lang.String tangage)
tangage
- - tangage in form "degrees"public void setLatitude(double deglat)
deglat
- - latitude in degreespublic void setLongitude(double deglon)
deglon
- - longitude in degreespublic void setLocation(java.lang.String dmlat, java.lang.String dmlon) throws java.lang.Exception
setLocation
in class MapOb
dmlat
- - Latitude as "deg min"dmlon
- - Longitude as "deg min"java.lang.Exception
public void updateRPNOF()
public void setCourse(int deg)
public void setSpeed(double knots)
knots
- - speed in knots (nautical miles per hour)public void setTangage(double angle)
angle
- - tangage in degreespublic int getCourse()
public double getCourseRad()
public double getSpeed()
public double getTangage()
public double[] placeByTime(double time)
time
- - operation time in hours (ex. Clock.getCurrentTime())public void move(double currentTime)
currentTime
- - Current Time in hourspublic void control()
public void updateNavObFrame()
public void mapFromProtege(edu.stanford.smi.protege.model.Instance instance)
mapFromProtege
in interface Protegian
mapFromProtege
in class OMTRaster
instance
- - Protege Instance representing this Navigating Objectjava.lang.Exception
- -public void fromSlotICON_SCALE(edu.stanford.smi.protege.model.Instance instance)
public void fromSlotTYPE(edu.stanford.smi.protege.model.Instance instance)
public void fromSlotCOURSE(edu.stanford.smi.protege.model.Instance instance)
public void fromSlotALTITUDE(edu.stanford.smi.protege.model.Instance instance)
public void fromSlotSPEED(edu.stanford.smi.protege.model.Instance instance)
public void fromSlotTANGAGE(edu.stanford.smi.protege.model.Instance instance)
public void fromSlotTOW(edu.stanford.smi.protege.model.Instance instance)
public void mapToProtege(edu.stanford.smi.protege.model.Instance instance)
mapToProtege
in interface Protegian
mapToProtege
in class MapOb
instance
- - Protege Instance describing this objectjava.lang.Exception
- -public void execTask()
public void addTow(Tow tow)
tow
- - Tow objectpublic void removeTow(MapOb mo)
mo
- - Map Object on tow just nowpublic void setTowAngle(MapOb mo, double a)
mo
- - Map object on towa
- - angle in degreespublic void setTowDistance(MapOb mo, double d)
mo
- - Map Object on towd
- - distance in nautical milespublic void clearTows()
public java.util.Collection<Tow> getTows()
public java.util.Collection<Link> getLinks()
public boolean onTow(MapOb mo, double angle, double distance, boolean relative)
mo
- - Map Objectangle
- - tow angledistance
- - tow distancerelative
- - if tow relative to this navov coursepublic boolean linkMapOb(MapOb mo, java.lang.String color)
mo
- - Map Objectcolor
- - color of Link line in a form "AARRGGBB"public void unlinkMapOb(MapOb mo)
mo
- - Map Objectpublic java.lang.Object getType()
public void reflect()
public boolean abaft(double lat, double lon)
lat
- - latitude of point in degreeslon
- - longitude of point in degreespublic boolean abaft(MapOb mo)
mo
- - Map Objectpublic boolean near(double lat, double lon, double radius)
lat
- - latitude of point in degreeslon
- - longitude of point in degreesradius
- - radius in nautical milespublic boolean near(MapOb mo, double radius)
mo
- - Map Objectradius
- - radius in nautical milespublic boolean linked(MapOb mo)
mo
- - Map Objectpublic int getAltitude()
public void setAltitude(int altitude)
altitude
- - Alitude in meters