New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: As a reader of NewMars forum, we have opportunities for you to assist with technical discussions in several initiatives underway. NewMars needs volunteers with appropriate education, skills, talent, motivation and generosity of spirit as a highly valued member. Write to newmarsmember * gmail.com to tell us about your ability's to help contribute to NewMars and become a registered member.

#51 2004-12-04 15:18:21

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Here is the MATLAB/octave version:
Note that nargin stands for the number of input arguments
and that my default value for mu=6.672E-11 is wrong.

[code:1]Function y=Hohmann_P(r1, r2, mu)
    if nargin<3; mu=6.672E-11; % (N m^2 Kg^-2)
    y = Sqrt(mu / r1) * Sqrt(2 * r2 / (r1 + r2) - 1);
End Function[/code:1]


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#52 2004-12-04 16:09:28

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Anyone Every Look at the MATLAB visual basic builder from excel? I think it allows you to use MATLAB functions form Excel. Check it out.

http://www.mathworks.com/access/helpdes … lustration 4: Calling myplot

More inportantly this will alows you to advantage of MATLABs plotting features form excel. In my opnion MATLAB plots are far superiour to excel plots.

http://www.mathworks.com/access/helpdes … /]Elements of a MATLAB Builder for Excel Project


A project consists of all the elements necessary to build a deployable application using MATLAB Builder for Excel. Excel builder components are COM objects accessible from Microsoft Excel through Visual Basic for Applications. COM is an acronym for Component Object Model, which is Microsoft's binary standard for object interoperability. Each COM object exposes a class to the Visual Basic programming environment. The class contains a set of functions called methods, corresponding to the original MATLAB functions included in the component's project.

Also see: http://www.mathworks.com/access/helpdes … 4]Building a Deployable Application So if I just need MATLAB figures I can create Deployable library’s that VB can access and use these figures. I am not sure of the licensing issues though.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#53 2004-12-04 16:58:41

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

I'm thinking of renaming the function Hohmann_DV_P as opposed to Hohmann_P
to stand for hohmann departure delta V. The reason being is there could be several things we wish to calculate for a Hohmann trajectory and I would like to keep them seperate.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#54 2004-12-04 19:36:29

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Did some google searches. Maybe I should see what is out there first before I program to much:

http://www.google.ca/search?hl=en&q=%22 … ta=]Google: "orbital mechanics"+MATLAB

http://www.google.ca/search?hl=en&q=%22 … ta=]Google: "orbital mechanics"+"visual basic"


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#55 2004-12-05 15:16:12

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

I was looking back some posts in this thread and I realized the cross product was the best way to get the normal vector for the orbital plane and two sets of orthogonal basis vectors that lie in the plane. I will post my corrections on the web soon enough along with code to calculate this plane.

I was thinking about what was the most important thing to calculate. I was thinking a three dimensional plot might be nice plotting, the fraction of the year which you can depart from earth and reach mars with a given delta V in a given time.

We already have a plot of the mass fraction vs delta v for a bunch curves with constant ISP. Another nice plot might be the average delta v that can be delivered in a given time for a given thrust level. The average delta v will be defined as (v2-v1)/(t2-t1). I think a ship that can deliver the same average delta v in a given time frame should be able to reach close to the same point in phase space in that time frame if not exactly the same point.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#56 2004-12-05 21:59:46

ftlwright
Member
Registered: 2004-11-17
Posts: 61

Re: Orbital mechanics

There's a sourceforge project called ORSA that would fit the bill for this.  I've used it a couple times and it pretty capable for what your doing now.  Also, it's available on Windows, Linux/UNIX and MacOSX.  Why worry about the code when others have wink.

http://orsa.sourceforge.net]ORSA - open source

Have fun!

Offline

#57 2004-12-05 23:34:31

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Here is an http://www.geocities.com/s243a/orbital_ … oc]updated version of stuff to do with finding the orbit and finding the ellipse. It is in word. I tried to post it in html but geocites won't let me post all the files. Does anyone know a better free hosting place.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#58 2004-12-05 23:39:14

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

There's a sourceforge project called ORSA that would fit the bill for this.  I've used it a couple times and it pretty capable for what your doing now.  Also, it's available on Windows, Linux/UNIX and MacOSX.  Why worry about the code when others have wink.

Looks pretty cool. I will have to investigate it further.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#59 2004-12-07 14:12:04

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Look What I found.
http://www.freewebspace.net/]http://www … space.net/
A discussion board devoted to free web housting.
http://www.free-webhosts.com/]http://ww … hosts.com/

