private HeartRateInBeatsPerMinuteT getHeartBeatRateT(Wgs84Position position) {
TrackpointT trackpointT = position.getOrigin(TrackpointT.class);
if (trackpointT != null) {
HeartRateInBeatsPerMinuteT heartRateBpm = trackpointT.getHeartRateBpm();
if (heartRateBpm != null)
return heartRateBpm;
}
Short heartBeatRate = getHeartBeatRate(position);
if (heartBeatRate != null) {
HeartRateInBeatsPerMinuteT result = new ObjectFactory().createHeartRateInBeatsPerMinuteT();
result.setValue(heartBeatRate);
return result;
}
return null;
}