Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
77 changes: 61 additions & 16 deletions .github/workflows/gradle_publish.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,70 @@
name: Publish package to GitHub Packages
on: workflow_dispatch
on:
workflow_dispatch:
inputs:
run_all:
description: "Publish all subprojects"
required: true
default: "false"
run_specific:
description: "Publish specific subproject"
required: false
default: ""
push:
branches: [ "master" ]
jobs:
detect-changes:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Detect changed subprojects
id: changes
run: |
# get all projects
CHANGED=$(./gradlew projects --quiet | grep "Project " | awk '{print $3}' | sed "s/'\|://g")

#handle if project is specified
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
if [ "${{ inputs.run_all }}" = "false" ]; then
CHANGED=${{ inputs.run_specific }}
fi
else #merge to master, detect specific changes
CHANGED=$(grep -F -o -f <(echo "$CHANGED") <(git diff --name-only HEAD~ HEAD))
fi

CHANGED=$(echo -n "$CHANGED" | base64 -w 0)

echo "changed=$CHANGED" >> $GITHUB_OUTPUT
- name: Build matrix
id: set-matrix
run: |
ENCODED=${{ steps.changes.outputs.changed }}
CHANGED=$(echo -n "$ENCODED" | base64 --decode)
ARR=$(echo "$CHANGED" | jq -R -s -c 'split("\n")[:-1]')
echo "matrix={\"project\":$ARR}" >> $GITHUB_OUTPUT

publish:
needs: detect-changes
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix: ${{ fromJson(needs.detect-changes.outputs.matrix) }}
fail-fast: false
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive
- uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@017a9effdb900e5b5b2fddfb590a105619dca3c3 # v4.4.2

- name: Publish package
run: ./gradlew publish --continue #don't block progress for other packages
- name: Publish project
run: |
echo "Publishing ${{ matrix.project }}"
VERSION=$(./gradlew --quiet :${{ matrix.project }}:printVersion)
if [ "${{ github.event_name }}" = "push" ]; then
VERSION="${VERSION}-SNAPSHOT"
fi
./gradlew :${{ matrix.project }}:build -Pversion="$VERSION" -x test
./gradlew :${{ matrix.project }}:publish -Pversion="$VERSION"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9 changes: 9 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,12 @@ subprojects {
testImplementation "junit:junit:4.13.1"
}

task printVersion {
doLast {
print project.version
}
}

sourceCompatibility = 17
targetCompatibility = 17

