Sections

  • Basics
  • API reference
  • Release notes
  • Deprecations
  • Examples
Sign in / Sign up
    • System
    • Day
    • Night
  • Sign in / Sign up
Query navigation session
Mutate to recalculate navigation

Updating a navigation session

Once a navigation session has been created and a subscription is running, more data can be provided to update the navigation session. Based on locations and telemetry data, Chargetrip optimizes the route.

Mutation

To update a navigation session an id and array of location_data need to be provided. The telemetry input is optional but including it will result in better consumption predictions and more accurate routing. If the mutation executed succesfully, OK will be returned on the data object. The updates itself will be reflected on the navigationUpdatedById subscription or the navigation query. When using a query, please be aware that changes can take a little while to process.

Locations data heartbeat

The location_data array requires at least one location. If Mapbox is used as a data provider, periodical updates are received that can be stored in a local cache. Alternatively, location can be stored every 5 or 10 seconds depending on the vehicle speed.

Sending the vehicle location at least every 5 minutes is recommended.

Telemetry data

Next to location data, telemetry data is accepted. This is real-time data coming directly from the vehicle. Obtaining this data can be done via the Connect platform as described here.

Telemetry data might include the current heading of the vehicle, state_of_charge, tire_pressure or is_charging state of the vehicle. The state_of_charge can be used for sending a new state of charge value after charging at the station or to confirm rolling predictions by sending intermittend state of charge values. Tire pressure can be used to more accurately do range predictions and by using the charging state of the vehicle, visual updates can be presented.

An overview of accepted / recommended telemetry fields is displayed here. Chargetrip can easily add additional custom telemetry inputs such as; heat pumps, active weight, refrigeration, PV etc. To learn more, contact sales@chargetrip.com or your customer success representative.

Arguments

input • NavigationUpdateInput

• Required

Navigation update input

id • ID

ID of the navigation session

location_data • NavigationUpdateLocationsInput

A list of locations that were collected since the last update

geometry • PointInput

GPS location

type • PointType

Point type

Show PointType enum values

Point

coordinates • Float

Coordinates [longitude, latitude]

properties • NavigationUpdateLocationPropertiesInput

Extra information about the location

route_leg • Int

Current route leg index corresponding to a location

speed • VehicleSpeedInput

Speed at a location

value • Float

Value of the vehicle speed

type • SpeedUnit

Type of the vehicle speed

Show SpeedUnit enum values

kilometers_per_hour

Return the speed in kilometers per hour

miles_per_hour

Return the speed in miles per hour

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

timestamp • Int

UNIX timestamp at location, in seconds

elevation • ElevationInput

Elevation information

value • Float

Value of the elevation

type • DistanceUnit

Type of the value of elevation

Show DistanceUnit enum values

meter

Return the distance in meters

foot

Return the distance in feet

kilometer

Return the distance in kilometers

mile

Return the distance in miles

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

telemetry • TelemetryInput

Telemetry data input

auxiliary_consumption • AuxiliaryConsumptionInput

Average auxiliary power consumption

value • Float

Value of the auxiliary power consumption of the vehicle

type • AuxiliaryConsumptionUnit

Type of auxiliary power consumption of the vehicle

Show AuxiliaryConsumptionUnit enum values

kilowatt_hour

Return the auxiliary consumption in kilowatt hours

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

battery_current • Float

Battery current in ampere

battery_temperature • BatteryTemperatureInput

Battery temperature

value • Float

Value of the temperature of the battery

type • TemperatureUnit

Type of temperature of the battery

Show TemperatureUnit enum values

Celsius

Return the temperature in Celsius

Fahrenheit

Return the temperature in Fahrenheit

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

battery_voltage • Float

Battery voltage in volts

is_charging • Boolean

Is the vehicle currently charging

charge_speed • ChargeSpeedInput

Rate of charge

value • Float

Value of the charge speed of the battery

type • ChargeSpeedUnit

Type of the charge speed of the battery

Show ChargeSpeedUnit enum values

kilowatt_hour

Return the charge speed in kilowatt hours

kilometers_per_hour

Return the charge speed in kilometers per hour

miles_per_hour

Return the charge speed in miles per hour

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

charge_total • ChargeTotalInput

Amount charged

value • Float

Value of the temperature of the battery

type • StateOfChargeUnit

Type of total charge amount

Show StateOfChargeUnit enum values

kilometer

Return the state of charge in kilometers

mile

Return the state of charge in miles

kilowatt_hour

Return the state of charge in kilowatt hours

percentage

Return the state of charge as a percentage

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

total_occupant_weight • TotalOccupantWeightInput

Cumulated weight of the occupants

value • Float

Value of the current weight of the occupants

type • WeightUnit

Type of the current weight of the occupants

Show WeightUnit enum values

kilogram

Return the weight in kilograms

pound

Return the weight in pounds

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

total_cargo_weight • TotalCargoWeightInput

Weight of the cargo

value • Float

Value of the current weight of the cargo

type • WeightUnit

Type of the current weight of the cargo

Show WeightUnit enum values

kilogram

Return the weight in kilograms

pound

Return the weight in pounds

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

elevation • ElevationInput

Current elevation

value • Float

Value of the elevation

type • DistanceUnit

Type of the value of elevation

Show DistanceUnit enum values

meter

Return the distance in meters

foot

Return the distance in feet

kilometer

Return the distance in kilometers

mile

Return the distance in miles

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

heading • Float

Current heading in degrees

motor_rpm • Int

RPM of the motor

occupants • Int

Number of occupants in the vehicle

odometer • OdometerInput

Mileage or odometer reading

value • Float

Value of the vehicle's odometer

type • DistanceUnit

Type of the value of the vehicle's odometer

Show DistanceUnit enum values

meter

Return the distance in meters

foot

