Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
df54d06
Updated addons to use new SWE constants and helpers
alexrobin Jun 2, 2020
633fe2b
Intellisense (#13)
TheRestOfMe Jun 3, 2020
7e03243
Gage fix2 (#17)
TheRestOfMe Jun 3, 2020
e6ddd18
Merge branch 'master' of https://github.com/opensensorhub/osh-addons.git
alexrobin Jun 3, 2020
89d2649
Changes to refactoring of addIdentifier2() to addIdentifier()
alexrobin Jun 3, 2020
64fda30
Added trajectory caching and an apiTimePeriod to allow reduction of c…
Jun 5, 2020
f011c6f
Added trajectory caching and an apiTimePeriod to allow reduction of c…
TheRestOfMe Jun 6, 2020
398197e
Added simple logic to auto-detect component containing encoded video
alexrobin Jun 12, 2020
b24c7e3
Added video transcoder based on FFMPEG bytedeco bindings
alexrobin Jun 14, 2020
8da8d30
Added support for scale + clone datablock to avoid interference w/
alexrobin Jun 14, 2020
f5d236b
Added support for transcoding HEVC, VP8 and VP9
alexrobin Aug 19, 2020
3f0851c
Always round frame dimensions to closest multiple of 2 + improved
alexrobin Aug 20, 2020
62bd5a9
Added cleanup code to prevent memory leak of internal FFPEG objects
alexrobin Aug 21, 2020
29c2978
Restored original 'empty-sost- config
alexrobin Aug 22, 2020
1a01daf
Remove .deleted storage files
alexrobin Aug 22, 2020
ccf4d86
Added video transcoding test config
alexrobin Aug 22, 2020
717414a
Merge remote-tracking branch 'origin/fakeGps-googleApiLimit'
alexrobin Sep 7, 2020
efe84a0
Bump netty.version in /services/sensorhub-service-mqtt (#14)
dependabot[bot] Sep 7, 2020
1e6dfb7
Bump org.eclipse.paho.client.mqttv3 in /services/sensorhub-service-mq…
dependabot[bot] Sep 7, 2020
609b6aa
Bump netty.version in /services/sensorhub-service-mqtt (#24)
dependabot[bot] Sep 7, 2020
047ddf9
Add support for getFoiTimeRanges
alexrobin Sep 7, 2020
96d135d
Added implementations of new updateRecordStore() method
alexrobin Sep 20, 2020
53bfcbc
Added utility classes to patch old metadata in Solo datastore
alexrobin Sep 25, 2020
77487d0
Add H264 pass-through support (upgraded V4L4J native library)
alexrobin Oct 17, 2020
9cacd0b
Updated config to increase memory, use log file and point to data fil…
alexrobin Oct 23, 2020
4a81ad7
Send an RTP packet to remote RTP port first to allow NAT traversal
alexrobin Dec 3, 2020
358b17e
add invert control to ui and change internal code to use this flag
tipatterson-dev Dec 9, 2020
6f2a517
add invert control to ui and change internal code to use this flag
tipatterson-dev Dec 9, 2020
2c5c09d
Merge remote-tracking branch 'origin/28-invert-dahua-tilt' into 28-in…
tipatterson-dev Dec 9, 2020
bcc246c
change inversion to only apply to relative commands as there was an i…
tipatterson-dev Jan 27, 2021
64d34d9
Include the changes in other cases (absolute)
tipatterson-dev Jan 27, 2021
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@
**/.classpath
**/.idea
**/*.iml
**/*.deleted
4 changes: 4 additions & 0 deletions dist/osh-sensiasoft/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
apply from: gradle.oshCoreDir + '/common.gradle'
version = oshCoreVersion

apply plugin: 'java'
sourceCompatibility = 1.8
targetCompatibility = 1.8

dependencies {
compile 'org.sensorhub:sensorhub-core:' + oshCoreVersion
compile 'org.sensorhub:sensorhub-service-swe:' + oshCoreVersion
Expand Down
30 changes: 15 additions & 15 deletions dist/osh-sensiasoft/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 4096,
"objectCacheSize": 100,
"storagePath": "gps_obs.dat",
"storagePath": "/var/osh/data/gps_obs.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.BasicStorageImpl",
"autoStart": false
},
Expand Down Expand Up @@ -131,7 +131,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 4096,
"objectCacheSize": 100,
"storagePath": "weather_obs.dat",
"storagePath": "/var/osh/data/weather_obs.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.ObsStorageImpl",
"autoStart": false
},
Expand All @@ -149,7 +149,7 @@
"agencyName": "Huntsville Fire Department",
"commSettings": {
"objClass": "org.sensorhub.impl.sensor.avl.MultipleFilesProviderConfig",
"dataFolder": "/home/ubuntu/data",
"dataFolder": "/var/osh/data/avl",
"moduleClass": "org.sensorhub.impl.sensor.avl.MultipleFilesProvider",
"autoStart": false
},
Expand All @@ -164,7 +164,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 4096,
"objectCacheSize": 100,
"storagePath": "avl.dat",
"storagePath": "/var/osh/data/avl.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.MultiEntityStorageImpl",
"autoStart": false
},
Expand Down Expand Up @@ -445,7 +445,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "avl-police.dat",
"storagePath": "/var/osh/data/avl-police.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.MultiEntityStorageImpl",
"autoStart": false
},
Expand All @@ -463,7 +463,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "avl-fire.dat",
"storagePath": "/var/osh/data/avl-fire.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.MultiEntityStorageImpl",
"autoStart": false
},
Expand All @@ -481,7 +481,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "avl-rescue.dat",
"storagePath": "/var/osh/data/avl-rescue.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.MultiEntityStorageImpl",
"autoStart": false
},
Expand Down Expand Up @@ -518,7 +518,7 @@
},
{
"objClass": "org.sensorhub.impl.sensor.plume.PlumeConfig",
"dataPath": "/home/ubuntu/data/plume/PARTICLE.OUT_12Zrel_350m",
"dataPath": "/var/osh/data/plume/PARTICLE.OUT_12Zrel_350m",
"id": "d136b6ea-3950-4691-bf56-ac893e5fcc44",
"moduleClass": "org.sensorhub.impl.sensor.plume.PlumeSensor",
"name": "Plume Data Stream",
Expand All @@ -530,7 +530,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "plume.dat",
"storagePath": "/var/osh/data/plume.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.BasicStorageImpl",
"autoStart": false
},
Expand Down Expand Up @@ -558,7 +558,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 4096,
"objectCacheSize": 100,
"storagePath": "sat_nav.dat",
"storagePath": "/var/osh/data/sat_nav.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.BasicStorageImpl",
"autoStart": false
},
Expand All @@ -578,7 +578,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "urn_android_device_060693280a28e015.dat",
"storagePath": "/var/osh/data/urn_android_device_060693280a28e015.dat",
"id": "5cb4569c-9e08-4fa1-1458-000000000000",
"moduleClass": "org.sensorhub.impl.persistence.perst.BasicStorageImpl",
"name": "Android Data Storage for Toulouse Drive",
Expand All @@ -588,7 +588,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "solo-nav.dat",
"storagePath": "/var/osh/data/solo-nav.dat",
"id": "f5ab10ad-9e12-4257-dddd-ed7d721b26e2",
"moduleClass": "org.sensorhub.impl.persistence.perst.ObsStorageImpl",
"name": "Solo MAVLink Storage (Airport Road 2)",
Expand All @@ -598,7 +598,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 1024,
"objectCacheSize": 100,
"storagePath": "solo-video.dat",
"storagePath": "/var/osh/data/solo-video.dat",
"id": "f5ab10ad-9e12-4257-dddd-ed7d721b26e3",
"moduleClass": "org.sensorhub.impl.persistence.perst.ObsStorageImpl",
"name": "Solo Video Storage (Airport Road 2)",
Expand Down Expand Up @@ -810,7 +810,7 @@
"objClass": "org.sensorhub.impl.persistence.perst.BasicStorageConfig",
"memoryCacheSize": 4096,
"objectCacheSize": 100,
"storagePath": "urn_android_device_a0e0eac2fea3f614.dat",
"storagePath": "/var/osh/data/urn_android_device_a0e0eac2fea3f614.dat",
"moduleClass": "org.sensorhub.impl.persistence.perst.BasicStorageImpl",
"autoStart": true
},
Expand All @@ -822,4 +822,4 @@
"name": "Alex's Nexus5 Sensors Storage",
"autoStart": true
}
]
]
16 changes: 14 additions & 2 deletions dist/osh-sensiasoft/config/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,18 @@
</encoder>
</appender>

