Software Requirements Specification for Projectile
Samuel J. Crawford, Brooks MacLachlan, and W. Spencer Smith
Table of Contents
An outline of all sections included in this SRS is recorded here for easy reference.
- Table of Contents
- Reference Material
- Introduction
- General System Description
- Specific System Description
- Requirements
- Traceability Matrices and Graphs
- Values of Auxiliary Constants
- References
Reference Material
This section records information for easy reference.
Table of Units
The unit system used throughout is SI (Système International d’Unités). In addition to the basic units, several derived units are also used. For each unit, the Table of Units lists the symbol, a description, and the SI name.
Symbol | Description | SI Name |
---|---|---|
\({\text{m}}\) | length | metre |
\({\text{rad}}\) | angle | radian |
\({\text{s}}\) | time | second |
Table of Units
Table of Symbols
The symbols used in this document are summarized in the Table of Symbols along with their units. Throughout the document, symbols in bold will represent vectors, and scalars otherwise. The symbols are listed in alphabetical order. For vector quantities, the units shown are for each component of the vector.
Symbol | Description | Units |
---|---|---|
\(a\) | Scalar acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({a^{c}}\) | Constant acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({a_{\text{x}}}\) | \(x\)-component of acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({{a_{\text{x}}}^{\text{c}}}\) | \(x\)-component of constant acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({a_{\text{y}}}\) | \(y\)-component of acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({{a_{\text{y}}}^{\text{c}}}\) | \(y\)-component of constant acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\(\boldsymbol{a}\text{(}t\text{)}\) | Acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({\boldsymbol{a}^{\text{c}}}\) | Constant acceleration vector | \(\frac{\text{m}}{\text{s}^{2}}\) |
\({d_{\text{offset}}}\) | Distance between the target position and the landing position | \({\text{m}}\) |
\(g\) | Magnitude of gravitational acceleration | \(\frac{\text{m}}{\text{s}^{2}}\) |
\(p\) | Scalar position | \({\text{m}}\) |
\(p\text{(}t\text{)}\) | 1D position | \({\text{m}}\) |
\({p^{\text{i}}}\) | Initial position | \({\text{m}}\) |
\({p_{\text{land}}}\) | Landing position | \({\text{m}}\) |
\({p_{\text{target}}}\) | Target position | \({\text{m}}\) |
\({p_{\text{x}}}\) | \(x\)-component of position | \({\text{m}}\) |
\({{p_{\text{x}}}^{\text{i}}}\) | \(x\)-component of initial position | \({\text{m}}\) |
\({p_{\text{y}}}\) | \(y\)-component of position | \({\text{m}}\) |
\({{p_{\text{y}}}^{\text{i}}}\) | \(y\)-component of initial position | \({\text{m}}\) |
\(\boldsymbol{p}\text{(}t\text{)}\) | Position | \({\text{m}}\) |
\(s\) | Output message as a string | – |
\(t\) | Time | \({\text{s}}\) |
\({t_{\text{flight}}}\) | Flight duration | \({\text{s}}\) |
\(v\) | Speed | \(\frac{\text{m}}{\text{s}}\) |
\(v\text{(}t\text{)}\) | 1D speed | \(\frac{\text{m}}{\text{s}}\) |
\({v^{\text{i}}}\) | Initial speed | \(\frac{\text{m}}{\text{s}}\) |
\({v_{\text{launch}}}\) | Launch speed | \(\frac{\text{m}}{\text{s}}\) |
\({v_{\text{x}}}\) | \(x\)-component of velocity | \(\frac{\text{m}}{\text{s}}\) |
\({{v_{\text{x}}}^{\text{i}}}\) | \(x\)-component of initial velocity | \(\frac{\text{m}}{\text{s}}\) |
\({v_{\text{y}}}\) | \(y\)-component of velocity | \(\frac{\text{m}}{\text{s}}\) |
\({{v_{\text{y}}}^{\text{i}}}\) | \(y\)-component of initial velocity | \(\frac{\text{m}}{\text{s}}\) |
\(\boldsymbol{v}\text{(}t\text{)}\) | Velocity | \(\frac{\text{m}}{\text{s}}\) |
\({\boldsymbol{v}^{\text{i}}}\) | Initial velocity | \(\frac{\text{m}}{\text{s}}\) |
\(ε\) | Hit tolerance | – |
\(θ\) | Launch angle | \({\text{rad}}\) |
\(π\) | Ratio of circumference to diameter for any circle | – |
Table of Symbols
Abbreviations and Acronyms
Abbreviation | Full Form |
---|---|
1D | One-Dimensional |
2D | Two-Dimensional |
A | Assumption |
DD | Data Definition |
GD | General Definition |
GS | Goal Statement |
IM | Instance Model |
PS | Physical System Description |
R | Requirement |
RefBy | Referenced by |
Refname | Reference Name |
SRS | Software Requirements Specification |
TM | Theoretical Model |
Uncert. | Typical Uncertainty |
Abbreviations and Acronyms
Introduction
Projectile motion is a common problem in physics. Therefore, it is useful to have a program to solve and model these types of problems. Common examples of projectile motion include ballistics problems (missiles, bullets, etc.) and the flight of balls in various sports (baseball, golf, football, etc.). The document describes the program called Projectile , which is based on the original, manually created version of Projectile.
The following section provides an overview of the Software Requirements Specification (SRS) for Projectile. This section explains the purpose of this document, the scope of the requirements, the characteristics of the intended reader, and the organization of the document.
Purpose of Document
The primary purpose of this document is to record the requirements of Projectile. Goals, assumptions, theoretical models, definitions, and other model derivation information are specified, allowing the reader to fully understand and verify the purpose and scientific basis of Projectile. With the exception of system constraints, this SRS will remain abstract, describing what problem is being solved, but not how to solve it.
This document will be used as a starting point for subsequent development phases, including writing the design specification and the software verification and validation plan. The design document will show how the requirements are to be realized, including decisions on the numerical algorithms and programming environment. The verification and validation plan will show the steps that will be used to increase confidence in the software documentation and the implementation. Although the SRS fits in a series of documents that follow the so-called waterfall model, the actual development process is not constrained in any way. Even when the waterfall model is not followed, as Parnas and Clements point out parnasClements1986, the most logical way to present the documentation is still to “fake” a rational design process.
Scope of Requirements
The scope of the requirements includes the analysis of a two-dimensional (2D) projectile motion problem with constant acceleration.
Characteristics of Intended Reader
Reviewers of this documentation should have an understanding of undergraduate level 1 physics and undergraduate level 1 calculus. The users of Projectile can have a lower level of expertise, as explained in Sec:User Characteristics.
Organization of Document
The organization of this document follows the template for an SRS for scientific computing software proposed by koothoor2013, smithLai2005, smithEtAl2007, and smithKoothoor2016. The presentation follows the standard pattern of presenting goals, theories, definitions, and assumptions. For readers that would like a more bottom up approach, they can start reading the instance models and trace back to find any additional information they require.
The goal statements are refined to the theoretical models and the theoretical models to the instance models.
General System Description
This section provides general information about the system. It identifies the interfaces between the system and its environment, describes the user characteristics, and lists the system constraints.
System Context
Fig:sysCtxDiag shows the system context. A circle represents an entity external to the software, the user in this case. A rectangle represents the software system itself (Projectile). Arrows are used to show the data flow between the system and its environment.
Figure: System Context
The interaction between the product and the user is through an application programming interface. The responsibilities of the user and the system are as follows:
- User Responsibilities
- Provide initial conditions of the physical state of the motion and the input data related to the Projectile, ensuring no errors in the data entry.
- Ensure that consistent units are used for input variables.
- Ensure required software assumptions are appropriate for any particular problem input to the software.
- Projectile Responsibilities
- Detect data type mismatch, such as a string of characters input instead of a floating point number.
- Determine if the inputs satisfy the required physical and software constraints.
- Calculate the required outputs.
User Characteristics
The end user of Projectile should have an understanding of high school physics and high school calculus.
System Constraints
There are no system constraints.
Specific System Description
This section first presents the problem description, which gives a high-level view of the problem to be solved. This is followed by the solution characteristics specification, which presents the assumptions, theories, and definitions that are used.
Problem Description
A system is needed to predict whether a launched projectile hits its target.
Terminology and Definitions
This subsection provides a list of terms that are used in the subsequent sections and their meaning, with the purpose of reducing ambiguity and making it easier to correctly understand the requirements.
- Launcher: Where the projectile is launched from and the device that does the launching.
- Projectile: The object to be launched at the target.
- Target: Where the projectile should be launched to.
- Gravity: The force that attracts one physical body with mass to another.
- Cartesian coordinate system: A coordinate system that specifies each point uniquely in a plane by a set of numerical coordinates, which are the signed distances to the point from two fixed perpendicular oriented lines, measured in the same unit of length (from cartesianWiki).
- Rectilinear: Occurring in one dimension.
Physical System Description
The physical system of Projectile, as shown in Fig:Launch, includes the following elements:
PS1: The launcher.
PS2: The projectile (with initial velocity \({\boldsymbol{v}^{\text{i}}}\) and launch angle \(θ\)).
PS3: The target.
Figure: The physical system
Goal Statements
Given the initial velocity vector of the projectile and the geometric layout of the launcher and target, the goal statement is:
targetHit: Determine if the projectile hits the target.
Solution Characteristics Specification
The instance models that govern Projectile are presented in the Instance Model Section. The information to understand the meaning of the instance models and their derivation is also presented, so that the instance models can be verified.
Assumptions
This section simplifies the original problem and helps in developing the theoretical models by filling in the missing information for the physical system. The assumptions refine the scope by providing more detail.
twoDMotion: The projectile motion is two-dimensional (2D). (RefBy: GD:velVec and GD:posVec.)
cartSyst: A Cartesian coordinate system is used (from A:neglectCurv). (RefBy: GD:velVec and GD:posVec.)
yAxisGravity: The direction of the \(y\)-axis is directed opposite to gravity. (RefBy: IM:calOfLandingDist, IM:calOfLandingTime, and A:accelYGravity.)
launchOrigin: The launcher is coincident with the origin. (RefBy: IM:calOfLandingDist and IM:calOfLandingTime.)
targetXAxis: The target lies on the \(x\)-axis (from A:neglectCurv). (RefBy: IM:calOfLandingTime.)
posXDirection: The positive \(x\)-direction is from the launcher to the target. (RefBy: IM:offsetIM, IM:messageIM, IM:calOfLandingDist, and IM:calOfLandingTime.)
constAccel: The acceleration is constant (from A:accelXZero, A:accelYGravity, A:neglectDrag, and A:freeFlight). (RefBy: GD:velVec and GD:posVec.)
accelXZero: The acceleration in the \(x\)-direction is zero. (RefBy: IM:calOfLandingDist and A:constAccel.)
accelYGravity: The acceleration in the \(y\)-direction is the acceleration due to gravity (from A:yAxisGravity). (RefBy: IM:calOfLandingTime and A:constAccel.)
neglectDrag: Air drag is neglected. (RefBy: A:constAccel.)
pointMass: The size and shape of the projectile are negligible, so that it can be modelled as a point mass. (RefBy: GD:rectVel and GD:rectPos.)
freeFlight: The flight is free; there are no collisions during the trajectory of the projectile. (RefBy: A:constAccel.)
neglectCurv: The distance is small enough that the curvature of the celestial body can be neglected. (RefBy: A:targetXAxis and A:cartSyst.)
timeStartZero: Time starts at zero. (RefBy: GD:velVec, GD:rectVel, GD:rectPos, GD:posVec, and IM:calOfLandingTime.)
gravAccelValue: The acceleration due to gravity is assumed to have the value provided in the section for Values of Auxiliary Constants. (RefBy: IM:calOfLandingDist and IM:calOfLandingTime.)
Theoretical Models
This section focuses on the general equations and laws that Projectile is based on.
Refname | TM:acceleration |
---|---|
Label | Acceleration |
Equation | \[\boldsymbol{a}\text{(}t\text{)}=\frac{\,d\boldsymbol{v}\text{(}t\text{)}}{\,dt}\] |
Description |
|
Source | accelerationWiki |
RefBy | GD:rectVel |
Refname | TM:velocity |
---|---|
Label | Velocity |
Equation | \[\boldsymbol{v}\text{(}t\text{)}=\frac{\,d\boldsymbol{p}\text{(}t\text{)}}{\,dt}\] |
Description |
|
Source | velocityWiki |
RefBy | GD:rectPos |
General Definitions
This section collects the laws and equations that will be used to build the instance models.
Refname | GD:rectVel |
---|---|
Label | Rectilinear (1D) velocity as a function of time for constant acceleration |
Units | \(\frac{\text{m}}{\text{s}}\) |
Equation | \[v\text{(}t\text{)}={v^{\text{i}}}+{a^{c}}\,t\] |
Description |
|
Source | hibbeler2004 (pg. 8) |
RefBy | GD:velVec and GD:rectPos |
Detailed derivation of rectilinear velocity:
Assume we have rectilinear motion of a particle (of negligible size and shape, from A:pointMass); that is, motion in a straight line. The velocity is \(v\) and the acceleration is \(a\). The motion in TM:acceleration is now one-dimensional with a constant acceleration, represented by \({a^{c}}\). The initial velocity (at \(t=0\), from A:timeStartZero) is represented by \({v^{\text{i}}}\). From TM:acceleration in 1D, and using the above symbols we have:
\[{a^{c}}=\frac{\,dv}{\,dt}\]
Rearranging and integrating, we have:
\[\int_{{v^{\text{i}}}}^{v}{1}\,dv=\int_{0}^{t}{{a^{c}}}\,dt\]
Performing the integration, we have the required equation:
\[v\text{(}t\text{)}={v^{\text{i}}}+{a^{c}}\,t\]
Refname | GD:rectPos |
---|---|
Label | Rectilinear (1D) position as a function of time for constant acceleration |
Units | \({\text{m}}\) |
Equation | \[p\text{(}t\text{)}={p^{\text{i}}}+{v^{\text{i}}}\,t+\frac{{a^{c}}\,t^{2}}{2}\] |
Description |
|
Source | hibbeler2004 (pg. 8) |
RefBy | GD:posVec |
Detailed derivation of rectilinear position:
Assume we have rectilinear motion of a particle (of negligible size and shape, from A:pointMass); that is, motion in a straight line. The position is \(p\) and the velocity is \(v\). The motion in TM:velocity is now one-dimensional. The initial position (at \(t=0\), from A:timeStartZero) is represented by \({p^{\text{i}}}\). From TM:velocity in 1D, and using the above symbols we have:
\[v=\frac{\,dp}{\,dt}\]
Rearranging and integrating, we have:
\[\int_{{p^{\text{i}}}}^{p}{1}\,dp=\int_{0}^{t}{v}\,dt\]
From GD:rectVel, we can replace \(v\):
\[\int_{{p^{\text{i}}}}^{p}{1}\,dp=\int_{0}^{t}{{v^{\text{i}}}+{a^{c}}\,t}\,dt\]
Performing the integration, we have the required equation:
\[p\text{(}t\text{)}={p^{\text{i}}}+{v^{\text{i}}}\,t+\frac{{a^{c}}\,t^{2}}{2}\]
Refname | GD:velVec |
---|---|
Label | Velocity vector as a function of time for 2D motion under constant acceleration |
Units | \(\frac{\text{m}}{\text{s}}\) |
Equation | \[\boldsymbol{v}\text{(}t\text{)}=\begin{bmatrix}{{v_{\text{x}}}^{\text{i}}}+{{a_{\text{x}}}^{\text{c}}}\,t\\{{v_{\text{y}}}^{\text{i}}}+{{a_{\text{y}}}^{\text{c}}}\,t\end{bmatrix}\] |
Description |
|
Source | – |
RefBy |
Detailed derivation of velocity vector:
For a two-dimensional Cartesian coordinate system (A:twoDMotion and A:cartSyst), we can represent the velocity vector as \(\boldsymbol{v}\text{(}t\text{)}=\begin{bmatrix}{v_{\text{x}}}\\{v_{\text{y}}}\end{bmatrix}\) and the acceleration vector as \(\boldsymbol{a}\text{(}t\text{)}=\begin{bmatrix}{a_{\text{x}}}\\{a_{\text{y}}}\end{bmatrix}\). The acceleration is assumed to be constant (A:constAccel) and the constant acceleration vector is represented as \({\boldsymbol{a}^{\text{c}}}=\begin{bmatrix}{{a_{\text{x}}}^{\text{c}}}\\{{a_{\text{y}}}^{\text{c}}}\end{bmatrix}\). The initial velocity (at \(t=0\), from A:timeStartZero) is represented by \({\boldsymbol{v}^{\text{i}}}=\begin{bmatrix}{{v_{\text{x}}}^{\text{i}}}\\{{v_{\text{y}}}^{\text{i}}}\end{bmatrix}\). Since we have a Cartesian coordinate system, GD:rectVel can be applied to each coordinate of the velocity vector to yield the required equation:
\[\boldsymbol{v}\text{(}t\text{)}=\begin{bmatrix}{{v_{\text{x}}}^{\text{i}}}+{{a_{\text{x}}}^{\text{c}}}\,t\\{{v_{\text{y}}}^{\text{i}}}+{{a_{\text{y}}}^{\text{c}}}\,t\end{bmatrix}\]
Refname | GD:posVec |
---|---|
Label | Position vector as a function of time for 2D motion under constant acceleration |
Units | \({\text{m}}\) |
Equation | \[\boldsymbol{p}\text{(}t\text{)}=\begin{bmatrix}{{p_{\text{x}}}^{\text{i}}}+{{v_{\text{x}}}^{\text{i}}}\,t+\frac{{{a_{\text{x}}}^{\text{c}}}\,t^{2}}{2}\\{{p_{\text{y}}}^{\text{i}}}+{{v_{\text{y}}}^{\text{i}}}\,t+\frac{{{a_{\text{y}}}^{\text{c}}}\,t^{2}}{2}\end{bmatrix}\] |
Description |
|
Source | – |
RefBy | IM:calOfLandingDist and IM:calOfLandingTime |
Detailed derivation of position vector:
For a two-dimensional Cartesian coordinate system (A:twoDMotion and A:cartSyst), we can represent the position vector as \(\boldsymbol{p}\text{(}t\text{)}=\begin{bmatrix}{p_{\text{x}}}\\{p_{\text{y}}}\end{bmatrix}\), the velocity vector as \(\boldsymbol{v}\text{(}t\text{)}=\begin{bmatrix}{v_{\text{x}}}\\{v_{\text{y}}}\end{bmatrix}\), and the acceleration vector as \(\boldsymbol{a}\text{(}t\text{)}=\begin{bmatrix}{a_{\text{x}}}\\{a_{\text{y}}}\end{bmatrix}\). The acceleration is assumed to be constant (A:constAccel) and the constant acceleration vector is represented as \({\boldsymbol{a}^{\text{c}}}=\begin{bmatrix}{{a_{\text{x}}}^{\text{c}}}\\{{a_{\text{y}}}^{\text{c}}}\end{bmatrix}\). The initial velocity (at \(t=0\), from A:timeStartZero) is represented by \({\boldsymbol{v}^{\text{i}}}=\begin{bmatrix}{{v_{\text{x}}}^{\text{i}}}\\{{v_{\text{y}}}^{\text{i}}}\end{bmatrix}\). Since we have a Cartesian coordinate system, GD:rectPos can be applied to each coordinate of the position vector to yield the required equation:
\[\boldsymbol{p}\text{(}t\text{)}=\begin{bmatrix}{{p_{\text{x}}}^{\text{i}}}+{{v_{\text{x}}}^{\text{i}}}\,t+\frac{{{a_{\text{x}}}^{\text{c}}}\,t^{2}}{2}\\{{p_{\text{y}}}^{\text{i}}}+{{v_{\text{y}}}^{\text{i}}}\,t+\frac{{{a_{\text{y}}}^{\text{c}}}\,t^{2}}{2}\end{bmatrix}\]
Data Definitions
This section collects and defines all the data needed to build the instance models.
Refname | DD:vecMag |
---|---|
Label | Speed |
Symbol | \(v\) |
Units | \(\frac{\text{m}}{\text{s}}\) |
Equation | \[v=|\boldsymbol{v}\text{(}t\text{)}|\] |
Description |
|
Notes |
|
Source | – |
RefBy | DD:speedIY and DD:speedIX |
Refname | DD:speedIX |
---|---|
Label | \(x\)-component of initial velocity |
Symbol | \({{v_{\text{x}}}^{\text{i}}}\) |
Units | \(\frac{\text{m}}{\text{s}}\) |
Equation | \[{{v_{\text{x}}}^{\text{i}}}={v^{\text{i}}}\,\cos\left(θ\right)\] |
Description |
|
Notes |
|
Source | – |
RefBy | IM:calOfLandingDist |
Refname | DD:speedIY |
---|---|
Label | \(y\)-component of initial velocity |
Symbol | \({{v_{\text{y}}}^{\text{i}}}\) |
Units | \(\frac{\text{m}}{\text{s}}\) |
Equation | \[{{v_{\text{y}}}^{\text{i}}}={v^{\text{i}}}\,\sin\left(θ\right)\] |
Description |
|
Notes |
|
Source | – |
RefBy | IM:calOfLandingTime |
Instance Models
This section transforms the problem defined in the problem description into one which is expressed in mathematical terms. It uses concrete symbols defined in the data definitions to replace the abstract symbols in the models identified in theoretical models and general definitions.
Refname | IM:calOfLandingTime |
---|---|
Label | Calculation of landing time |
Input | \({v_{\text{launch}}}\), \(θ\) |
Output | \({t_{\text{flight}}}\) |
Input Constraints | \[{v_{\text{launch}}}\gt{}0\]\[0\lt{}θ\lt{}\frac{π}{2}\] |
Output Constraints | \[{t_{\text{flight}}}\gt{}0\] |
Equation | \[{t_{\text{flight}}}=\frac{2\,{v_{\text{launch}}}\,\sin\left(θ\right)}{g}\] |
Description |
|
Notes |
|
Source | – |
RefBy | IM:calOfLandingDist, FR:Output-Values, and FR:Calculate-Values |
Detailed derivation of flight duration:
We know that \({{p_{\text{y}}}^{\text{i}}}=0\) (A:launchOrigin) and \({{a_{\text{y}}}^{\text{c}}}=-g\) (A:accelYGravity). Substituting these values into the y-direction of GD:posVec gives us:
\[{p_{\text{y}}}={{v_{\text{y}}}^{\text{i}}}\,t-\frac{g\,t^{2}}{2}\]
To find the time that the projectile lands, we want to find the \(t\) value (\({t_{\text{flight}}}\)) where \({p_{\text{y}}}=0\) (since the target is on the \(x\)-axis from A:targetXAxis). From the equation above we get:
\[{{v_{\text{y}}}^{\text{i}}}\,{t_{\text{flight}}}-\frac{g\,{t_{\text{flight}}}^{2}}{2}=0\]
Dividing by \({t_{\text{flight}}}\) (with the constraint \({t_{\text{flight}}}\gt{}0\)) gives us:
\[{{v_{\text{y}}}^{\text{i}}}-\frac{g\,{t_{\text{flight}}}}{2}=0\]
Solving for \({t_{\text{flight}}}\) gives us:
\[{t_{\text{flight}}}=\frac{2\,{{v_{\text{y}}}^{\text{i}}}}{g}\]
From DD:speedIY (with \({v^{\text{i}}}={v_{\text{launch}}}\)) we can replace \({{v_{\text{y}}}^{\text{i}}}\):
\[{t_{\text{flight}}}=\frac{2\,{v_{\text{launch}}}\,\sin\left(θ\right)}{g}\]
Refname | IM:calOfLandingDist |
---|---|
Label | Calculation of landing position |
Input | \({v_{\text{launch}}}\), \(θ\) |
Output | \({p_{\text{land}}}\) |
Input Constraints | \[{v_{\text{launch}}}\gt{}0\]\[0\lt{}θ\lt{}\frac{π}{2}\] |
Output Constraints | \[{p_{\text{land}}}\gt{}0\] |
Equation | \[{p_{\text{land}}}=\frac{2\,{v_{\text{launch}}}^{2}\,\sin\left(θ\right)\,\cos\left(θ\right)}{g}\] |
Description |
|
Notes |
|
Source | – |
RefBy | IM:offsetIM and FR:Calculate-Values |
Detailed derivation of landing position:
We know that \({{p_{\text{x}}}^{\text{i}}}=0\) (A:launchOrigin) and \({{a_{\text{x}}}^{\text{c}}}=0\) (A:accelXZero). Substituting these values into the x-direction of GD:posVec gives us:
\[{p_{\text{x}}}={{v_{\text{x}}}^{\text{i}}}\,t\]
To find the landing position, we want to find the \({p_{\text{x}}}\) value (\({p_{\text{land}}}\)) at flight duration (from IM:calOfLandingTime):
\[{p_{\text{land}}}=\frac{{{v_{\text{x}}}^{\text{i}}}\cdot{}2\,{v_{\text{launch}}}\,\sin\left(θ\right)}{g}\]
From DD:speedIX (with \({v^{\text{i}}}={v_{\text{launch}}}\)) we can replace \({{v_{\text{x}}}^{\text{i}}}\):
\[{p_{\text{land}}}=\frac{{v_{\text{launch}}}\,\cos\left(θ\right)\cdot{}2\,{v_{\text{launch}}}\,\sin\left(θ\right)}{g}\]
Rearranging this gives us the required equation:
\[{p_{\text{land}}}=\frac{2\,{v_{\text{launch}}}^{2}\,\sin\left(θ\right)\,\cos\left(θ\right)}{g}\]
Refname | IM:offsetIM |
---|---|
Label | Offset |
Input | \({p_{\text{land}}}\), \({p_{\text{target}}}\) |
Output | \({d_{\text{offset}}}\) |
Input Constraints | \[{p_{\text{land}}}\gt{}0\]\[{p_{\text{target}}}\gt{}0\] |
Output Constraints | |
Equation | \[{d_{\text{offset}}}={p_{\text{land}}}-{p_{\text{target}}}\] |
Description |
|
Notes |
|
Source | – |
RefBy | IM:messageIM, FR:Output-Values, and FR:Calculate-Values |
Refname | IM:messageIM |
---|---|
Label | Output message |
Input | \({d_{\text{offset}}}\), \({p_{\text{target}}}\) |
Output | \(s\) |
Input Constraints | \[{d_{\text{offset}}}\gt{}-{p_{\text{target}}}\]\[{p_{\text{target}}}\gt{}0\] |
Output Constraints | |
Equation | \[s=\begin{cases}\text{\(``\)The target was hit.‘’}, & |\frac{{d_{\text{offset}}}}{{p_{\text{target}}}}|\lt{}ε\\\text{\(``\)The projectile fell short.‘’}, & {d_{\text{offset}}}\lt{}0\\\text{\(``\)The projectile went long.‘’}, & {d_{\text{offset}}}\gt{}0\end{cases}\] |
Description |
|
Notes |
|
Source | – |
RefBy | FR:Output-Values and FR:Calculate-Values |
Data Constraints
The Data Constraints Table shows the data constraints on the input variables. The column for physical constraints gives the physical limitations on the range of values that can be taken by the variable. The uncertainty column provides an estimate of the confidence with which the physical quantities can be measured. This information would be part of the input if one were performing an uncertainty quantification exercise. The constraints are conservative to give the user of the model the flexibility to experiment with unusual situations. The column of typical values is intended to provide a feel for a common scenario.
Var | Physical Constraints | Typical Value | Uncert. |
---|---|---|---|
\({p_{\text{target}}}\) | \({p_{\text{target}}}\gt{}0\) | \(1000\) \({\text{m}}\) | 10\(\%\) |
\({v_{\text{launch}}}\) | \({v_{\text{launch}}}\gt{}0\) | \(100\) \(\frac{\text{m}}{\text{s}}\) | 10\(\%\) |
\(θ\) | \(0\lt{}θ\lt{}\frac{π}{2}\) | \(\frac{π}{4}\) \({\text{rad}}\) | 10\(\%\) |
Input Data Constraints
Properties of a Correct Solution
The Data Constraints Table shows the data constraints on the output variables. The column for physical constraints gives the physical limitations on the range of values that can be taken by the variable.
Var | Physical Constraints |
---|---|
\({p_{\text{land}}}\) | \({p_{\text{land}}}\gt{}0\) |
\({d_{\text{offset}}}\) | \({d_{\text{offset}}}\gt{}-{p_{\text{target}}}\) |
\({t_{\text{flight}}}\) | \({t_{\text{flight}}}\gt{}0\) |
Output Data Constraints
Requirements
This section provides the functional requirements, the tasks and behaviours that the software is expected to complete, and the non-functional requirements, the qualities that the software is expected to exhibit.
Functional Requirements
This section provides the functional requirements, the tasks and behaviours that the software is expected to complete.
Input-Values: Input the values from Tab:ReqInputs.
Verify-Input-Values: Check the entered input values to ensure that they do not exceed the data constraints. If any of the input values are out of bounds, an error message is displayed and the calculations stop.
Calculate-Values: Calculate the following values: \({t_{\text{flight}}}\) (from IM:calOfLandingTime), \({p_{\text{land}}}\) (from IM:calOfLandingDist), \({d_{\text{offset}}}\) (from IM:offsetIM), and \(s\) (from IM:messageIM).
Output-Values: Output \({t_{\text{flight}}}\) (from IM:calOfLandingTime), \(s\) (from IM:messageIM), and \({d_{\text{offset}}}\) (from IM:offsetIM).
Symbol | Description | Units |
---|---|---|
\({p_{\text{target}}}\) | Target position | \({\text{m}}\) |
\({v_{\text{launch}}}\) | Launch speed | \(\frac{\text{m}}{\text{s}}\) |
\(θ\) | Launch angle | \({\text{rad}}\) |
Required Inputs following FR:Input-Values
Non-Functional Requirements
This section provides the non-functional requirements, the qualities that the software is expected to exhibit.
Correctness: The outputs of the code have the properties of a correct solution.
Verifiability: The code is tested with complete verification and validation plan.
Understandability: The code is modularized with complete module guide and module interface specification.
Reusability: The code is modularized.
Maintainability: If a likely change is made to the finished software, it will take at most 10\(\%\) of the original development time, assuming the same development resources are available.
Portability: The code shall be portable to multiple environments, particularly Windows, Mac OSX, and Linux.
Traceability Matrices and Graphs
The purpose of the traceability matrices is to provide easy references on what has to be additionally modified if a certain component is changed. Every time a component is changed, the items in the column of that component that are marked with an “X” should be modified as well. Tab:TraceMatAvsA shows the dependencies of the assumptions on each other. Tab:TraceMatAvsAll shows the dependencies of the data definitions, theoretical models, general definitions, instance models, requirements, likely changes, and unlikely changes on the assumptions. Tab:TraceMatRefvsRef shows the dependencies of the data definitions, theoretical models, general definitions, and instance models on each other. Tab:TraceMatAllvsR shows the dependencies of the requirements and goal statements on the data definitions, theoretical models, general definitions, and instance models.
Traceability Matrix Showing the Connections Between Assumptions and Other Assumptions
Traceability Matrix Showing the Connections Between Assumptions and Other Items
Traceability Matrix Showing the Connections Between Items and Other Sections
Traceability Matrix Showing the Connections Between Requirements, Goal Statements and Other Items
The purpose of the traceability graphs is also to provide easy references on what has to be additionally modified if a certain component is changed. The arrows in the graphs represent dependencies. The component at the tail of an arrow is depended on by the component at the head of that arrow. Therefore, if a component is changed, the components that it points to should also be changed. Fig:TraceGraphAvsA shows the dependencies of assumptions on each other. Fig:TraceGraphAvsAll shows the dependencies of data definitions, theoretical models, general definitions, instance models, requirements, likely changes, and unlikely changes on the assumptions. Fig:TraceGraphRefvsRef shows the dependencies of data definitions, theoretical models, general definitions, and instance models on each other. Fig:TraceGraphAllvsR shows the dependencies of requirements and goal statements on the data definitions, theoretical models, general definitions, and instance models. Fig:TraceGraphAllvsAll shows the dependencies of dependencies of assumptions, models, definitions, requirements, goals, and changes with each other.
Figure: TraceGraphAvsA
Figure: TraceGraphAvsAll
Figure: TraceGraphRefvsRef
Figure: TraceGraphAllvsR
Figure: TraceGraphAllvsAll
For convenience, the following graphs can be found at the links below:
Values of Auxiliary Constants
This section contains the standard values that are used for calculations in Projectile.
Symbol | Description | Value | Unit |
---|---|---|---|
\(g\) | magnitude of gravitational acceleration | \(9.8\) | \(\frac{\text{m}}{\text{s}^{2}}\) |
\(ε\) | hit tolerance | \(2.0\%\) | – |
\(π\) | ratio of circumference to diameter for any circle | \(3.14159265\) | – |
Auxiliary Constants
References
[1]: Hibbeler, R. C. Engineering Mechanics: Dynamics. Pearson Prentice Hall, 2004. Print.
[2]: Koothoor, Nirmitha. A Document Driven Approach to Certifying Scientific Computing Software. McMaster University, Hamilton, ON, Canada: 2013. Print.
[3]: Parnas, David L. and Clements, P. C. “A rational design process: How and why to fake it.” IEEE Transactions on Software Engineering, vol. 12, no. 2, Washington, USA: February, 1986. pp. 251–257. Print.
[4]: Smith, W. Spencer and Koothoor, Nirmitha. “A Document-Driven Method for Certifying Scientific Computing Software for Use in Nuclear Safety Analysis.” Nuclear Engineering and Technology, vol. 48, no. 2, April, 2016. http://www.sciencedirect.com/science/article/pii/S1738573315002582. pp. 404–418.
[5]: Smith, W. Spencer and Lai, Lei. “A new requirements template for scientific computing.” Proceedings of the First International Workshop on Situational Requirements Engineering Processes - Methods, Techniques and Tools to Support Situation-Specific Requirements Engineering Processes, SREP’05. Edited by PJ Agerfalk, N. Kraiem, and J. Ralyte, Paris, France: 2005. pp. 107–121. In conjunction with 13th IEEE International Requirements Engineering Conference,
[6]: Smith, W. Spencer, Lai, Lei, and Khedri, Ridha. “Requirements Analysis for Engineering Computation: A Systematic Approach for Improving Software Reliability.” Reliable Computing, Special Issue on Reliable Engineering Computation, vol. 13, no. 1, February, 2007. https://doi.org/10.1007/s11155-006-9020-7. pp. 83–107.
[7]: Wikipedia Contributors. Acceleration. June, 2019. https://en.wikipedia.org/wiki/Acceleration.
[8]: Wikipedia Contributors. Cartesian coordinate system. June, 2019. https://en.wikipedia.org/wiki/Cartesian_coordinate_system.
[9]: Wikipedia Contributors. Velocity. June, 2019. https://en.wikipedia.org/wiki/Velocity.