public SatelliteStateOutput(
      TLEPredictorProcess parentProcess,
      String name,
      TLEOutput tleOutput,
      double outputPeriod,
      double predictHorizon) {
    this.parentProcess = parentProcess;
    this.eventHandler = new BasicEventHandler();
    this.orbitPredictor = new TLEOrbitPredictor(tleOutput);
    this.name = name;
    this.outputPeriod = outputPeriod;
    this.predictHorizon = predictHorizon;

    // create output structure
    SWEHelper fac = new SWEHelper();
    DataRecord rec = fac.newDataRecord();
    rec.setName(getName());
    rec.setDefinition(SWEConstants.DEF_PLATFORM_LOC.replace("Location", "State"));
    rec.addField("time", fac.newTimeStampIsoUTC());
    rec.addField("position", fac.newLocationVectorECEF(SWEConstants.DEF_PLATFORM_LOC));
    rec.addField(
        "velocity",
        fac.newVelocityVectorECEF(
            SWEConstants.DEF_PLATFORM_LOC.replace("Location", "Velocity"), "m/s"));
    this.outputDef = rec;

    this.outputEncoding = fac.newTextEncoding();
  }
예제 #2
0
  @Override
  protected void init() {
    SWEHelper fac = new SWEHelper();

    // build SWE Common record structure
    laserData = fac.newDataRecord(5);
    laserData.setName(getName());
    laserData.setDefinition("http://sensorml.com/ont/swe/property/LaserRangeData");

    // add time, horizontalDistance, azimuth, inclination, and slopeDistance
    laserData.addComponent("time", fac.newTimeStampIsoUTC());
    laserData.addComponent(
        "horizDistance",
        fac.newQuantity(
            SWEHelper.getPropertyUri("HorizontalDistance"), "Horizontal Distance", null, "m"));
    laserData.addComponent(
        "slopeDistance",
        fac.newQuantity(
            SWEHelper.getPropertyUri("LineOfSightDistance"), "Line-of-Sight Distance", null, "m"));

    // for azimuth (trueHeading), we also specify a reference frame
    Quantity q =
        fac.newQuantity(SWEHelper.getPropertyUri("TrueHeading"), "True Heading", null, "deg");
    q.setReferenceFrame("http://sensorml.com/ont/swe/property/NED");
    q.setAxisID("z");
    laserData.addComponent("azimuth", q);

    // for inclination, we also specify a reference frame
    q = fac.newQuantity(SWEHelper.getPropertyUri("Inclination"), "Inclination", null, "deg");
    q.setReferenceFrame("http://sensorml.com/ont/swe/property/NED");
    q.setAxisID("y");
    laserData.addComponent("inclination", q);

    // also generate encoding definition as text block
    dataEncoding = fac.newTextEncoding(",", "\n");
  }
예제 #3
0
  protected void init() {
    GeoPosHelper fac = new GeoPosHelper();

    // SWE Common data structure
    dataStruct = fac.newDataRecord(7);
    dataStruct.setName(getName());
    dataStruct.setDefinition(SWEHelper.getPropertyUri("AVLData"));

    // time
    dataStruct.addComponent("time", fac.newTimeStampIsoUTC());

    // Mobile Data Terminal ID
    dataStruct.addComponent(
        "mdt-id",
        fac.newCategory(
            SWEHelper.getPropertyUri("MDT-ID"), "MDT-ID", "Mobile Data Terminal ID", null));

    // Unit and Vehicle ID (often the same)
    dataStruct.addComponent(
        "unit-id",
        fac.newCategory(SWEHelper.getPropertyUri("Unit-ID"), "Unit ID", "Mobile Unit ID", null));
    dataStruct.addComponent(
        "veh-id",
        fac.newCategory(
            SWEHelper.getPropertyUri("Vehicle-ID"),
            "Vehicle ID",
            "Mobile Vehicle Identification",
            null));

    // location (latitude-longitude)
    Vector locVector = fac.newLocationVectorLatLon(SWEConstants.DEF_SENSOR_LOC);
    locVector.setLabel("Vehicle Location");
    dataStruct.addComponent("location", locVector);

    // status constraints: (AQ - at-station; ER - enroute; AR - arrived?, OS - out-of-service, AK -
    // completed-returning)
    Category status =
        fac.newCategory(
            SWEHelper.getPropertyUri("Vehicle-Status"),
            "Unit Status",
            "Unit-Vehicle Status (AQ, OS, AK, ER, AR)",
            null);
    AllowedTokens constraints = fac.newAllowedTokens();
    constraints.addValue("AQ");
    constraints.addValue("ER");
    constraints.addValue("AR");
    constraints.addValue("OS");
    constraints.addValue("AK");
    status.setConstraint(constraints);
    dataStruct.addComponent("status", status);

    // event (empty if AQ, OS, or AK; event number if ER or AR)
    dataStruct.addComponent(
        "event-id",
        fac.newCategory(
            SWEHelper.getPropertyUri("Event-ID"),
            "Event ID",
            "Assigned ID to an emergency event",
            null));

    // set encoding to CSV
    dataEncoding = fac.newTextEncoding(",", "\n");
  }