<!-- main rolling log file -->
<appender name="MAIN_LOG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<fileNamePattern>osh_%d{yyyyMMdd}.log</fileNamePattern>
<maxHistory>30</maxHistory>
<totalSizeCap>10GB</totalSizeCap>
</rollingPolicy>
<encoder>
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{0} [%thread] - %msg%n</pattern>
</encoder>
</appender>

<!-- individual module log files -->
<property name="MODULE_ID" value="${MODULE_ID:-.}" />
<appender name="MODULE_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
Expand All @@ -24,12 +36,12 @@
</appender>

<root level="warn">
<appender-ref ref="STDOUT" />
<appender-ref ref="MAIN_LOG_FILE" />
</root>
<logger name="org.sensorhub" level="debug">
<appender-ref ref="MODULE_FILE" />
</logger>
<logger name="org.eclipse.jetty" level="warn" />
<logger name="org.vast" level="warn"/>

</configuration>
</configuration>
2 changes: 1 addition & 1 deletion dist/osh-sensiasoft/scripts/launch.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
java -Xmx128m -Dlogback.configurationFile=./logback.xml -cp "lib/*" org.sensorhub.impl.SensorHub config.json db
java -Xmx512m -Dlogback.configurationFile=./logback.xml -cp "lib/*" org.sensorhub.impl.SensorHub config.json db
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
package org.sensorhub.impl.persistence.perst;
import org.sensorhub.api.persistence.IRecordStoreInfo;
import org.sensorhub.impl.persistence.perst.BasicStorageConfig;
import org.sensorhub.impl.persistence.perst.BasicStorageImpl;
import org.vast.swe.SWEUtils;
import net.opengis.swe.v20.DataComponent;
import net.opengis.swe.v20.Vector;


