example.asset/src/example/asset/lexicon/ExampleCommandAsset.java
private Observation createDefaultObservation()
    {
        final Observation obs = new Observation();
        obs.withModalities(new SensingModality().withValue(SensingModalityEnum.ACOUSTIC));
        
        final LatitudeWgsDegrees lat = new LatitudeWgsDegrees().withValue(50.0);
        final LongitudeWgsDegrees lng = new LongitudeWgsDegrees().withValue(70.0);
        final Coordinates coords = new Coordinates().withLatitude(lat).withLongitude(lng);
        
        final Detection detection = new Detection();
        detection.withType(DetectionTypeEnum.TEST);
        detection.withTargetLocation(coords);
        final HeadingDegrees heading = new HeadingDegrees().withValue(20);
        final ElevationDegrees elevation = new ElevationDegrees().withValue(90);
        detection.withTargetOrientation(new Orientation(heading, elevation, null));
        detection.withTrackHistories(new TrackElement(coords, new SpeedMetersPerSecond(205.5, null, null, null, null), 
                new Orientation(heading, elevation, null), null, 2003L));
        detection.setTargetFrequency(new FrequencyKhz().withValue(30));
        detection.setTargetId("example-target-id");
        
        obs.setDetection(detection);
        
        return obs;
    }
/**
     * Create a default observation with a detection.
     * @return
     *  a validated observation.
     */
Create a default observation with a detection.
@return
a validated observation.
Create a default observation with a detection . @return a validated observation .
private Observation createDefaultObservation()
    {
        final Observation obs = new Observation();
        obs.withModalities(new SensingModality().withValue(SensingModalityEnum.ACOUSTIC));
        final LatitudeWgsDegrees lat = new LatitudeWgsDegrees().withValue(50.0);
        final LongitudeWgsDegrees lng = new LongitudeWgsDegrees().withValue(70.0);
        final Coordinates coords = new Coordinates().withLatitude(lat).withLongitude(lng);
        final Detection detection = new Detection();
        detection.withType(DetectionTypeEnum.TEST);
        detection.withTargetLocation(coords);
        final HeadingDegrees heading = new HeadingDegrees().withValue(20);
        final ElevationDegrees elevation = new ElevationDegrees().withValue(90);
        detection.withTargetOrientation(new Orientation(heading, elevation, null));
        detection.withTrackHistories(new TrackElement(coords, new SpeedMetersPerSecond(205.5, null, null, null, null), 
                new Orientation(heading, elevation, null), null, 2003L));
        detection.setTargetFrequency(new FrequencyKhz().withValue(30));
        detection.setTargetId("example-target-id");
        obs.setDetection(detection);
        return obs;
    }
private Observation createDefaultObservation ( ) { final Observation obs = new Observation ( ) ; obs . withModalities ( new SensingModality ( ) . withValue ( SensingModalityEnum . ACOUSTIC ) ) ; final LatitudeWgsDegrees lat = new LatitudeWgsDegrees ( ) . withValue ( 50.0 ) ; final LongitudeWgsDegrees lng = new LongitudeWgsDegrees ( ) . withValue ( 70.0 ) ; final Coordinates coords = new Coordinates ( ) . withLatitude ( lat ) . withLongitude ( lng ) ; final Detection detection = new Detection ( ) ; detection . withType ( DetectionTypeEnum . TEST ) ; detection . withTargetLocation ( coords ) ; final HeadingDegrees heading = new HeadingDegrees ( ) . withValue ( 20 ) ; final ElevationDegrees elevation = new ElevationDegrees ( ) . withValue ( 90 ) ; detection . withTargetOrientation ( new Orientation ( heading , elevation , null ) ) ; detection . withTrackHistories ( new TrackElement ( coords , new SpeedMetersPerSecond ( 205.5 , null , null , null , null ) , new Orientation ( heading , elevation , null ) , null , 2003L ) ) ; detection . setTargetFrequency ( new FrequencyKhz ( ) . withValue ( 30 ) ) ; detection . setTargetId ( "example-target-id" ) ; obs . setDetection ( detection ) ; return obs ; }
Create a default observation with a detection.
Create a default observation with a detection .