This might be a cool place to host but I got to make 10 posts first for some reason.
http://www.trap17.com/forums/index.php? … act=portal

I emailed angel fire and they accepted added the file extention I wanted to the allowed file extension list.

http://free.angeltowns.com/s243a/]http: … com/s243a/


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#60 2004-12-11 15:35:23

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Here is the html version for findining the plane and the ellipse.

http://s243a.trap17.com/orbit1.htm]http … orbit1.htm


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#61 2004-12-13 10:02:54

ERRORIST
Member
From: OXFORD ALABAMA
Registered: 2004-01-28
Posts: 1,182

Re: Orbital mechanics

So how would my pipeline equation look using this program?

Offline

#62 2004-12-13 10:13:21

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

So how would my pipeline equation look using this program?

If you don’t respond in the right thread I am not going to reply to you. This thread is about orbital mechanics not pipelines. Quote the section you are replaying to and repost in the thread pipelines and space elevators.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#63 2004-12-13 10:48:19

ERRORIST
Member
From: OXFORD ALABAMA
Registered: 2004-01-28
Posts: 1,182

Re: Orbital mechanics

Sorry, I just thought this program would help. Please don't spank me! ???

Offline

#64 2004-12-16 09:59:51

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

I updated my http://s243a.trap17.com/orbit1.htm]orbital mechanics stuff. I thought I would post the result because it is kind of beautiful.

Consequently you can go to the http://mathworld.wolfram.com/Circle-Cir … tersection
of both circles by starting at the center of the big circle given by the
position vector m (the location of mars at arival) and moving a distance

image025.gif
from the center of the big circle with position vector m
towards the center of the smaller circle with position vector g (the loacation of earth at departure). Then move in a perpendicular direction within the plane of the transfer ellipse  a distance:

image026.gif

The overall result is the loacation of second foci of the transfer ellipse is given by

image027.gif

where R is the radius of the big circle r is the radius of
the small circle and d is the distance between the center of each circle. a is a unit vector normal to the transfer plane.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#65 2004-12-17 01:10:26

Hop
Member
From: Ajo
Registered: 2004-04-19
Posts: 146
Website

Re: Orbital mechanics

