Starting from:

$30

Assignment #1- Geostationary altitude for any planet

CSIT111/811
Assignment #1
Total Mark: 10

The purpose of this assignment is:
• Data types, variables, constants
• Expressions, Math methods, Executable statements
• Input/Output
• Comments
Read the assignment specification carefully, and make sure that you follow whatever directed in this assignment.
In every assignment that you will submit in this subject, you must put the following information in the header
of your assignment:
/*------------------------------------------------------
Name:
Student number:
Email address:
Subject Code: CSIT111/811
Assignment number: 1
-------------------------------------------------------*/
Make sure that you include this information in every assignment file, otherwise it will not be
marked
Objective
Design, debug and test a Java program that calculate the geostationary altitude for any
planet in our solar system.
Background
A geostationary orbit, also referred to as a geosynchronous equatorial orbit (GEO), is a
circular geosynchronous orbit 35,786 kilometers above Earth's equator and following the
direction of Earth's rotation. An object in such an orbit appears motionless in a fixed position
in the sky because it has an orbital period equal to the Earth's rotational period, i.e., one
sidereal day. One sidereal day is approximately 23 hours, 56 minutes, and 4 seconds, which
equals 86,164 seconds. The distance between the Earth and the object is called the
geostationary altitude, which is a constant for a planet regardless the weight of the object.
The derivation of geostationary altitude for Earth is as follows:
Derivation of geostationary altitude
For circular orbits around a body, the centripetal force required to maintain the orbit (Fc) is
equal to the gravitational force acting on the object (Fg), so
Fc = Fg
From Isaac Newton's Universal law of gravitation,
where Fg is the gravitational force acting between two objects, ME is the mass of the
Earth, 5.97 × 1024 kg, ms is the mass of the object, r is the distance between the centers of their
masses, and G is the gravitational constant, 6.67428 × 10−11 m3 kg−1 s−2.
From Newton's Second law of Motion, the centripetal force Fc is given by:
As Fc = Fg,
so that
Replacing v with the equation for the speed of an object moving around a circle produces:
where T is the orbital period (i.e. one sidereal day), and is equal to 86,164 s. This gives an
equation for r:
The product GME is known with much greater precision than either factor alone; it is known
as the geocentric gravitational constant μ = 398,600 km3 s−2. Hence
The resulting orbital radius is 42,158 kilometers. Subtracting the Earth's equatorial radius,
6,378 kilometers , gives the Earth’s geostationary altitude is equals 35,786 kilometers.
By the same method, we can estimate the geostationary altitude for any planet in our solar
system. For example, the gravitational constant GM (μ) for Mars has the value of
42,830 km3s−2, its equatorial radius is 3,389 km and the known rotational period (T) of Mars
is 1.026 Earth days (i.e., 88,642 seconds). Using these values, Mars' geostationary altitude is
equal to 17,039 kilometers.
CODING REQUIREMENTS
Write a Java program (“GeoAltitude.java”) with a single class and a single method (the
main() method) to calculate the geostationary altitude for any given planet.
• Your program shall be implemented using material covered in lectures 1-4.
• You can use the methods predefined in Math class.
• Your program shall be compliable by JDK SE 8
• Your program shall have only one class that contains only one method main().
• Your program shall use the printf() method to print the final output.
• Your program shall define symbolic constants for all values which have a physical
meaning and are currently fixed (but there is a chance that they may be changed in
future).
In this assignment you can presume that the user always inputs correct values (input
verification is not required). The program shall perform all calculations with double
precision. The geostationary altitude shall be displayed as a double value exact to one
decimal place.
An example of a test case is shown below (the user’s inputs are highly by the blue colour).
However, you shall test your program with other test cases before you submit it to make
sure it meets all design requirements.
Example of the program output:
- Geostationary Altitude Calculation -
Enter the planet parameters
Planet Name: Earth
Gravitational Constant (km3/s2): 398600
Rotational Period (s): 86164
Equatorial Radius (km): 6378
The geostationary altitude of Earth is 35786.1 km.
Submission:
Submit your single Java program to Moodle “Assignment 1”
- The submitted file name must be GeoAltitude.java. Files with other names will
not be tested and marked.
- Submit your assignment before the due date. You can freely update your submission
before the due date.
- Submission via email is NOT acceptable.
- Enquiries about the marks can only be made within a maximum of 1 week after the
assignment results are published. After 1 week the marks cannot be changed.
Mark deductions: compilation errors, incorrect result, program is not up to spec, poor
comments, poor indentation, meaningless identifiers, required numeric constants are not
defined, the program uses approaches which has not been covered in the lectures. The
deductions here are merely a guide. Marks may also be deducted for other mistakes and
poor practices.

More products