Skip to main content

Resources

Resources are units available to dispatch centers for diffrent kinds of missions. Besides basic data, these resources always have a geo position and telemetry values associated with them.

Units can either be physical or virtual. Virtual units do have certain abilities making them useful for missions. Together with a team, physical units can form virtual ones.

Example

{
"name": "Unit Name",
"id": "UIUGEU4UTN",
"icon": "car",
"locations": [
{
"altitude": 612,
"direction": 0,
"latitude": 48.496016,
"longitude": 9.135110,
"speed": 0,
"timestamp": "2024-09-06T09:39:59.000Z",
"type": "CURRENT_LOCATION"
},
{
"altitude": 0,
"direction": 0,
"latitude": 48.27788,
"longitude": 8.85704,
"speed": 0,
"timestamp": "2024-06-30T01:40:28.000Z",
"type": "DESTINATION"
}
],
"telemetry": [
{
"timestamp": "2024-09-06T09:23:51.000Z",
"value": "2",
"type": {
"dataType": "int",
"descriptiveName": "Status",
"name": "fmsState"
}
}
],
"type": "PHYSICAL_RESOURCE",
"classification": {
"averageSpeed": 60,
"id": "UIUGUCUI",
"name": "Sonstige",
"postTravelTime": "PT0S",
"preTravelTime": "PT0S",
"routingType": "STREET"
},
"attributes": []
}

Location Update

Locations are sent to rescuetack as GraphQL mutations. It is preferred that you send them in chronological order.

mutation LocationUpdate {
addLocation(
input: {
acquistionTimestamp: "2024-09-22T12:03:01.000Z"
location: {
altitude: 413
direction: 0
latitude: 9.37267
longitude: 48.1928
}
locationType: CURRENT_LOCATION
receptionTimestamp: "2024-09-22T12:03:01.000Z"
resourceId: "UIUGEU4YP"
}
) {
boolean
}
}

Telemetry Update

First, determine the id of the telemetry value you want to set. You can get this information by querying the MissionResource object. Please keep in mind that not every value can be set for every resource.

query GetMissionResource {
missionResource(id: "UIUGEUY4I") {
permissions {
writeableTelemetryMeasurements {
id
unit
descriptiveName
dataType
name
}
}
}
}

Telemetry is then sent to rescuetack as GraphQL mutation. It is preferred that you send them in chronological order.

mutation AddTelemetry {
addTelemetry(
input: {
acquisitionTimestamp: "2024-09-22T12:15:01.000Z"
receptionTimestamp: "2024-09-22T12:15:01.000Z"
telemetryValue: "2"
measurementId: "UIUGUJUM"
resourceId: "UIUGEU4YP"
}
) {
boolean
}
}