- Home
- ANT Forum

You are here: Forum Home → ANT Developer’s Forums → ANT+ FIT Forum Has Moved → Thread

Is there any documentation of the Altitude field in the Global ID 20 message? I am using the Fit SDK 8, and reading fit files using C#. I get a narrow range from 27 to about 29. How do you scale this to meters?

You can find the answer to this in the fit.xls file in the SDK. Altitude is in units of 5m with an offset of 500m.

Almost correct. The units are 1/5 m, i.e. 0.2m, not 5m.

So take the unsigned 16 bit value, divide it by 5 and subtract 500 to get elevation in meters.

Cheers,

OMB

So take the unsigned 16 bit value, divide it by 5 and subtract 500 to get elevation in meters.

Cheers,

OMB

-In FIT you divide the binary quantity by the scale and then subtract the offset. For record (global ID 20) profile.xls shows us the scale = 5, offset = 500 and units are m, so a binary value of 27 => ~-495m

The C# SDK RecordMesg.GetAltitude() and SetAltitude() functions work with the altitude in meters directly and handles the scaling for you.

The C# SDK RecordMesg.GetAltitude() and SetAltitude() functions work with the altitude in meters directly and handles the scaling for you.

© 2024 Garmin Canada Inc.