From 82d61f782a8b361e4782375e74df928a6258f5f9 Mon Sep 17 00:00:00 2001 From: kalynstricklin Date: Wed, 6 May 2026 11:28:44 +0800 Subject: [PATCH 1/5] Create LLToLLA.java --- .../org/sensorhub/process/geoloc/LLToLLA.java | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java diff --git a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java new file mode 100644 index 000000000..7776b6e7d --- /dev/null +++ b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java @@ -0,0 +1,92 @@ +/***************************** 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. + +Copyright (C) 2012-2015 Sensia Software LLC. 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.api.processing.OSHProcessInfo; +import org.vast.process.ExecutableProcessImpl; +import org.vast.process.ProcessException; +import org.vast.swe.SWEConstants; +import org.vast.swe.helper.GeoPosHelper; + + +/** + *

+ * Process for converting 2D LatLon coordinates to 3D LLA by appending + * a configurable default altitude value. + *

+ * + * @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(); + defaultAlt.getData().setDoubleValue(0.0); + 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); + } +} From 6f71e68df937cf4f3dce29c7c42f27ce1c304e57 Mon Sep 17 00:00:00 2001 From: kalynstricklin Date: Thu, 7 May 2026 01:54:40 +0800 Subject: [PATCH 2/5] fix the license header --- .../org/sensorhub/process/geoloc/LLToLLA.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java index 7776b6e7d..87a06c6d9 100644 --- a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java +++ b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java @@ -1,16 +1,17 @@ /***************************** 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. - -Copyright (C) 2012-2015 Sensia Software LLC. All Rights Reserved. - -******************************* END 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; From 776e92c02bb3255c36382a8fbe3efd3313781263 Mon Sep 17 00:00:00 2001 From: Kalyn Stricklin <134666642+kalynstricklin@users.noreply.github.com> Date: Thu, 7 May 2026 01:59:43 +0800 Subject: [PATCH 3/5] Update license block and copyright information --- .../org/sensorhub/process/geoloc/LLToLLA.java | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java index 7776b6e7d..87a06c6d9 100644 --- a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java +++ b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java @@ -1,16 +1,17 @@ /***************************** 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. - -Copyright (C) 2012-2015 Sensia Software LLC. All Rights Reserved. - -******************************* END 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; From 9dbcbb7b93cdb0ebea3a33e469a131ffab358df5 Mon Sep 17 00:00:00 2001 From: kalynstricklin Date: Thu, 7 May 2026 07:59:25 +0800 Subject: [PATCH 4/5] Update ProcessDescriptors.java --- .../java/org/sensorhub/process/geoloc/ProcessDescriptors.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/ProcessDescriptors.java b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/ProcessDescriptors.java index 83a6f962a..091a7fbce 100644 --- a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/ProcessDescriptors.java +++ b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/ProcessDescriptors.java @@ -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); From 43d5db3d3aeb3e6290aa31b30b706d83094903e2 Mon Sep 17 00:00:00 2001 From: kalynstricklin Date: Thu, 7 May 2026 10:10:25 +0800 Subject: [PATCH 5/5] fix datablock --- .../src/main/java/org/sensorhub/process/geoloc/LLToLLA.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java index 87a06c6d9..9334a8df6 100644 --- a/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java +++ b/processing/sensorhub-process-geoloc/src/main/java/org/sensorhub/process/geoloc/LLToLLA.java @@ -18,7 +18,9 @@ Developer are Copyright (C) 2026 the Initial Developer. All Rights Reserved. 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; @@ -60,7 +62,9 @@ public LLToLLA() .description("Default altitude value appended to produce LLA output") .uom("m") .build(); - defaultAlt.getData().setDoubleValue(0.0); + var altData = defaultAlt.createDataBlock(); + altData.setDoubleValue(0.0); + defaultAlt.setData(altData); paramData.add("defaultAltitude", defaultAlt); // create LLA output (3D: lat, lon, alt)