public class PatchSoloNavDb
{

public static void main(String[] args) throws Exception
{
SWEUtils sweUtils = new SWEUtils(SWEUtils.V2_0);

// create simple storage config
BasicStorageConfig dbConf = new BasicStorageConfig();
dbConf.name = "DB";
dbConf.autoStart = true;
dbConf.memoryCacheSize = 1024;

// open storage
dbConf.storagePath = "solo-nav.dat";
BasicStorageImpl db = new BasicStorageImpl();
db.init(dbConf);
db.start();

for (IRecordStoreInfo rs: db.getRecordStores().values())
{
System.out.println(rs.getName());
System.out.println("*******************");
sweUtils.writeComponent(System.out, rs.getRecordDescription(), false, true);
System.out.println("\n");
sweUtils.writeEncoding(System.out, rs.getRecommendedEncoding(), true);
System.out.println("\n");
}

// update record descriptions
DataComponent platformAttRec = db.getRecordStores().get("platformAtt").getRecordDescription().copy();
Vector att = (Vector)platformAttRec.getComponent("attitude");
att.setReferenceFrame("http://www.opengis.net/def/cs/OGC/0/NED");
att.getComponent(0).setDefinition("http://sensorml.com/ont/swe/property/TrueHeading");
att.getComponent(1).setDefinition("http://sensorml.com/ont/swe/property/PitchAngle");
att.getComponent(2).setDefinition("http://sensorml.com/ont/swe/property/RollAngle");
sweUtils.writeComponent(System.out, platformAttRec, false, true);
System.out.println("\n");
//db.updateRecordStore("platformAtt", platformAttRec);

DataComponent gimbalAttRec = db.getRecordStores().get("gimbalAtt").getRecordDescription().copy();
att = (Vector)gimbalAttRec.getComponent("attitude");
att.getComponent(0).setDefinition("http://sensorml.com/ont/swe/property/YawAngle");
att.getComponent(1).setDefinition("http://sensorml.com/ont/swe/property/PitchAngle");
att.getComponent(2).setDefinition("http://sensorml.com/ont/swe/property/RollAngle");
sweUtils.writeComponent(System.out, gimbalAttRec, false, true);
System.out.println("\n");
//db.updateRecordStore("gimbalAtt", gimbalAttRec);

DataComponent platformLocRec = db.getRecordStores().get("platformLoc").getRecordDescription().copy();
att = (Vector)platformLocRec.getComponent("loc");
att.getComponent(0).setDefinition("http://sensorml.com/ont/swe/property/GeodeticLatitude");
att.getComponent(1).setDefinition("http://sensorml.com/ont/swe/property/Longitude");
att.getComponent(2).setDefinition("http://sensorml.com/ont/swe/property/HeightAboveMSL");
sweUtils.writeComponent(System.out, platformLocRec, false, true);
System.out.println("\n");
//db.updateRecordStore("platformLoc", platformLocRec);

db.commit();
db.stop();
}

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
package org.sensorhub.impl.persistence.perst;
import org.sensorhub.api.persistence.IRecordStoreInfo;
import org.sensorhub.impl.persistence.perst.BasicStorageConfig;
import org.sensorhub.impl.persistence.perst.BasicStorageImpl;
import org.vast.swe.SWEUtils;
import net.opengis.swe.v20.BinaryEncoding;
import net.opengis.swe.v20.ByteOrder;
import net.opengis.swe.v20.DataArray;
import net.opengis.swe.v20.DataComponent;


public class PatchSoloVideoDb
{

public static void main(String[] args) throws Exception
{
SWEUtils sweUtils = new SWEUtils(SWEUtils.V2_0);

// create simple storage config
BasicStorageConfig dbConf = new BasicStorageConfig();
dbConf.name = "DB";
dbConf.autoStart = true;
dbConf.memoryCacheSize = 1024;

// open storage
dbConf.storagePath = "solo-video.dat";
BasicStorageImpl db = new BasicStorageImpl();
db.init(dbConf);
db.start();

for (IRecordStoreInfo rs: db.getRecordStores().values())
{
System.out.println(rs.getName());
System.out.println("*******************");
sweUtils.writeComponent(System.out, rs.getRecordDescription(), false, true);
System.out.println("\n");
sweUtils.writeEncoding(System.out, rs.getRecommendedEncoding(), true);
System.out.println("\n");
}

// update record descriptions
DataComponent camOutputRec = db.getRecordStores().get("camOutput").getRecordDescription().copy();
DataArray frame = (DataArray) ((DataArray)camOutputRec.getComponent("videoFrame")).getElementType();
frame.getElementType().getComponent(0).setDefinition("http://sensorml.com/ont/swe/property/RedChannel");
frame.getElementType().getComponent(1).setDefinition("http://sensorml.com/ont/swe/property/GreenChannel");
frame.getElementType().getComponent(2).setDefinition("http://sensorml.com/ont/swe/property/BlueChannel");
sweUtils.writeComponent(System.out, camOutputRec, false, true);
System.out.println("\n");
//db.updateRecordStore("camOutput", camOutputRec);

TimeSeriesImpl videoStore = (TimeSeriesImpl)db.getRecordStores().get("camOutput");
BinaryEncoding dataEncoding = (BinaryEncoding)videoStore.getRecommendedEncoding().copy();
dataEncoding.setByteOrder(ByteOrder.BIG_ENDIAN);
//videoStore.recommendedEncoding = dataEncoding;
//videoStore.modify();

db.commit();
db.stop();
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,12 @@ public void addRecordStore(String name, DataComponent recordStructure, DataEncod
// do nothing
}

@Override
public void updateRecordStore(String name, DataComponent recordStructure)
{
// TODO implement updating the record description
}

@Override
public int getNumRecords(String recordType) {
SearchResponse response = client.prepareSearch(indexName).setTypes(RS_DATA_IDX_NAME)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
import org.sensorhub.api.persistence.IObsStorageModule;
import org.sensorhub.api.persistence.ObsFilter;
import org.sensorhub.api.persistence.ObsKey;
import org.sensorhub.api.persistence.ObsPeriod;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.vast.ogc.gml.GMLUtils;
Expand Down Expand Up @@ -917,4 +918,11 @@ protected synchronized QueryBuilder getPolygonGeoQuery(Polygon polygon) throws I
return QueryBuilders.geoIntersectionQuery(SHAPE_FIELD_NAME,
ShapeBuilders.newPolygon(Arrays.asList(polygon.getCoordinates())));
}

@Override
public Iterator<ObsPeriod> getFoiTimeRanges(IObsFilter filter) {
// TODO implement getFoiTimeRanges()
ObsPeriod unknownPeriod = new ObsPeriod("NONE", Double.NaN, Double.NaN);
return Arrays.asList(unknownPeriod).iterator();
}
}
Loading