Return the distance in feet

kilometer

Return the distance in kilometers

mile

Return the distance in miles

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

outside_temperature • OutsideTempInput

Outside temperature

value • Float

Value of the outside temperature

type • TemperatureUnit

Type of the value of the outside temperature

Show TemperatureUnit enum values

Celsius

Return the temperature in Celsius

Fahrenheit

Return the temperature in Fahrenheit

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

is_parked • Boolean

Vehicle is in park, neutral or turned off

power • PowerInput

Vehicle power

value • Float

Value of the positive or negative power. When negative the vehicle is charging

type • PowerUnit

Type of the value of the power

Show PowerUnit enum values

kilowatt

Return the power in kilowatts

horsepower

Return the power in horsepower

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

state_of_charge • StateOfChargeInput

Battery state of charge

value • Float

Value of the state of charge of the vehicle

type • StateOfChargeUnit

Type of the state of charge of the vehicle

Show StateOfChargeUnit enum values

kilometer

Return the state of charge in kilometers

mile

Return the state of charge in miles

kilowatt_hour

Return the state of charge in kilowatt hours

percentage

Return the state of charge as a percentage

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

tire_pressure • TirePressureInput

Average tire pressures of all wheels, starting from the front side right to left and to the rear

value • Float

Values for the tire pressure, starting from the front side right to left and to the rear

type • PressureUnit

Type of the value of pressure

Show PressureUnit enum values

bar

Return the pressure in bar

pounds_per_square_inch

Return the pressure in pounds per square inch

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

timestamp • Int

UNIX timestamp in seconds

vehicle_speed • VehicleSpeedInput

Vehicle speed

value • Float

Value of the vehicle speed

type • SpeedUnit

Type of the vehicle speed

Show SpeedUnit enum values

kilometers_per_hour

Return the speed in kilometers per hour

miles_per_hour

Return the speed in miles per hour

source • TelemetryInputSource

Source of inputted data, defaults to 'manual'

Default • manual

Show TelemetryInputSource enum values

manual

Manually inputted value

telemetry

Value from the vehicle's telemetry

custom • JSON

Custom input fields can be added based on telemetry architecture

Response

A response can either contain a data or an errors object. The response header will always return 200 as a status code.

Data object

When successful, a data object will be returned with the requested fields. If there are no fields present the data object will return the operation name with the appropriate return type. If the operation was a query, this output will be an object of the schema’s query root type; if the operation was a mutation, this output will be an object of the schema’s mutation root type.

Error object

If unsuccessful, an errors object will be returned with more details in the extensions object. The error object can contain any of the following objects.

Error

EMPTY_ARRAY_NOT_ALLOWED

Array $NAME should have at least one value

Error

INVALID_COORDINATES

Coordinates provided for $LOCATION are not valid.

Error

INVALID_UNIT

Provided unit type $TYPE for $LOCATION is not valid.

Error

INVALID_VALUE

Provided value $VALUE for $LOCATION is not valid. Expected value of type $EXPECTEDTYPE.

Error

NAVIGATION_HEADING_INVALID

Heading should be a value between 0 and 360

Error

NAVIGATION_LOCATION_INVALID

One or more locations sent are invalid

Error

NAVIGATION_LOCATIONS_MINIMUM_LENGTH

You should send us at least one location

Error

NAVIGATION_TELEMETRY_INVALID

Field $TELEMETRYTYPE cannot be negative

Error

NEGATIVE_VALUE_NOT_ALLOWED

Negative value for $LOCATION is not allowed.

Error

OCCUPANTS_BELOW_ALLOWED

Provided number of occupants for $LOCATION is not valid. The value must be at least 1.

Error

TIRE_PRESSURE_BELOW_ALLOWED

Provided tire pressure is not valid. The value must be at least 1.

Error

ZERO_OR_NEGATIVE_VALUE_NOT_ALLOWED

Zero or negative value for $LOCATION is not allowed.

  • Basics

    API Basics GraphQL Basics EV basics
  • API reference

    API Vehicles Stations Routes Navigation Vehicle connectivity Tile service Isolines
  • Products

    Website Dashboard Help center SDKs
  • Tooling

    Playground Voyager Examples API Status
  • Legal

    Terms & Conditions Privacy Policy Cookie Policy SLA Security
Mission StatementState of chargeTry Chargetrip Go

© Chargetrip 2023

Build with love in

Amsterdam ❤️

API reference

  • API
  • Vehicles
  • Stations
  • Routes
  • Navigation
  • Vehicle connectivity
  • Tile service
  • Isolines

Sections

  • Quick setup guide
  • Pagination
  • Introduction
  • Query vehicles
  • Query vehicle details
  • Query premium vehicle details
  • Introduction
  • Query stations
  • Query station details
  • Query stations around a GeoJSON point
  • Query station reviews
  • Mutate to create a station review
  • Query station operators
  • Query station operator details
  • Query station tariffs
  • Query station tariff details
  • Query station amenities
  • Query station statistics
  • Introduction
  • Mutate to create a new route
  • Subscribe to route updates
  • Query route details
  • Query route path
  • Introduction
  • Mutate to start a new navigation session
  • Subscribe to navigation updates
  • Query navigation session
  • Mutate to update a navigation session
  • Mutate to recalculate navigation
  • Mutate to finish navigation
  • Introduction
  • Mutate to create a new connected vehicle
  • Subscribe to a connected vehicle
  • Mutate to authorize a connected vehicle
  • Query connected vehicle list
  • Query data from vehicle
  • Query connected vehicle
  • Mutate to update a connected vehicle
  • Mutate to remove a connected vehicle
  • Introduction
  • Properties
  • Filters
  • Integration
  • Introduction
  • Mutation to create an isoline
  • Subscribe to isoline details
  • Query isoline details