In the a few recent posts there has been some discussion (http://www.newmars.com/cgi-bin/ikonboar … 292;p=42]3) of the delta-v required to go to mars for various transit times. Until I work out the details my self, the numbers only mean so much to me. Thus, this thread is created to discuss the principles of http://www.braeunig.us/space/orbmech.htm#intro]orbital mechanics. I can only spend so much time learning this because I should be doing reading that is more relevant to my masters (My thesis will probably be a servo motor control system). My ultimate goal with this thread is to learn enough about orbital mechanics so that I can implement a model predictive control space flight system in http://www.mathworks.com/]MATLAB. If I construct such a control system I can then begin simulating various flight systems to see how quickly they can travel to mars and how robust they are to error. One step at a time.

John,

An excellent textbook is _Orbital Mechanics_ by John E. Prussing and Bruce A. Conway. Of particular interest is chapter 4 Lambert's Problem. In this chapter on page 62 is "Transfer Orbits Between Specified Points" and on page 75 "The Terminal Velocity Vectors"

I've made an excel spreadsheet that approximates Mars, Earth and an asteroid orbit of your choice. The elliptical orbits are approximated with 2000 sided polygons. The polygon approximations are rotated into place by a matrices made from orbital elements. Each vertice has time as well as spatial coordinates. Velocity vectors at each vertice are calculated.

If you like, I could send you this spreadsheet. But be forewarned it's 3 megabytes.


Hop's [url=http://www.amazon.com/Conic-Sections-Celestial-Mechanics-Coloring/dp/1936037106]Orbital Mechanics Coloring Book[/url] - For kids from kindergarten to college.

Offline

#66 2004-12-17 11:41:25

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Maybe I will set up an FTP site on my web server soon so you can transfer it over. I am hosted
with http://www.trap17.com]www.trap17.com and I have 20 magabites of space free with no adds. I think I can upgrade
relatively easy too. I am interested in building an educational site centered around orbital
mechanics but with lots of links for people to learn about math and other stuff. I want lots of
examples of how to calculate this stuff by various methods, including spreadhseets (excell), by
hand, and programming languages (MATLAB Visual basic). I think you could probably shrink
the size of your spreadsheet if you tried creating some macros in visual basic but some pure
spread sheet examples will be good. Just give me some time. Maybe I will even try and set up
some web boards where registered users can add to the site. The text book sounds good. I think
someday I will get it but as far as the two point orbit problem I pretty much figured that one out
on my own. So I will wait on getting the book so my site doesn’t look too close to the text book.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#67 2004-12-17 13:52:32

GraemeSkinner
Member
From: Eden Hall, Cumbria
Registered: 2004-02-20
Posts: 563
Website

Re: Orbital mechanics

In regards to the Matlab software, you can't even download a trial without having to fill in a licence request and then wait for them to contact you to discuss your needs sad 
So I'll stick to a calculator for now I think.

Graeme


There was a young lady named Bright.
Whose speed was far faster than light;
She set out one day
in a relative way
And returned on the previous night.
--Arthur Buller--

Offline

#68 2004-12-17 16:42:47

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

In regards to the Matlab software, you can't even download a trial without having to fill in a licence request and then wait for them to contact you to discuss your needs   
So I'll stick to a calculator for now I think.

Graeme

You can use http://www.octave.org/]octave instead. It has the same syntax for matricies and plotting. It just doesn't have all the same tool boxes.

sombrero.jpg

This link could be helpfull:

http://wiki.octave.org/wiki.pl?CategoryInstall]How to Build and Instal Octive

If you want to lear octive here is the documentation:

http://www.octave.org/doc/octave_toc.html]Documentation

I also said I would try to create some macros for excell. So if you have excell then you could use those.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#69 2004-12-17 22:35:01

GraemeSkinner
Member
From: Eden Hall, Cumbria
Registered: 2004-02-20
Posts: 563
Website

Re: Orbital mechanics

You can use http://www.octave.org/]octave instead. It has the same syntax for matricies and plotting. It just doesn't have all the same tool boxes.

Cheers John, downloading it now big_smile

Graeme


There was a young lady named Bright.
Whose speed was far faster than light;
She set out one day
in a relative way
And returned on the previous night.
--Arthur Buller--

Offline

#70 2004-12-17 22:54:21

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Cheers John, downloading it now

big_smile Tell me how it works. I havn't tried it yet. I will offer help I am quite good at MATLAB and I think octave is pretty much the same.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#71 2004-12-18 19:37:00

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

I've made an excel spreadsheet that approximates Mars, Earth and an asteroid orbit of your choice. The elliptical orbits are approximated with 2000 sided polygons. The polygon approximations are rotated into place by a matrices made from orbital elements. Each vertice has time as well as spatial coordinates. Velocity vectors at each vertice are calculated.

If you like, I could send you this spreadsheet. But be forewarned it's 3 megabytes.

Actually send it to me. I think email can handel 3 megabytes:
JohnCreighton_@hotmail.com


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#72 2004-12-19 04:28:13

GraemeSkinner
Member
From: Eden Hall, Cumbria
Registered: 2004-02-20
Posts: 563
Website

Re: Orbital mechanics

big_smile Tell me how it works. I havn't tried it yet. I will offer help I am quite good at MATLAB and I think octave is pretty much the same.

Installed and ran no problem, I'll have a proper play with it soon but it looks from first glance to be fairly good software.

Graeme


There was a young lady named Bright.
Whose speed was far faster than light;
She set out one day
in a relative way
And returned on the previous night.
--Arthur Buller--

Offline

#73 2005-07-10 10:55:07

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

I’m resurrecting this thread again because it occurred to me that if I put orbital calculations already done by some program in a look up table for every month or so that I could get the intermediate values though numeric integration without having to worry about using some sophisticated algorithm like a simplastic integrator. This way I could work within MATLAB and get good results without having to reinvent the weal and then I could add components as I need, depending on what I am trying to do.


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#74 2005-07-10 11:29:18

John Creighton
Member
From: Nova Scotia, Canada
Registered: 2001-09-04
Posts: 2,401
Website

Re: Orbital mechanics

Here is a usefull link:

http://wise-obs.tau.ac.il/~eran/MATLAB/ … ]Ephemeris MATLAB scripts


Dig into the [url=http://child-civilization.blogspot.com/2006/12/political-grab-bag.html]political grab bag[/url] at [url=http://child-civilization.blogspot.com/]Child Civilization[/url]

Offline

#75 2021-05-01 16:16:59

SpaceNut
Administrator
From: New Hampshire
Registered: 2004-07-22
Posts: 28,750

Re: Orbital mechanics

This topic is now fixed from the forum software conversions from ikonboard which still have instruction in some posts.

The redirect was from the original wiki link.

The link within the wiki is not quite right as the id of topic uses a T and not ID for the viewtopic php instruction

This is the NewMars wiki home page we do not have any ability as of yet to add or modify its content but hopefully soon we will have a replacement.

Offline

Board footer

Powered by FluxBB