Welcome to the Java Programming Forums

The professional, friendly Java community. 21,500 members and growing!

The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.

>> REGISTER NOW TO START POSTING

# Thread: Different units in calculation

1. ## Different units in calculation

Hello guys,

I have a maths application I am working on in java. This is more related to maths but there could be some here who have worked with calculations like this in their java project.
One could convert from degree to radians and from mph to knots. Could one convert from knots to degree or from mph to degree?

Regards  Reply With Quote

3. ## Re: Different units in calculation

Could one convert from knots to degree or from mph to degree?
Those conversions don't make sense to me. Can you explain how they are possible?  Reply With Quote

4. ## Re: Different units in calculation

In other words, such conversion is baseless? That is what I want to know.
Suppose you are given the following :
AS = Air-speed (in mph) LS = Landd-speed (in knots) value_input = speedWalk (degrees)
PI = 3.1412
and given a formular like this to work out all these values:
AS = LS*cos(value_input*value_input)*PI;
Do I need to make all the conversion to mph since the final result should be in that unit? Does this even make sense?  Reply With Quote

5. ## Re: Different units in calculation

value_input = speedWalk (degrees)
I don't understand that part. Where is the walking being done? How can it be measured in degrees?
Shouldn't there be a time element?  Reply With Quote

6. ## Re: Different units in calculation

The value_input is a user entered value in degrees. So, the user enters a value in degree e.g 23 and then enters the LS in knots e.g 5knots and the calculation is done using the formular:
AS = LS*cos(value_input*value_input)*PI;
PI=3.1412  Reply With Quote

7. ## Re: Different units in calculation

And what would you calculate with that? What is the result supposed to be? When you multiply direction and speed?  Reply With Quote

8. ## Re: Different units in calculation

Ok, as you said, this is a math formula to compute some value. I have no idea what it's for or how to check for correctness. No need to explain.  Reply With Quote

9. ## The Following User Says Thank You to Norm For This Useful Post:

help_desk (September 8th, 2014)

10. ## Re: Different units in calculation

A knot is a measure of speed expressed as a distance per time, specifically nautical miles / hour.

In navigation class, I learned that a nautical mile is equivalent to a minute of arc on the planet Earth at the equator or along any meridian. A minute of arc = 1/60 of a degree.

Perhaps you confused knot (speed) with nautical mile (distance).

A nautical mile is ~6,000 feet while a statute mile is 5,280 feet, so a conversion from MPH to knots is much simpler than the formula you posted above.  Reply With Quote 