Skip to main content

What units are the odometer readings in when using the MyGeotab Python package?

BMcNe-1334
Original Poster

I am using the mygeotab python package

 

when I get status data I can pull back the odometer but the amount looks too big.

 

device_id='bF' data = client.call('Get',typeName='StatusData',search={'fromDate':utcnow,'deviceSearch':{'id':device_id},'diagnosticSearch':{'id':'DiagnosticOdometerId'}})

 

{'controller': 'ControllerNoneId', 'data': 156023615.04000002, 'dateTime': datetime.datetime(2020, 9, 14, 18, 10, 27, 233000, tzinfo=datetime.timezone.utc), 'device': {'id': 'bF'}, 'diagnostic': {'id': 'DiagnosticOdometerId'}, 'id': 'avY1QFftsHUH2-hgLQPFEAA', 'version': '00000000078f0025'}

The odometer is reading 156,023,615 . What units are these in? I need to get them into miles

 

 

Join the conversation

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

Top Answers

Kaylan-1068
Geotabber

Hi @BMcNe-1334​ !

 

This odometer diagnostic is meters. You can always check units by doing a Get<Diagnostic> call:

2020_10_21_11_10_03_MyGeotab_SDK_The_Geotab_SDK_Software_Development_Kit_is_a_powerful_set_of_to

7 Replies

Kaylan-1068
Geotabber

Hi @BMcNe-1334​ !

 

This odometer diagnostic is meters. You can always check units by doing a Get<Diagnostic> call:

2020_10_21_11_10_03_MyGeotab_SDK_The_Geotab_SDK_Software_Development_Kit_is_a_powerful_set_of_to

BMcNe-1334
Original Poster

can I change the unit of measure inside the api call or should I just make a conversion factor in my script? On my company dashboard the units are set to a different unit.

 

Kaylan-1068
Geotabber

The api will always return the standard units of measure, and you can convert the results. In MyGeotab, for example, the conversion to whatever units is shown in the UI is handled after the data is pulled in.

@BMcNe-1334​ It is generally in Yards, we have built in a converter in our feed after the fact 1 mile = 1760 yrds.

Joseph-1062
Geotabber

@ScJohnsonisEnVue-1052​ @BMcNe-1334​ As Kaylan has pointed out, the units of measure for DiagnosticOdometerId is in meters, not yards, though I can see the confusion as the conversion rate is not that big between the two. We recommend using the Get<Diagnostic> call to verify the specific 'unitOfMeasure' for a diagnostic (i.e. meters, kilometers, liters, etc.).

@Joseph-1062​ thanks for that was it in yards earlier because it can be shown in yards in the UI.

Joseph-1062
Geotabber

@ScJohnsonisEnVue-1052​ To the extent of my knowledge, odometer has been stored in meters or using the metric system since conception. Keep in mind that there may be diagnostics (not all) that are converted from the unit of measure on the back-end (as identified via the Get<Diagnostic> call) to the unit of measure based on your user UI settings. Any raw data pulled using the SDK will be in the unit of measure specified in the back-end.

Still have questions?