Skip to content

Commit

Permalink
add units, #219
Browse files Browse the repository at this point in the history
  • Loading branch information
zepumph committed Feb 19, 2020
1 parent 67bca18 commit 3ee43bd
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 30 deletions.
18 changes: 9 additions & 9 deletions js/common/model/DataPointIO.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,15 @@ define( require => {
}

DataPointIO.documentation = 'A single data point on a projectile\'s trajectory, with the following data:<br><ul>' +
'<li>time: The time of the data point</li>' +
'<li>position: the position of the point in model coordinates</li>' +
'<li>airDensity: the air density when the point was collected</li>' +
'<li>velocity: the velocity of the projectile at the time when the point was collected</li>' +
'<li>acceleration: the acceleration of the projectile at the time when the point was collected</li>' +
'<li>dragForce: the acceleration of the projectile at the time when the point was collected</li>' +
'<li>forceGravity: the acceleration of the projectile at the time when the point was collected</li>' +
'<li>apex: if this data point was at the apex of a trajectory</li>' +
'<li>reachedGround: if this data point was collected when the projectile was on the ground</li></ul>';
'<li>time (seconds): The time of the data point</li>' +
'<li>position (meters): the position of the point in model coordinates</li>' +
'<li>airDensity (kg/cu m): the air density when the point was collected</li>' +
'<li>velocity (m/s): the velocity of the projectile at the time when the point was collected</li>' +
'<li>acceleration (m/s^2): the acceleration of the projectile at the time when the point was collected</li>' +
'<li>dragForce (newtons): the acceleration of the projectile at the time when the point was collected</li>' +
'<li>forceGravity (newtons): the acceleration of the projectile at the time when the point was collected</li>' +
'<li>apex (boolean): if this data point was at the apex of a trajectory</li>' +
'<li>reachedGround (boolean): if this data point was collected when the projectile was on the ground</li></ul>';
DataPointIO.validator = { isValidValue: v => v instanceof phet.projectileMotion.DataPoint };
DataPointIO.typeName = 'DataPointIO';
ObjectIO.validateSubtype( DataPointIO );
Expand Down
4 changes: 2 additions & 2 deletions js/common/model/ProjectileMotionMeasuringTape.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ define( require => {
// @public
this.basePositionProperty = new Vector2Property( new Vector2( 0, 0 ), {
tandem: tandem.createTandem( 'basePositionProperty' ),
phetioDocumentation: 'Base (start of tape from the container) position'
phetioDocumentation: 'Base (start of tape from the container) position, in meters.'
} );

// @public -
this.tipPositionProperty = new Vector2Property( new Vector2( 1, 0 ), {
tandem: tandem.createTandem( 'tipPositionProperty' ),
phetioDocumentation: 'Tip (end of measuring tape) position'
phetioDocumentation: 'Tip (end of measuring tape) position, in meters.'
} );

// @public
Expand Down
5 changes: 3 additions & 2 deletions js/common/model/Tracer.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,14 @@ define( require => {
// @public
this.positionProperty = new Vector2Property( new Vector2( tracerX, tracerY ), {
tandem: tandem.createTandem( 'positionProperty' ),
phetioDocumentation: 'The position of the tracer in model coordinates'
phetioDocumentation: 'The position of the tracer in model coordinates, in meters.'
} );

// @public {Property.<DataPoint|null>}
this.dataPointProperty = new Property( null, {
tandem: tandem.createTandem( 'dataPointProperty' ),
phetioDocumentation: 'Data point that the tracer is displaying information about, or null if no info displayed.',
phetioDocumentation: 'Data point that the tracer is displaying information about, or null if no info displayed. ' +
'See DataPointIO for more information about the data point value.',
phetioType: PropertyIO( NullableIO( DataPointIO ) )
} );

Expand Down
32 changes: 16 additions & 16 deletions js/phet-io/projectile-motion-phet-io-elements-baseline.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.dragScreen.model.measuringTape.basePositionProperty": {
"phetioDocumentation": "Base (start of tape from the container) position",
"phetioDocumentation": "Base (start of tape from the container) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -197,7 +197,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.dragScreen.model.measuringTape.tipPositionProperty": {
"phetioDocumentation": "Tip (end of measuring tape) position",
"phetioDocumentation": "Tip (end of measuring tape) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -314,7 +314,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<ReferenceIO>"
},
"projectileMotion.dragScreen.model.tracer.dataPointProperty": {
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed.",
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed. See DataPointIO for more information about the data.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -340,7 +340,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.dragScreen.model.tracer.positionProperty": {
"phetioDocumentation": "The position of the tracer in model coordinates",
"phetioDocumentation": "The position of the tracer in model coordinates, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -10181,7 +10181,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.introScreen.model.measuringTape.basePositionProperty": {
"phetioDocumentation": "Base (start of tape from the container) position",
"phetioDocumentation": "Base (start of tape from the container) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -10207,7 +10207,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.introScreen.model.measuringTape.tipPositionProperty": {
"phetioDocumentation": "Tip (end of measuring tape) position",
"phetioDocumentation": "Tip (end of measuring tape) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -10324,7 +10324,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<ReferenceIO>"
},
"projectileMotion.introScreen.model.tracer.dataPointProperty": {
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed.",
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed. See DataPointIO for more information about the data.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -10350,7 +10350,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.introScreen.model.tracer.positionProperty": {
"phetioDocumentation": "The position of the tracer in model coordinates",
"phetioDocumentation": "The position of the tracer in model coordinates, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -15004,7 +15004,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.labScreen.model.measuringTape.basePositionProperty": {
"phetioDocumentation": "Base (start of tape from the container) position",
"phetioDocumentation": "Base (start of tape from the container) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -15030,7 +15030,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.labScreen.model.measuringTape.tipPositionProperty": {
"phetioDocumentation": "Tip (end of measuring tape) position",
"phetioDocumentation": "Tip (end of measuring tape) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -15277,7 +15277,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<ReferenceIO>"
},
"projectileMotion.labScreen.model.tracer.dataPointProperty": {
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed.",
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed. See DataPointIO for more information about the data.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -15303,7 +15303,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.labScreen.model.tracer.positionProperty": {
"phetioDocumentation": "The position of the tracer in model coordinates",
"phetioDocumentation": "The position of the tracer in model coordinates, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -37065,7 +37065,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.vectorsScreen.model.measuringTape.basePositionProperty": {
"phetioDocumentation": "Base (start of tape from the container) position",
"phetioDocumentation": "Base (start of tape from the container) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -37091,7 +37091,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.vectorsScreen.model.measuringTape.tipPositionProperty": {
"phetioDocumentation": "Tip (end of measuring tape) position",
"phetioDocumentation": "Tip (end of measuring tape) position, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down Expand Up @@ -37208,7 +37208,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<ReferenceIO>"
},
"projectileMotion.vectorsScreen.model.tracer.dataPointProperty": {
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed.",
"phetioDocumentation": "Data point that the tracer is displaying information about, or null if no info displayed. See DataPointIO for more information about the data.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand All @@ -37234,7 +37234,7 @@ window.phet.phetio.phetioElementsBaseline = assert &&
"phetioTypeName": "PropertyIO<BooleanIO>"
},
"projectileMotion.vectorsScreen.model.tracer.positionProperty": {
"phetioDocumentation": "The position of the tracer in model coordinates",
"phetioDocumentation": "The position of the tracer in model coordinates, in meters.",
"phetioDynamicElement": false,
"phetioEventType": "MODEL",
"phetioFeatured": false,
Expand Down
2 changes: 1 addition & 1 deletion js/phet-io/projectile-motion-phet-io-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ window.phet.phetio.phetioTypes = assert &&
"typeName": "ComboBoxIO"
},
"DataPointIO": {
"documentation": "A single data point on a projectile's trajectory, with the following data:<br><ul><li>time: The time of the data point</li><li>position: the position of the point in model coordinates</li><li>airDensity: the air density when the point was collected</li><li>velocity: the velocity of the projectile at the time when the point was collected</li><li>acceleration: the acceleration of the projectile at the time when the point was collected</li><li>dragForce: the acceleration of the projectile at the time when the point was collected</li><li>forceGravity: the acceleration of the projectile at the time when the point was collected</li><li>apex: if this data point was at the apex of a trajectory</li><li>reachedGround: if this data point was collected when the projectile was on the ground</li></ul>",
"documentation": "A single data point on a projectile's trajectory, with the following data:<br><ul><li>time (seconds): The time of the data point</li><li>position (meters): the position of the point in model coordinates</li><li>airDensity (kg/cu m): the air density when the point was collected</li><li>velocity (m/s): the velocity of the projectile at the time when the point was collected</li><li>acceleration (m/s^2): the acceleration of the projectile at the time when the point was collected</li><li>dragForce (newtons): the acceleration of the projectile at the time when the point was collected</li><li>forceGravity (newtons): the acceleration of the projectile at the time when the point was collected</li><li>apex (boolean): if this data point was at the apex of a trajectory</li><li>reachedGround (boolean): if this data point was collected when the projectile was on the ground</li></ul>",
"events": [],
"methodOrder": [],
"methods": {},
Expand Down

0 comments on commit 3ee43bd

Please sign in to comment.