main.java
Java w/ Gradle
COMP 370 Group Activity 4
Collaborators: Trevor Hafner, Faisel Ali, Angel Tesillos
In flight simulation, one of the things pilots have to do is calculate the deviation from the international standard temperature at a particular altitude. In order to figure out the proper calculation, we used this site, cited here, to get the two formulas:
- Formula of the ISA temperature at certain altitude:
- 15 – [(height/1000) x 2] °C
- Alternatively, calculator.academy uses a very similar formula that is not rounded up. The site also includes additional information regarding the usage of the formula.
- Formula of the ISA temperature deviation at certain altitude:
- Actual temperature – ISA temperature
The example from calculator.academy (as cited above) demonstrates this very well:
- AT = -30, Alt = 26000
- ST = 15 - (1.98 * (26000/1000))
- = 15 - (1.98 * 26)
- = 15 - 51.48
- = -36.48 degrees Celsius
- ISAT = ST - AT
- = -36.48 - (-30)
- = -6.48
Both of these formulas are used in calculating vital components in air-temperature while at an altitude. We are given two variables:
- AT for 'actual temperature'. Calculated by using the aircraft's thermometer. This is in degrees Celsius.
- Alt for 'altitude'. This is calculated by using the aircraft's elevation readings.
With these variables we can calculate:
- ST for 'standard temperature'. Calculated by dividing the current altitude by 1000, then multiplying that by (2 or 1.98), ultimately subtracting 15 from that.
- ISAT for 'ISA temperature difference'. Calculated by subtracting the AT from the ST.
- Pick your favorite programming language and build tool.
- Java
- Gradle (doc linked)
- At least ONE unit test.
- Set up a public GitHub repository for this activity.
- Add unit tests and coverage report generation to the build configuration. The latter might require a language-specific plugin for your build tool, e.g., JaCoCo for Gradle or sbt-scoverage for sbt.
- Add JaCoCo
- Set up a GitHub action for automatically running the tests and generating the coverage report upon commits to the repo.
- Add at least two status badges for in-process metrics and two more for complexity metrics; most of these would be based on hosted services.
- Make several commits that trigger automated builds. Ideally, start with the unit test(s) failing and then fix them so we can see the build status changing from fail to pass.
- (List of commits)
- This example is much more complex than required but illustrates the other requirements of this activity.
- Extra credit for additional actions and metrics/badges.
- Make a barebones file.
- Add gradle.
- Add a badge.
- Figure out how to use gradle.
- Learn and add JaCoCo.
- Firgure out badges.
- Add a working badge.
- Make unit tests.