Skip to main content

How do I get altitude information via the Geotab API?

AaronD-Geotab-IICON
Geotabber
Original Poster

Is it possible to get Altitude information? The GPS record has latitude and longitude info, but can we get altitude somehow, and if yes, how do we get it via the API?

Join the conversation

You need to be logged in to reply to this post and participate in the Geotab Community discussions.

Top Answers

AaronD-Geotab-IICON
Geotabber
Original Poster

Altitude is available if you have a Go9 or newer device. However, it is not turned on by default. If you would like to begin receiving those measurements, you would need to contact support and ask for it to be turned on.

 

Once the master search has been turned on, it will begin to show up as StatusData, measured in meters above mean sea level. Like most data in Geotab, the curve logic applies to both reduce the amount of data recorded and increase overall accuracy.

 

When viewing via Engine Measurements, the Diagnostic name is "Altitude Above Mean Sea Level", and it would look like this:

 

image

When trying to access it via API, the diagnostic ID is "aZ_PCPTFQJUWGgwTodd5nhA"

 

A sample java script in our runner would look like this:

 

api.call("Get", {

typeName: "StatusData",

resultsLimit: 100,

search: {

"deviceSearch": {

"id": "b18C"

},

"diagnosticSearch": {

"id": "aZ_PCPTFQJUWGgwTodd5nhA"

},

"fromDate": "2020-06-01T00:00:00.000Z",

"toDate": "2020-06-03T00:00:00.000Z"

}

}, function(result){

for (var item of result)

console.log(item.dateTime, item.data);

},function(err){

console.log("error:", err);

});

 

 

 

Alternatively, you could use this as well (using an integration): https://developers.google.com/maps/documentation/elevation/overview

:)

 

4 Replies

AaronD-Geotab-IICON
Geotabber
Original Poster

Altitude is available if you have a Go9 or newer device. However, it is not turned on by default. If you would like to begin receiving those measurements, you would need to contact support and ask for it to be turned on.

 

Once the master search has been turned on, it will begin to show up as StatusData, measured in meters above mean sea level. Like most data in Geotab, the curve logic applies to both reduce the amount of data recorded and increase overall accuracy.

 

When viewing via Engine Measurements, the Diagnostic name is "Altitude Above Mean Sea Level", and it would look like this:

 

image

When trying to access it via API, the diagnostic ID is "aZ_PCPTFQJUWGgwTodd5nhA"

 

A sample java script in our runner would look like this:

 

api.call("Get", {

typeName: "StatusData",

resultsLimit: 100,

search: {

"deviceSearch": {

"id": "b18C"

},

"diagnosticSearch": {

"id": "aZ_PCPTFQJUWGgwTodd5nhA"

},

"fromDate": "2020-06-01T00:00:00.000Z",

"toDate": "2020-06-03T00:00:00.000Z"

}

}, function(result){

for (var item of result)

console.log(item.dateTime, item.data);

},function(err){

console.log("error:", err);

});

 

 

 

Alternatively, you could use this as well (using an integration): https://developers.google.com/maps/documentation/elevation/overview

:)

 

AaronD-Geotab-IICON
Geotabber
Original Poster

Great point!

 

This part of the google maps API description may give pause:

 

Before you begin: Before you start using the Elevation API, you need a project with a billing account and the Elevation API enabled. To learn more, see Get Started with Google Maps Platform.

Just to chime in, we have provided elevation reports integrated into Geotab using the Google Elevation API for over a year. Since it is tuned and confirmed by Google, it's usually considered more precise than measured altitude from GPS. In our use-case we aim to detect slopes and inclines causing increased or decreased load on EV engines, so the client made the decision to rely on Google's data and not measured data because sensors are noise- and error-prone. Appreciate seeing both options mentioned in this thread!

Still have questions?