t.21.120.2.source-code.JumpMesg Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of fit Show documentation
Show all versions of fit Show documentation
The Official Garmin FIT SDK
/////////////////////////////////////////////////////////////////////////////////////////////
// Copyright 2023 Garmin International, Inc.
// Licensed under the Flexible and Interoperable Data Transfer (FIT) Protocol License; you
// may not use this file except in compliance with the Flexible and Interoperable Data
// Transfer (FIT) Protocol License.
/////////////////////////////////////////////////////////////////////////////////////////////
// ****WARNING**** This file is auto-generated! Do NOT edit this file.
// Profile Version = 21.120Release
// Tag = production/release/21.120.00-0-g2d77811
/////////////////////////////////////////////////////////////////////////////////////////////
package com.garmin.fit;
public class JumpMesg extends Mesg {
public static final int TimestampFieldNum = 253;
public static final int DistanceFieldNum = 0;
public static final int HeightFieldNum = 1;
public static final int RotationsFieldNum = 2;
public static final int HangTimeFieldNum = 3;
public static final int ScoreFieldNum = 4;
public static final int PositionLatFieldNum = 5;
public static final int PositionLongFieldNum = 6;
public static final int SpeedFieldNum = 7;
public static final int EnhancedSpeedFieldNum = 8;
protected static final Mesg jumpMesg;
static {int field_index = 0;
// jump
jumpMesg = new Mesg("jump", MesgNum.JUMP);
jumpMesg.addField(new Field("timestamp", TimestampFieldNum, 134, 1, 0, "s", false, Profile.Type.DATE_TIME));
field_index++;
jumpMesg.addField(new Field("distance", DistanceFieldNum, 136, 1, 0, "m", false, Profile.Type.FLOAT32));
field_index++;
jumpMesg.addField(new Field("height", HeightFieldNum, 136, 1, 0, "m", false, Profile.Type.FLOAT32));
field_index++;
jumpMesg.addField(new Field("rotations", RotationsFieldNum, 2, 1, 0, "", false, Profile.Type.UINT8));
field_index++;
jumpMesg.addField(new Field("hang_time", HangTimeFieldNum, 136, 1, 0, "s", false, Profile.Type.FLOAT32));
field_index++;
jumpMesg.addField(new Field("score", ScoreFieldNum, 136, 1, 0, "", false, Profile.Type.FLOAT32));
field_index++;
jumpMesg.addField(new Field("position_lat", PositionLatFieldNum, 133, 1, 0, "semicircles", false, Profile.Type.SINT32));
field_index++;
jumpMesg.addField(new Field("position_long", PositionLongFieldNum, 133, 1, 0, "semicircles", false, Profile.Type.SINT32));
field_index++;
jumpMesg.addField(new Field("speed", SpeedFieldNum, 132, 1000, 0, "m/s", false, Profile.Type.UINT16));
jumpMesg.fields.get(field_index).components.add(new FieldComponent(8, false, 16, 1000, 0)); // enhanced_speed
field_index++;
jumpMesg.addField(new Field("enhanced_speed", EnhancedSpeedFieldNum, 134, 1000, 0, "m/s", false, Profile.Type.UINT32));
field_index++;
}
public JumpMesg() {
super(Factory.createMesg(MesgNum.JUMP));
}
public JumpMesg(final Mesg mesg) {
super(mesg);
}
/**
* Get timestamp field
* Units: s
*
* @return timestamp
*/
public DateTime getTimestamp() {
return timestampToDateTime(getFieldLongValue(253, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD));
}
/**
* Set timestamp field
* Units: s
*
* @param timestamp The new timestamp value to be set
*/
public void setTimestamp(DateTime timestamp) {
setFieldValue(253, 0, timestamp.getTimestamp(), Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get distance field
* Units: m
*
* @return distance
*/
public Float getDistance() {
return getFieldFloatValue(0, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set distance field
* Units: m
*
* @param distance The new distance value to be set
*/
public void setDistance(Float distance) {
setFieldValue(0, 0, distance, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get height field
* Units: m
*
* @return height
*/
public Float getHeight() {
return getFieldFloatValue(1, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set height field
* Units: m
*
* @param height The new height value to be set
*/
public void setHeight(Float height) {
setFieldValue(1, 0, height, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get rotations field
*
* @return rotations
*/
public Short getRotations() {
return getFieldShortValue(2, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set rotations field
*
* @param rotations The new rotations value to be set
*/
public void setRotations(Short rotations) {
setFieldValue(2, 0, rotations, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get hang_time field
* Units: s
*
* @return hang_time
*/
public Float getHangTime() {
return getFieldFloatValue(3, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set hang_time field
* Units: s
*
* @param hangTime The new hangTime value to be set
*/
public void setHangTime(Float hangTime) {
setFieldValue(3, 0, hangTime, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get score field
* Comment: A score for a jump calculated based on hang time, rotations, and distance.
*
* @return score
*/
public Float getScore() {
return getFieldFloatValue(4, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set score field
* Comment: A score for a jump calculated based on hang time, rotations, and distance.
*
* @param score The new score value to be set
*/
public void setScore(Float score) {
setFieldValue(4, 0, score, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get position_lat field
* Units: semicircles
*
* @return position_lat
*/
public Integer getPositionLat() {
return getFieldIntegerValue(5, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set position_lat field
* Units: semicircles
*
* @param positionLat The new positionLat value to be set
*/
public void setPositionLat(Integer positionLat) {
setFieldValue(5, 0, positionLat, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get position_long field
* Units: semicircles
*
* @return position_long
*/
public Integer getPositionLong() {
return getFieldIntegerValue(6, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set position_long field
* Units: semicircles
*
* @param positionLong The new positionLong value to be set
*/
public void setPositionLong(Integer positionLong) {
setFieldValue(6, 0, positionLong, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get speed field
* Units: m/s
*
* @return speed
*/
public Float getSpeed() {
return getFieldFloatValue(7, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set speed field
* Units: m/s
*
* @param speed The new speed value to be set
*/
public void setSpeed(Float speed) {
setFieldValue(7, 0, speed, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Get enhanced_speed field
* Units: m/s
*
* @return enhanced_speed
*/
public Float getEnhancedSpeed() {
return getFieldFloatValue(8, 0, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
/**
* Set enhanced_speed field
* Units: m/s
*
* @param enhancedSpeed The new enhancedSpeed value to be set
*/
public void setEnhancedSpeed(Float enhancedSpeed) {
setFieldValue(8, 0, enhancedSpeed, Fit.SUBFIELD_INDEX_MAIN_FIELD);
}
}