Read distance/duration in Garmin Workout FIT file

It looks like there is a problem when import Garmin Workout FIT file. I set the Distance/Duration in duration_value section whose type is specified by the duration_type field. But it seems that the importer ignore this value but read from the notes field.

Sorry, I used Chinese characters in my Fit file so that I can read it easily during run. Then the importer failed to translate those to km or min.

Here is a sample output of the fitdump of one step. I set duration_type to distance (1) and duration_distance to 12800.00m. But after I import, the distance (or the compuated duration) is not recognized correctly unless I change notes field to something like “12.8km M配速
5:20 - 5:25”

workout_step (27, type: 0, length: 118 bytes):
message_index (254-1-UINT16): selected=0,reserved=0,mask=1 (1)
wkt_step_name (0-16-STRING, INVALID): “”
duration_type (1-1-ENUM): distance (1)
duration_distance (2-1-UINT32, original name: duration_value): 12800.00 m (1280000)
target_speed_zone (4-1-UINT32, original name: target_value): 0
target_type (3-1-ENUM): speed (0)
custom_target_speed_low (5-1-UINT32, original name: custom_target_value_low): 11.077 km/h (3077)
custom_target_speed_high (6-1-UINT32, original name: custom_target_value_high): 11.250 km/h (3125)
intensity (7-1-ENUM): active (0)
notes (8-80-STRING): “12.8公里 M配速
5:20 - 5:25”