Zum Inhalt
HALOWERK

Kartenwerk

trip metrics

Takes an ordered list of positions with timestamps, optionally carrying the battery state of charge at each fix, and returns what a fleet operator asks of a trace: total distance over ground, how much of the elapsed time the vehicle was moving and how much it stood, each individual stop with its position and duration, the mean and maximum speed, and — where a battery capacity is supplied — the energy drawn and the consumption per kilometre. Nothing is fetched: the endpoint queries no map, no.

POST https://karte.halowerk.com/v1/trip-metrics

Eingaben

Felder des veröffentlichten Eingabeschemas
FeldTypPflichtBeschreibung
pointsarrayJaThe trace, in chronological order. At least two fixes.
stop_speed_kmhnumberNeinAt or below this speed a segment counts as standing.
stop_min_sintegerNeinMinimum duration of standing time before it is reported as a stop.
battery_capacity_kwhnumberNeinUsable battery capacity. Without it, energy is reported in percent of charge only, never in kWh.
max_speed_kmhnumberNeinPlausibility limit. A segment implying more than this is rejected instead of summed.
Vollständiges Eingabeschema anzeigen
{
  "type": "object",
  "required": [
    "points"
  ],
  "additionalProperties": false,
  "properties": {
    "points": {
      "type": "array",
      "minItems": 2,
      "maxItems": 5000,
      "description": "The trace, in chronological order. At least two fixes.",
      "items": {
        "type": "object",
        "required": [
          "lat",
          "lon",
          "time"
        ],
        "additionalProperties": false,
        "properties": {
          "lat": {
            "type": "number",
            "minimum": -90,
            "maximum": 90,
            "description": "Latitude, WGS 84."
          },
          "lon": {
            "type": "number",
            "minimum": -180,
            "maximum": 180,
            "description": "Longitude, WGS 84."
          },
          "time": {
            "type": "string",
            "minLength": 4,
            "maxLength": 40,
            "description": "ISO 8601 timestamp of the fix. Must not go backwards from one fix to the next."
          },
          "soc_percent": {
            "type": "number",
            "minimum": 0,
            "maximum": 100,
            "description": "Battery state of charge at this fix, in percent. Optional, and may be present on only some fixes."
          }
        }
      }
    },
    "stop_speed_kmh": {
      "type": "number",
      "minimum": 0,
      "maximum": 30,
      "default": 2,
      "description": "At or below this speed a segment counts as standing."
    },
    "stop_min_s": {
      "type": "integer",
      "minimum": 10,
      "maximum": 86400,
      "default": 120,
      "description": "Minimum duration of standing time before it is reported as a stop."
    },
    "battery_capacity_kwh": {
      "type": "number",
      "minimum": 0.1,
      "maximum": 1000,
      "description": "Usable battery capacity. Without it, energy is reported in percent of charge only, never in kWh."
    },
    "max_speed_kmh": {
      "type": "number",
      "minimum": 1,
      "maximum": 400,
      "default": 250,
      "description": "Plausibility limit. A segment implying more than this is rejected instead of summed."
    }
  }
}

Originalschema öffnen

Veröffentlichtes Eingabebeispiel

{
  "points": [
    {
      "lat": 52.52,
      "lon": 13.405,
      "time": "2026-08-19T08:00:00Z",
      "soc_percent": 82
    },
    {
      "lat": 52.515,
      "lon": 13.39,
      "time": "2026-08-19T08:04:00Z",
      "soc_percent": 81.4
    },
    {
      "lat": 52.515,
      "lon": 13.39,
      "time": "2026-08-19T08:12:00Z",
      "soc_percent": 81.3
    },
    {
      "lat": 52.51,
      "lon": 13.37,
      "time": "2026-08-19T08:18:00Z",
      "soc_percent": 80.5
    }
  ],
  "stop_speed_kmh": 2,
  "stop_min_s": 120,
  "battery_capacity_kwh": 58
}

Ergebnis & Dokumentation

Maschinenlesbare Dokumentation dieses Hubs

Quelle dieser Seite: der veröffentlichte HALOWERK-Katalog. Stand: 2026-11-01, 15:19 UTC.

Weitere Endpunkte dieses Hubs

Alle Endpunkte dieses Hubs →