Welcome Guest,Register Now
Log In

ANT Forum

Welcome guest, please Login or Register

   

Ant Fit File Altitude problem

Rank

Total Posts: 1

Joined 2013-09-18

PM

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?      
Avatar
RankRankRankRank

Total Posts: 235

Joined 2012-08-31

PM

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.      
Avatar
RankRankRankRank

Total Posts: 296

Joined 0

PM

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      
RankRankRank

Total Posts: 91

Joined 2012-10-12

PM

-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.