C-Programming Help URGENT: Get Assistance with Rocket Trajectory Project

  • Thread starter Thread starter Hoofbeat
  • Start date Start date
Click For Summary

Discussion Overview

The discussion revolves around a C programming project aimed at plotting the trajectory of a rocket from Earth to the Moon. The focus is on the challenges faced in translating mathematical concepts, particularly involving vectors and their components, into C code. Participants are providing assistance and suggestions to help the original poster resolve their programming difficulties.

Discussion Character

  • Homework-related
  • Technical explanation
  • Exploratory

Main Points Raised

  • The original poster expresses difficulty in implementing the mathematics of rocket trajectory in C, particularly with vectors and acceleration calculations.
  • One participant suggests posting the code for review to identify specific issues.
  • Another participant recommends focusing on a specific algorithm and the corresponding equations to clarify the problem.
  • There is mention of the "program development cycle" as a structured approach to programming, emphasizing incremental development and debugging.
  • A participant expresses willingness to help but admits a lack of knowledge in C programming.
  • Another participant speculates that the issue may be a logical error and encourages sharing code snippets for targeted assistance.
  • The original poster indicates they will share their code and project overview in a separate thread for further feedback.

Areas of Agreement / Disagreement

Participants generally agree on the need for specific details about the code and the problems encountered. However, there is no consensus on the exact nature of the issues or how best to resolve them, as the original poster has not yet provided the code for review.

Contextual Notes

The discussion is limited by the original poster's initial lack of clarity regarding the specific mathematical concepts and algorithms they are struggling with, as well as the absence of their code at the time of the initial posts.

Who May Find This Useful

This discussion may be useful for students or individuals working on programming projects involving physics simulations, particularly those using C programming and dealing with vector mathematics.

Hoofbeat
Messages
48
Reaction score
0
C-Programming Help URGENT

Hi, I have to create a program within the next week or so to plot the trajectory of a rocket through space on its journey from the Earth to the Moon. I know how to do the actual programming side of things (or at least I think I do!) but I'm having immense problems transferring the maths into C language. My main difficulty is with the use of vectors and they're components. I've spent 3 solid days trying to do just this first part of my computing project (it's a compulsory part of my 1st year Physics' practical course) and have got absolutely no where. I've had several demonstrators look at it in the computing labs and we've sat for hours debugging it (we kept getting the acceleration of the rocket to constantly be zero) and they've finally given up and admitted that it's most likely something in my 'maths' that's wrong, but none of them know how to help and have practically abandoned me.

So if anyone out their has some free time on their hands and is willing to help me (please, I'm begging you! :cry: ) could you PM me and I will pass on my email details and can send you a copy of the problem sheet & my current program (well, I have about 5versions as the demonstrators kept making me try lots of different things).

Thanks so much
 
Computer science news on Phys.org
Ok, so what exactly are you having trouble with? Why don't you post the code you have so we can look at it?
 
How about pick out one very specific algorithm you're having problems with and describe it along with the equations you wish to implement in C. Are you familiar with the "program development cycle"? You know, first define what the problem is, then decide how the problem is to be specified in "pseudo code", then start writing small pieces of it, checking each small piece first before using them together, gradually building the program up to meet your requirements. I'm assuming you're not attempting to just jump into there and do it all at once right? No good programmer does that. It's always piece by piece, checking each, adding to it, gradually building it up. Use a debugger too. You know like Microsoft C++ is nice. You can do all sorts of things with that even change values of variables "on the fly".
 
*Hugs Chloé*. I'd help you, but I don't know any C :frown:.
 
Maybe its just a logical error.We will try to Help.Post the codes or atleast parts of it where you are experiencing trouble
 
Thanks for the offers of help. I'm at home at the moment, but will be back in Oxford this evening so I'll put a copy of my code up later along with the problem sheet.

Chloé
xxx

PS. Thanks Nylex - shame you don't know C. U still use TSR - i dnt see you on there any more?
 
Hi, I'm back again. I've posted details of my code and 'project overview' sheet in the following thread:
https://www.physicsforums.com/showthread.php?t=63800

I've had a couple of people offering advice, and NateTG has been particularly helpful, but I'd appreciate several people's views on the matter to make sure I'm not going horribly wrong with my interpretation of the acceleration formula.

Thanks once again :-p
 

Similar threads

Replies
18
Views
11K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 14 ·
Replies
14
Views
5K
  • · Replies 7 ·
Replies
7
Views
2K
Replies
4
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 10 ·
Replies
10
Views
5K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 15 ·
Replies
15
Views
3K