You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+19-6Lines changed: 19 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,19 +46,23 @@ dependencies {
46
46
<br/>
47
47
48
48
<h2id="what-is">What is SOS-T?</h2>
49
-
The [**Open Geospatial Consortium***](https://www.opengeospatial.org/) is a group committed to making open standards for the geospatial community. One of those standards is the [**Sensor Observation Service**](https://www.opengeospatial.org/standards/sos) which defines how sensors can be managed and share their data. SOS-T is a specific capability that many SOS servers possess and is this library's focus. While powerful and flexible, SOS and SOS-T standards are sometimes difficult to begin using. This library is an effort to make all those standards and nuanced data formats happen in the background leaving you to focus on the app you're building and the great data it has to share with the world.
49
+
50
+
The [**Open Geospatial Consortium**](https://www.opengeospatial.org) is a group committed to making open standards for the geospatial community. One of those standards is the [**Sensor Observation Service**](https://www.opengeospatial.org/standards/sos) which defines how sensors can be managed and share their data. SOS-T is a specific capability that many SOS servers possess and is this library's focus. While powerful and flexible, SOS and SOS-T standards are sometimes difficult to begin using. This library is an effort to make all those standards and nuanced data formats happen in the background leaving you to focus on the app you're building and the great data it has to share with the world.
50
51
51
52
<h2id="brief-sos">A Brief Overview of how SOS-T works</h2>
53
+
52
54
An **SOS-T server** and a **Sensor** have a specific pattern of interaction. This pattern is as follows:<br/>
53
55
1. The first time a **Sensor** wants to start providing data to a **SOS-T server**, the **Sensor** sends a message that describes itself. The **SOS-T server**, in response, sends back some identification names that the **SOS-T server** wants the **Sensor** to use to identify itself.<br/>
54
56
2. When the **Sensor** is ready to tell the **SOS-T server** about the data the **Sensor** will provide, the **Sensor** sends the **SOS-T server** a template that describes its data. The **SOS-T server** relies back with an indentification name that the **SOS-T server** would like the **Sensor** to use to label its data so the **SOS-T server** can match that data back to the **Sensor**.<br/>
55
57
3. Up until this point, the **Sensor** and **SOS-T server** have just negotiated descriptions and data formats, no sensor readings have actually gone from the **Sensor** to the **SOS-T server**. These two set-up steps only need to be done once.<br/>
56
58
4. Now, when the **Sensor** wants to send data, it just sends a short form with its data and the label that the **SOS-T server** provided earlier. If all goes well, the **SOS-T server** lets the **Sensor** know that the data was received in a short reply. The **Sensor** keeps repeating this step whenever it wants to send new data.
57
59
58
60
<h2id="how-to">How to Send Sensor Data</h2>
59
-
To use this library, you should have some type of sensor in an app that needs to send data to an SOS-T server. This library started as a way to connect the SOFWERX [**TORGI**](https://github.com/sofwerx/TORGI) app to an SOS-T and is a good example of the library at work. This library is **not** the definitive answer on how to connect every sensor scenario with an SOS-T server, but it helped the TORGI effort and it's offered in hopes it will help other sensor developers as well. You can see the specific implementation of this library in the [**Torgi Service**](https://github.com/sofwerx/TORGI/blob/master/torgi/src/main/java/org/sofwerx/torgi/service/TorgiService.java). <br/><br/>
60
61
61
-
###Step 1: build your sensor
62
+
To use this library, you should have some type of sensor in an app that needs to send data to an SOS-T server. This library started as a way to connect the SOFWERX [**TORGI**](https://github.com/sofwerx/TORGI) app to an SOS-T and is a good example of the library at work. This library is **not** the definitive answer on how to connect every sensor scenario with an SOS-T server, but it helped the TORGI effort and it's offered in hopes it will help other sensor developers as well. You can see the specific implementation of this library in the [**TorgiService**](https://github.com/sofwerx/TORGI/blob/master/torgi/src/main/java/org/sofwerx/torgi/service/TorgiService.java). <br/><br/>
63
+
64
+
### Step 1: build your sensor
65
+
62
66
You can build a sensor by providing a human-readable name that uniquely identifies this one particular sensor, a unique ID for this sensor, a title for this type of sensor, and a human-readable description of the sensor.
63
67
```java
64
68
SosSensor sosSensor =newSosSensor("Sensor 18742","sensor18742","TORGI","Tactical Observation of RF and GNSS Interference sensor");
Those last two boolean values deserve a bit more attention. The first, *turnOn* means that if set to true, the library will immediately try to contact the **SOS-T server** and handle all the initial information about what the **Sensor** intends to provide.<br/>
82
90
The second boolean, *enableIpcBroadcast* means that the library will send out your sensor data to other apps on your same device. This is included primarily to support a future link with [**OpenSensorHub-Android**](https://github.com/opensensorhub/osh-android). If you want to send your sensor data to other apps on the same device, but not out over the internet to an SOS-T server, just provide *null* for the sosServerURL.
83
-
###Step 3: send your data
91
+
<br/>
92
+
93
+
### Step 3: send your data
94
+
84
95
When you have something to report to the **SOS-T server**, you can update the data in your SensorMeasurements
You can repeat this step as often as needed. There is no requirement to handle the connection with the server. The library runs on another thread and will make the connection whenever is needed and pass and receive information automatically.
107
+
<br/>
108
+
109
+
### Step 4: disconnecting
96
110
97
-
###Step 4: disconnecting
98
111
When you are finally done communicating with the server, clean up the server connection by calling:
0 commit comments