From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Planet motion using Kepler's laws

Hello!

I have Labview project for my courses and it should simulate Kepler's laws. I'm totally green with programming in Labview and our teacher is not willing to help. We did have some basics but it's not enough for me to handle this project. I'm doing my best but it still doesn't work and I'm getting really tired of it. Would someone might help me with drawing planet motion around the star? I don't know how to make a simulation of that planet going around ellipse. I would be really grateful for any advice, tip or anything that may help (even the simulation itself Smiley Happy)!

0 Kudos
Message 1 of 12
(4,058 Views)

We will not do your assignment for you. You would learn very little that way.

 

We will try to help you learn about LabVIEW. The best way for us to help you is for you to ask very specific questions or tell us in as much detail as possible what does not work correctly in your program.

 

Many of us do not read your language so some guidance as to what the various controls and indicators represent would also help.

 

General comments:

- Try to keep the block diagram to one screen.

- Please clean up the wiring. Wires should generally run from left to right (inputs or sources on left, outputs or indicators on right). Wires should not run under or behind other objects or other wires. This makes it very difficult to determine what the porgram does.

- When implementing a mathematical algorithm it can be very helpful to include the equation or formula as a free label or image on the block diagram.  I am not going to go look up Kepler's laws to see if you switched a sign or made another simple error in programming the formula. 

- What is the purpose of the 1-iteration for loop?

 

Except for the slide control nothing changes while the program runs. What is intended to represent time in the equations of motion?

 

Lynn

0 Kudos
Message 2 of 12
(4,009 Views)

for piece of help I give to a vi for solar model system but you have to work hard  in labview to understand it and also use it for your work otherwise it will be useless for you 

I Hope it help you and also I hope you work hard on it to use it 

best regard,

Hatef

Message 3 of 12
(3,972 Views)

This is an intriguing assignment, whose meaning isn't exactly clear to me.  Kepler's "Laws" should probably be called "Kepler's Observations", and describe (observed) planetary motion about our Sun as the following:

  1. The orbits are ellipses, with the Sun as a focus.
  2. If you draw a line from the Sun to a Planet at time t1, and another line at time t2, the area swept out by this line is the same for equal time differences (i.e. it depends only on t2-t1, not where the Planet is at time t1).
  3. The square of the orbit period (the "year length" for a planet) is proportional to the cube of the (elliptical) orbit's semi-major axis.

I'm not sure what it means to "simulate" these observations.  I suppose you could build a model of orbital motion of a sun and a planet, but you'd need a "higher level of knowledge" (say, Newton's Law of Gravitation), and could then possibly demonstrate that your model obeyed Kepler's Laws.  However, going from Kepler's Laws to Newton's Law is not trivial (I once heard Richard Feynman give a wonderful lecture where he did exactly that!) -- indeed, going from Newton's Law to making a model where planets move around a sun is an interesting challenge, as well.

 

So it seems to me that your best bet is to talk to your classmates, and to your Instructor, and make sure that you really understand the assignment.  If you can reduce it to "model these equations" or "Plot the trajectory" or something concrete, you can start thinking about what you need to do and how you want to do it.

 

Bob Schor

Message 4 of 12
(3,910 Views)

@Hatef.fouladi wrote:

for piece of help I give to a vi for solar model system but you have to work hard  


Please do not attach a VI that ships with LabVIEW.

 

(Especially if you don't disclose the source! You probably did not write this code. Only attach your original work.)

 

This particular VI can be found in the example finder, no need to ever attach it. Everybody with LabVIEW installed already has it!

Message 5 of 12
(3,897 Views)
Dear altenbach
I did not claim I wrote this code
but it is what Op can work on it to create Kepler's law animation
I start my labview with work on this vi and with home work like this home work when I was student
It was hard to understand it but useful one
0 Kudos
Message 6 of 12
(3,884 Views)

@Hatef.fouladi wrote:
Dear altenbach
I did not claim I wrote this code

There is nothing wrong pointing to an example in the example finder, but attaching it without revealing the source can give the wrong impression. It is sufficient to give the name of the example. Nothing to attach, because everybody has it already. ;).

Message 7 of 12
(3,879 Views)

@altenbach wrote:

@Hatef.fouladi wrote:
Dear altenbach
I did not claim I wrote this code

There is nothing wrong pointing to an example in the example finder, but attaching it without revealing the source can give the wrong impression. It is sufficient to give the name of the example. Nothing to attach, because everybody has it already. ;).


Not only that but your version throws an error since the required picture files can't be found.  I was going to mention that example but it is a very simple model that is designed to teach about the 3D picture control and I felt it would just confuse the OP who needs to model true elliptical orbits.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019 - Unfortunately now moving back to C#, .NET, Python due to forced change to subscription model by NI. 8^{
0 Kudos
Message 8 of 12
(3,868 Views)

@Lilly24 wrote:

Hello!

Would someone might help me with drawing planet motion around the star? I don't know how to make a simulation of that planet going around ellipse. I would be really grateful for any advice, tip or anything that may help (even the simulation itself Smiley Happy)!


 

This thread (https://lavag.org/topic/13427-drawing-a-circle/) shows how to draw a circle on a XY Graph using the complex data typ ( re = x ; im = y)

 

 

 

Try to modify the snippet above

0 Kudos
Message 9 of 12
(3,805 Views)

That must be an old thread. 😄

 

  • A circle is not an ellipse
  • The complex array can be wired directly to the xy graph.

Here's a modification of some of my very old code to generate a generic ellipse in 2D. You can go to 3D by setting z=0 then applying Euler rotations, for example.

 

 

 

Download All
Message 10 of 12
(3,790 Views)