Expand Down Expand Up @@ -286,6 +292,9 @@ subprojects {
publications {
mavenJava(MavenPublication) {
from components.java
artifact(p.tasks.osgi) {
classifier = 'bundle'
}
pom.withXml {
asNode().get('version') + ({
resolveStrategy = Closure.DELEGATE_FIRST
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
/***************************** BEGIN LICENSE BLOCK ***************************

The contents of this file are subject to the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one
at http://mozilla.org/MPL/2.0/.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.

The Initial Developer is Botts Innovative Research Inc. Portions created by the Initial
Developer are Copyright (C) 2026 the Initial Developer. All Rights Reserved.

******************************* END LICENSE BLOCK ***************************/

package org.sensorhub.process.geoloc;

import net.opengis.swe.v20.DataBlock;
import net.opengis.swe.v20.Quantity;
import net.opengis.swe.v20.Vector;
import org.sensorhub.algo.vecmath.Vect3d;
import org.sensorhub.api.processing.OSHProcessInfo;
import org.sensorhub.api.sensor.PositionConfig;
import org.vast.process.ExecutableProcessImpl;
import org.vast.process.ProcessException;
import org.vast.swe.SWEConstants;
import org.vast.swe.helper.GeoPosHelper;


/**
* <p>
* Process for converting 2D LatLon coordinates to 3D LLA by appending
* a configurable default altitude value.
* </p>
*
* @author Kalyn Stricklin
* @since May 6, 2026
*/
public class LLToLLA extends ExecutableProcessImpl
{
public static final OSHProcessInfo INFO = new OSHProcessInfo("geoloc:LL2LLA", "LatLon to LLA",
"LatLon to LLA conversion using a default altitude", LLToLLA.class);

protected Vector latLonInput;
protected Quantity defaultAlt;
protected Vector llaOutput;


public LLToLLA()
{
super(INFO);
GeoPosHelper sweHelper = new GeoPosHelper();

// create LatLon input (2D: lat, lon)
latLonInput = sweHelper.newLocationVectorLatLon(null);
inputData.add("latLonLocation", latLonInput);

// create default altitude parameter
defaultAlt = sweHelper.createQuantity()
.definition(GeoPosHelper.DEF_ALTITUDE_ELLIPSOID)
.label("Default Altitude")
.description("Default altitude value appended to produce LLA output")
.uom("m")
.build();
var altData = defaultAlt.createDataBlock();
altData.setDoubleValue(0.0);
defaultAlt.setData(altData);
paramData.add("defaultAltitude", defaultAlt);

// create LLA output (3D: lat, lon, alt)
llaOutput = sweHelper.newLocationVectorLLA(null);
outputData.add("llaLocation", llaOutput);
}


@Override
public void init() throws ProcessException
{
super.init();
}


@Override
public void execute() throws ProcessException
{
DataBlock llData = latLonInput.getData();
double lat = llData.getDoubleValue(0);
double lon = llData.getDoubleValue(1);

double alt = defaultAlt.getData().getDoubleValue();

DataBlock llaData = llaOutput.getData();
llaData.setDoubleValue(0, lat);
llaData.setDoubleValue(1, lon);
llaData.setDoubleValue(2, alt);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ public ProcessDescriptors()
addImpl(ECEFPosMatrix.INFO);
addImpl(ECEFToLLA.INFO);
addImpl(LLAToECEF.INFO);

addImpl(LLToLLA.INFO);

addImpl(RayIntersectSphere.INFO);
addImpl(RayIntersectEllipsoid.INFO);
addImpl(RayIntersectTerrain.INFO);
Expand Down
3 changes: 2 additions & 1 deletion sensors/aviation/sensorhub-driver-misb-uas/build.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
description = 'MISB UAS Sensors'
ext.details = "Driver for UAS system providing video and telemetry based on MISB ST 0601 / STANAG 4609"
version = '2.0.0'
version = '2.2.0'

// To build in entire java cv platform of projects use
// implementation('org.bytedeco:javacv-platform:1.5.2')
dependencies {
implementation 'org.sensorhub:sensorhub-core:' + oshCoreVersion
implementation project(':sensorhub-driver-videocam')
implementation project(':sensorhub-process-ffmpeg')
implementation project(':sensorhub-lib-stanag4609')
testImplementation('junit:junit:4.13')
testImplementation('org.jcodec:jcodec-javase:0.1.9')
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,34 +1,37 @@
package org.sensorhub.impl.sensor.uas;
/***************************** BEGIN LICENSE BLOCK ***************************

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
The contents of this file are subject to the Mozilla Public License, v. 2.0.
If a copy of the MPL was not distributed with this file, You can obtain one
at http://mozilla.org/MPL/2.0/.

Software distributed under the License is distributed on an "AS IS" basis,
WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
for the specific language governing rights and limitations under the License.

Copyright (C) 2021 Botts Innovative Research, Inc. All Rights Reserved.

******************************* END LICENSE BLOCK ***************************/
package org.sensorhub.impl.sensor.uas;

import org.sensorhub.api.common.SensorHubException;
import org.sensorhub.impl.sensor.AbstractSensorModule;
import org.sensorhub.impl.sensor.uas.common.SimulationClock;
import org.sensorhub.impl.sensor.uas.common.SyncTime;
import org.sensorhub.impl.sensor.uas.config.UasConfig;
import org.sensorhub.impl.sensor.uas.klv.SetDecoder;
import org.sensorhub.impl.sensor.uas.outputs.AirframeAttitude;
import org.sensorhub.impl.sensor.uas.outputs.FullTelemetry;
import org.sensorhub.impl.sensor.uas.outputs.GeoRefImageFrame;
import org.sensorhub.impl.sensor.uas.outputs.GimbalAttitude;
import org.sensorhub.impl.sensor.uas.outputs.Identification;
import org.sensorhub.impl.sensor.uas.outputs.Security;
import org.sensorhub.impl.sensor.uas.outputs.SensorLocation;
import org.sensorhub.impl.sensor.uas.outputs.SensorParams;
import org.sensorhub.impl.sensor.uas.outputs.UasOutput;
import org.sensorhub.impl.sensor.uas.outputs.Video;
import org.sensorhub.impl.sensor.uas.outputs.VmtiOutput;
import org.sensorhub.impl.sensor.uas.outputs.*;
import org.sensorhub.misb.stanag4609.comm.MpegTsProcessor;
import org.sensorhub.misb.stanag4609.klv.codec.SetDecoder;
import org.sensorhub.misb.stanag4609.time.SyncTime;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.vast.ogc.om.MovingFeature;
import org.vast.swe.SWEConstants;
import org.vast.util.Asserts;

import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;

/**
* Base class for two sensors that parse an MPEG TS stream.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,15 @@
******************************* END LICENSE BLOCK ***************************/
package org.sensorhub.impl.sensor.uas.outputs;

import net.opengis.swe.v20.DataBlock;
import org.sensorhub.api.data.DataEvent;
import org.sensorhub.impl.sensor.uas.UasSensorBase;
import org.sensorhub.impl.sensor.uas.config.UasConfig;
import org.sensorhub.impl.sensor.uas.klv.UasDataLinkSet;
import org.sensorhub.misb.stanag4609.klv.codec.misb0601.UasDataLinkSet;
import org.sensorhub.misb.stanag4609.tags.TagSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.opengis.swe.v20.DataBlock;

/**
* Output specification and provider for MISB-TS STANAG 4609 ST0601.16 UAS Metadata
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,16 @@
******************************* END LICENSE BLOCK ***************************/
package org.sensorhub.impl.sensor.uas.outputs;

import net.opengis.swe.v20.DataBlock;
import org.sensorhub.api.data.DataEvent;
import org.sensorhub.impl.sensor.uas.UasSensorBase;
import org.sensorhub.impl.sensor.uas.config.UasConfig;
import org.sensorhub.impl.sensor.uas.klv.SecurityLocalSet;
import org.sensorhub.impl.sensor.uas.klv.UasDataLinkSet;
import org.sensorhub.misb.stanag4609.klv.codec.misb0102.SecurityLocalSet;
import org.sensorhub.misb.stanag4609.klv.codec.misb0601.UasDataLinkSet;
import org.sensorhub.misb.stanag4609.tags.TagSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import net.opengis.swe.v20.DataBlock;

/**
* Output specification and provider for MISB-TS STANAG 4609 ST0601.16 UAS Metadata
*
Expand Down
Loading
Loading