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


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 8 of 8

Thread: Different units in calculation

  1. #1
    Member
    Join Date
    Jun 2014
    Posts
    77
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default 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


  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default 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?
    If you don't understand my answer, don't ignore it, ask a question.

  3. #3
    Member
    Join Date
    Jun 2014
    Posts
    77
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default 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?

  4. #4
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default 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?
    If you don't understand my answer, don't ignore it, ask a question.

  5. #5
    Member
    Join Date
    Jun 2014
    Posts
    77
    Thanks
    14
    Thanked 0 Times in 0 Posts

    Default 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

  6. #6
    Senior Member
    Join Date
    Jul 2013
    Location
    Europe
    Posts
    666
    Thanks
    0
    Thanked 121 Times in 105 Posts

    Default 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?

  7. #7
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,140
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default 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.
    If you don't understand my answer, don't ignore it, ask a question.

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

    help_desk (September 8th, 2014)

  9. #8
    Super Moderator
    Join Date
    Jun 2013
    Location
    So. Maryland, USA
    Posts
    5,517
    My Mood
    Mellow
    Thanks
    215
    Thanked 698 Times in 680 Posts

    Default 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.

Similar Threads

  1. Replies: 1
    Last Post: July 26th, 2014, 04:38 AM
  2. BMI calculation
    By dantheman in forum What's Wrong With My Code?
    Replies: 3
    Last Post: August 28th, 2012, 09:57 PM
  3. simulate calculation ?
    By meryqat in forum Java Theory & Questions
    Replies: 3
    Last Post: April 30th, 2012, 01:03 PM
  4. I need calculation
    By Swiss518 in forum Loops & Control Statements
    Replies: 7
    Last Post: January 27th, 2011, 01:26 PM
  5. RPM Calculation
    By fobos3 in forum Algorithms & Recursion
    Replies: 2
    Last Post: September 21st, 2010, 08:53 AM

Tags for this Thread