Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7889655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:09:17+00:00 2026-06-03T06:09:17+00:00

Originally I asked: How to tranlate equations to programming instructions. Judging by the content

  • 0

Originally I asked: How to tranlate equations to programming instructions. Judging by the content found @ Wikipedia: Category: Equations That’s apparently too vague for simple Q&A. So I’ve deleted it.

Since I learn best by example, I would like to see what this equation looks like as a function in C.

an image

(desired course is d, ground speed is Vg, heading is a, true airspeed is Va, wind direction is w, wind speed is Vw. d, a and w are angles. Vg, Va and Vw are consistent units of speed. \pi is 3.14159…)

The above equation is for calculating true ground speed Taken from the E6B flight computer

To be clear: I’m not asking for advice, opinions or rhetoric. I’m not asking you to do my homework. I’m asking for help to understand the process of translation from equation to functional implementation. Bear with me, I know there are quite a few aspects to be aware of in such an endeavour, I would simply like to explore the symmetry between these two symbol systems using my own knowledge, capabilities and understanding.

Due to the fact that I would like to explore the symmetry, I should ask that you keep program identifiers as closely related to their representation in the formula as possible. Key words, catch phrases and rule references pertinent to this example translation in context (code comments) are a plus.

If my question is flawed due to an OVERSIGHT, please express your opinion in the comments below.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:09:18+00:00Added an answer on June 3, 2026 at 6:09 am

    To naively convert an equation into c you break it into parts based off the order of operations. Then you can refine it as needed.

    The way I would break it down:

    The function would have the parametres: d, w, deltaA, Va, Vw

    1. Step1 = d – w + ΔA

    2. Step2 = Math.PI * Step1

    3. Step3 = Step2 / 180 ignore the units(deg)

    4. Step4 = cos(Step3)

    5. Step5 = Va * Va

    6. Step6 = Vw * Vw

    7. Step7 = 2 * Va * Vw

    8. Step8 = Step5 + Step6 – Step7

    9. Step9 = Step8 * Step4

    10. Step10 = Math.sqrt(Step9)

    11. Return Step10

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I originally asked this question , but in finding an answer, discovered that my
A co-worker asked about some code like this that originally had templates in it.
Originally, I asked How do you write a policy that requires a subject be
This question was originally asked for the objective-c programming language. At the time of
I asked a question about this that was originally answered here . Originally, I
Edited to add more details: (originally asked nearly two months ago...still haven't found a
I originally asked this question on Super User but was told that it might
I originally asked this question on RefactorMyCode , but got no responses there... Basically
This question originally asked which is the best method for uploading files via SFTP
This question originally asked (wrongly) what does | mean in Python, when the actual

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.