Page 2 of 5 FirstFirst 1234 ... LastLast
Results 11 to 20 of 41

Thread: Astronomical gear train/gear ratio calculation tool for linux?

  1. #11
    Join Date
    Nov 2008
    Location
    Pittsburgh, PA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    I'm still having trouble. I have python installed. I even set the program to open with the python executable under /bin.
    Nothing happens when I hit run, or run in terminal. Nothing launches, and system monitor confirms this- nothing new shows up.
    It just does nothing.

    So I opened terminal and tried these things:
    Code:
    shogun@shadow:~$ shogun@shogun-desktop:~$ python clockgear.py
    shogun@shogun-desktop:~$: command not found
    shogun@shadow:~$ python clockgear.py
    python: can't open file 'clockgear.py': [Errno 2] No such file or directory
    shogun@shadow:~$ /home/shogun/Desktop/clockgear.py
    /home/shogun/Desktop/clockgear.py: line 1: Target_gear_range: command not found
    /home/shogun/Desktop/clockgear.py: line 3: w1: command not found
    /home/shogun/Desktop/clockgear.py: line 4: w2: command not found
    /home/shogun/Desktop/clockgear.py: line 5: endw: command not found
    /home/shogun/Desktop/clockgear.py: line 7: p1: command not found
    /home/shogun/Desktop/clockgear.py: line 8: p2: command not found
    /home/shogun/Desktop/clockgear.py: line 9: endp: command not found
    /home/shogun/Desktop/clockgear.py: line 14: wheel1: command not found
    /home/shogun/Desktop/clockgear.py: line 15: syntax error near unexpected token `:'
    /home/shogun/Desktop/clockgear.py: line 15: `while (wheel1 < endw):'
    shogun@shadow:~$ ^C
    shogun@shadow:~$
    Still, nothing happens. The colors I mentioned for numbers show up when I hit display, and it opens the file as text in gedit.

    "1. From a calculation stand point there is no difference between your formula and mine."
    I thought so. This shows you I do understand the ordering of the command.

    "2. The logic needs to change as right now it is hard coded with 2 wheels and pinions. I could make it 3 or 4 but as you add
    it becomes very unwieldy. Possibly a recursive subroutine."

    -Would 4 sets of wheels and pinons be doable? What does unwieldly mean here in context for calculation? It's possible it can crash?

    "3. I am just using the error to limit the number I print when I first ran it it tried to print 100*100*100*100 and scrolled by very fast.
    You still have to review the list to see what is best."

    -Does this mean 100 entry results appeared for you?

    "4. I have start and end points. I only created one end point for wheels and one for pinions. It runs from start to end of each.
    I originally had 1 to 100 of each and it was taking too long to calculate just for a test to see if it even worked."

    -Start points for gears? Confused. Meaning you tested tooth values from a base number of teeth for each ranging for 50 above and 50 below?

    I really, really want to understand this, but I do admit my confusion- it's probably because I am not as familiar with the parsing terminology
    or conventions for writing such a script in mathematical logic as it's a new world for me. Would it be correct to say here that a mathematical
    logic circuit exists, and I'm confused as to how this logic is defined?

    What I really can't figure out is why this program won't open for me, even though I've made non-executable files executable before, and with success.

    I must sound like a computing greenhorn- which I'm not- but to this area of computing and, I guess, "logic"- I am.

  2. #12
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    Where did you save clockgear.py? to run it you need to be in the same directory.
    I copied it to ~ or /home/fred
    I do a ls to see that it really is there.
    then I run it with python
    fred@fred-desktop:~$ ls clo*
    clockgear.py
    fred@fred-desktop:~$ python clockgear.py
    1.00273768044 2.19561971271e-07 51.0 79.0 49.0 82.0
    etc...

    I can modify for 4 if you want but it has so many while's nested it becomes hard to follow. To test for 4 I would need an answer that works so I can limit choice and see that it at least works for that.

    I arbitrarily set start calc at 48 on wheels and 45 on pinions and ends at 80& 85. You can change to anything, but when running from 1 to 100 for all and before I had the logic to limit output it was listing every alternative ie 1,1,1,1 then 1,1,1,2 etc until it gets to 100,100,100,100. or 100000000 listings. I had to stop it since it was too long. Even with the logic to only show very small errors the process was slow and since I was just testing I changed starts and ends to calculate fewer alternatives. currently it starts at 48,48,45,45 and goes to 80,80,85,85.

    What are reasonable start & end points. what is smallest reasonable and largest number of teeth.
    Last edited by oldfred; June 12th, 2010 at 08:00 PM.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  3. #13
    Join Date
    Nov 2008
    Location
    Pittsburgh, PA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    Quote Originally Posted by oldfred View Post
    Where did you save clockgear.py? to run it you need to be in the same directory.
    I copied it to ~ or /home/fred
    I do a ls to see that it really is there.
    then I run it with python
    fred@fred-desktop:~$ ls clo*
    clockgear.py
    fred@fred-desktop:~$ python clockgear.py
    Ok, that's where I lost you. I know how to navigate to a folder in nautilus, as that's basic use. I navigated to my desktop folder in nautilus, and clicked the clockgear.py file, but nothing happened. I assume you mean somehow to navigate to the directory in terminal? I don't know how.
    I always have "shogun@shadow:~$" in terminal- aka, me@mycomputername. I don't know how to change that, or know what "ls" or " ls clo*" is.

    For a 4 wheel, 4 pinion system test, try this (Wheel1/Pinion1), etc:
    Code:
    [(21/15) * (65/47) * (75/89) * (120/112)] = 1.748147263
    What is most important to me is the final ratio of 1.002737909350795, but if there were a way to find out
    the minimum number of gears to get this number, I would be interested in that too.
    Last edited by BastardNamban; June 13th, 2010 at 12:59 AM.

  4. #14
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    Did you try typing the commands just as I posted. The ls command lists files, by using clock* I list all files starting with clock so I know the file is in the directory I am in.

    Code:
    ls clock*
    python clockgear.py
    I have modified the 2 gear version, mostly to clean it up. And I will create a 4 gear version to see if it works. Rather than starting at 1 and going to 100 adn if 100 the largest possible?, is it better to start at 50 for wheels and go up, and 50 for pinions and go down to the smallest number to teeth you can have. I know you cannot have 1 tooth, but what is the smallest reasonable number?

    If you will confirm the 50 as a start point I will repost the 2 gear version and start on a 4 gear set version.
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  5. #15
    Join Date
    Nov 2008
    Location
    Pittsburgh, PA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    Ok, 50 for pinions and going down is a good idea. While people have made clocks with pinions of 3 leaves, 5 is a good lowend end number.

    36 and up to 120 for wheels would work. The possibility of using the least number of teeth is a good thing- the less teeth, the better they can react to dust getting in them, and the stronger the individual teeth can be.

    I understand what "ls clock*" is now- ls is a search function, but what doesn't seem clear to me is how you set a directory to look in. I get this just typing it into terminal:
    Code:
    shogun@shadow:~$ ls clock*
    ls: cannot access clock*: No such file or directory
    So I thought, copy the file destination into terminal with ctrl+L to get rid of the breadcrumbs layout and show file path.
    THEN maybe running ls clock* would do something.
    Code:
    bash: /home/shogun/Desktop: is a directory
    shogun@shadow:~$ ls clock*
    ls: cannot access clock*: No such file or directory
    No go

    I can't believe it's this difficult to simply run a file. Why can't I click on the file, on my desktop, to run it? Why does that refuse to do anything??

    This is very frustrating, but I will be patient as you have been patient with me, and I really appreciate your help a lot.
    Last edited by BastardNamban; June 13th, 2010 at 06:50 PM.

  6. #16
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    When you downloaded the file it probably is in downloads. One of my modifications is to tell the system it is python, but I think it then only runs in the background and you do not see the results in the terminal.

    I use cd to change to the Downloads directory and of course I mistyped (capital D) it the first time.

    fred@fred-desktop:~$ cd downloads
    bash: cd: downloads: No such file or directory
    fred@fred-desktop:~$ cd Downloads
    fred@fred-desktop:~/Downloads$ ls cloc*
    clockgear.py
    fred@fred-desktop:~/Downloads$ python clockgear.py
    data: (1.0027376804380288, 2.1956197127082078e-07, 51.0, 79.0, 49.0, 82.0)
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  7. #17
    Join Date
    Nov 2008
    Location
    Pittsburgh, PA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    THAT'S IT! That's what I didn't know- and you just showed me. "cd"! That's why I was having so much trouble-
    to you, it was basic knowledge, but I hadn't known about it yet. I don't know basic terminal commands much yet beyond "sudo",
    but everything else I have good command over. As you can tell, I don't use the terminal alot, or compile things.

    I still don't know why the thing wouldn't run by clicking on it (btw, I have downloads saved to my desktop, I forget to
    look in the downloads folder- desktop is just easier to remember, as it's right in front of me. I know, I know, it slows things down.

    So, success! Here's what happened:
    Code:
    shogun@shadow:~$ cd Desktop
    shogun@shadow:~/Desktop$ ls cloc*
    clockgear.py
    shogun@shadow:~/Desktop$ python clockgear.py
    1.00273768044 2.19561971271e-07 51.0 79.0 49.0 82.0
    1.00273768044 2.19561971271e-07 51.0 79.0 82.0 49.0
    1.00273972603 1.82602739729e-06 54.0 61.0 45.0 73.0
    1.00273972603 1.82602739729e-06 54.0 61.0 73.0 45.0
    1.00273972603 1.82602739729e-06 60.0 61.0 50.0 73.0
    1.00273972603 1.82602739729e-06 60.0 61.0 73.0 50.0
    1.00273972603 1.82602739729e-06 61.0 54.0 45.0 73.0
    1.00273972603 1.82602739729e-06 61.0 54.0 73.0 45.0
    1.00273972603 1.82602739729e-06 61.0 60.0 50.0 73.0
    1.00273972603 1.82602739729e-06 61.0 60.0 73.0 50.0
    1.00273972603 1.82602739729e-06 61.0 66.0 55.0 73.0
    1.00273972603 1.82602739729e-06 61.0 66.0 73.0 55.0
    1.00273972603 1.82602739729e-06 61.0 72.0 60.0 73.0
    1.00273972603 1.82602739729e-06 61.0 72.0 73.0 60.0
    1.00273972603 1.82602739729e-06 61.0 78.0 65.0 73.0
    1.00273972603 1.82602739729e-06 61.0 78.0 73.0 65.0
    1.00273972603 1.82602739729e-06 66.0 61.0 55.0 73.0
    1.00273972603 1.82602739729e-06 66.0 61.0 73.0 55.0
    1.00273972603 1.82602739729e-06 72.0 61.0 60.0 73.0
    1.00273972603 1.82602739729e-06 72.0 61.0 73.0 60.0
    1.00273972603 1.82602739729e-06 78.0 61.0 65.0 73.0
    1.00273972603 1.82602739729e-06 78.0 61.0 73.0 65.0
    1.00273768044 2.19561971271e-07 79.0 51.0 49.0 82.0
    1.00273768044 2.19561971271e-07 79.0 51.0 82.0 49.0
    done
    shogun@shadow:~/Desktop$
    So, thanks to you, I now know how to navigate to a directory in terminal, and search for files in that directory,
    as well as finally successfully running your program!

    Fred, thank you very much. I will now work on understanding the syntax of how the program defines things. Is there a
    good place to learn about what things python can do, and where to look to learn how to make such things myself? I'd like
    to be able to help others like me who don't know much yet, as some things can only be done through light coding.

    The problem for me in learning anything involved for linux has always been what I call the "robot call-center approach"
    the linux community takes toward learning online- everything is a jump through hoops wiki-list of how tos, many unintuitive,
    and often have me jumping to many separate sites before I can make use of info from one. Everything is a "read this FAQ before doing X"
    where X is any basic thing that someone could have just typed- like "use cd and then the name of a folder to change directory in terminal".

    Thus, it's been quite frustrating to me to learn- if I could talk to someone in person, I pick up new stuff at a very quick pace.

    I'll be waiting eagerly for your updated scripts, and once I figure out how you ordered them and the syntax, I'll try making some
    of my own, but one step at a time
    Last edited by BastardNamban; June 13th, 2010 at 07:57 PM.

  8. #18
    Join Date
    Nov 2008
    Location
    Pittsburgh, PA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    I'm on a roll- I tried editing your file to one of my own, changed the equation order to make reading
    the resulting gear order easier (wheel1 pinion1 wheel2 pinion2 instead of wheel1 wheel2 pinion1 pinion2),
    changed what I figured out to be the starting ranges for each, and saved it as a different filename.

    I also figured out it doesn't matter where you put that * at the end of something to search- the further you
    know the name of something, the further out you can make the name before you add the * to search. Interesting.

    Here's what I got:
    Code:
    shogun@shadow:~/Desktop$ ls clockgear-*
    clockgear-shogun.py
    shogun@shadow:~/Desktop$ python clockgear-shogun.py
    1.00273972603 1.82602739729e-06 36.0 61.0 30.0 73.0
    1.00273972603 1.82602739729e-06 36.0 61.0 73.0 30.0
    1.00273972603 1.82602739729e-06 42.0 61.0 35.0 73.0
    1.00273972603 1.82602739729e-06 42.0 61.0 73.0 35.0
    1.00273972603 1.82602739729e-06 48.0 61.0 40.0 73.0
    1.00273972603 1.82602739729e-06 48.0 61.0 73.0 40.0
    1.00273768044 2.19561971271e-07 51.0 79.0 49.0 82.0
    1.00273768044 2.19561971271e-07 51.0 79.0 82.0 49.0
    1.00273972603 1.82602739729e-06 54.0 61.0 45.0 73.0
    1.00273972603 1.82602739729e-06 54.0 61.0 73.0 45.0
    1.00273972603 1.82602739729e-06 60.0 61.0 50.0 73.0
    1.00273972603 1.82602739729e-06 60.0 61.0 73.0 50.0
    1.00273972603 1.82602739729e-06 61.0 36.0 30.0 73.0
    1.00273972603 1.82602739729e-06 61.0 36.0 73.0 30.0
    1.00273972603 1.82602739729e-06 61.0 42.0 35.0 73.0
    1.00273972603 1.82602739729e-06 61.0 42.0 73.0 35.0
    1.00273972603 1.82602739729e-06 61.0 48.0 40.0 73.0
    1.00273972603 1.82602739729e-06 61.0 48.0 73.0 40.0
    1.00273972603 1.82602739729e-06 61.0 54.0 45.0 73.0
    1.00273972603 1.82602739729e-06 61.0 54.0 73.0 45.0
    1.00273972603 1.82602739729e-06 61.0 60.0 50.0 73.0
    1.00273972603 1.82602739729e-06 61.0 60.0 73.0 50.0
    1.00273972603 1.82602739729e-06 61.0 66.0 55.0 73.0
    1.00273972603 1.82602739729e-06 61.0 66.0 73.0 55.0
    1.00273972603 1.82602739729e-06 61.0 72.0 60.0 73.0
    1.00273972603 1.82602739729e-06 61.0 72.0 73.0 60.0
    1.00273972603 1.82602739729e-06 61.0 78.0 65.0 73.0
    1.00273972603 1.82602739729e-06 61.0 78.0 73.0 65.0
    1.00273972603 1.82602739729e-06 66.0 61.0 55.0 73.0
    1.00273972603 1.82602739729e-06 66.0 61.0 73.0 55.0
    1.00273972603 1.82602739729e-06 72.0 61.0 60.0 73.0
    1.00273972603 1.82602739729e-06 72.0 61.0 73.0 60.0
    1.00273972603 1.82602739729e-06 78.0 61.0 65.0 73.0
    1.00273972603 1.82602739729e-06 78.0 61.0 73.0 65.0
    1.00273768044 2.19561971271e-07 79.0 51.0 49.0 82.0
    1.00273768044 2.19561971271e-07 79.0 51.0 82.0 49.0
    done
    shogun@shadow:~/Desktop$
    The modification I made is attached, so you can see what I did. I can even change the target number to something closer
    to the real value if I want- the wiki on Sidereal time shows me far out past the decimal, the value isn't constant-
    tidal friction actually changes the rotational speed of the earth in relation to the stars over centuries!

    This is quite amazing. My design will have to account for these sorts of minor fluctuations. I could perhaps mount this
    train of gears on a differential gear series that would adjust the angular rotation of the system to account for fluxing
    changes to the ratio over centuries, or something like that.
    Attached Files Attached Files
    Last edited by BastardNamban; June 13th, 2010 at 08:14 PM.

  9. #19
    Join Date
    Jun 2009
    Location
    Chicago Suburbs
    Beans
    Hidden!
    Distro
    Ubuntu 14.04 Trusty Tahr

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    Good progress.

    I have a updated version. I now sort adn the default sort was in decending order. I had to increase pinion numbers to get your answer. And made the error allowed to print a variable at the top to make it easier to change to get more or less results. With only 50 descending I go no results.

    Do you want me to add another set for 3 or 4? This one took about 45 seconds to calculate on my system. I think it will take a lot longer unless you restrict the start & ends.

    If you know where file is and can type directory correctly,
    $ python /Downloads/clockgear.py
    Up arrow will let you rerun a command also
    history shows all the commands you have run.

    Updated & renamed to clockgear2.py jun 20, 2010
    Attached Files Attached Files
    Last edited by oldfred; June 21st, 2010 at 04:47 AM. Reason: more commands
    For info on UEFI boot install & repair:
    http://ubuntuforums.org/showthread.php?t=2147295
    Please use Thread Tools above first post to close thread when/if answered completely.







  10. #20
    Join Date
    Nov 2008
    Location
    Pittsburgh, PA
    Beans
    Hidden!
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Astronomical gear train/gear ratio calculation tool for linux?

    Tried the new improved version, which I saved as "clockgearrevised" in a folder on my desktop called Clockgear, with the original and my edit of that.
    Here's what I got (took about 1 minute):
    Code:
    shogun@shadow:~$ cd Desktop/Clockgear
    shogun@shadow:~/Desktop/Clockgear$ ls clock*
    clockgearoriginal.py  clockgearrevised.py  clockgear-shogun.py
    shogun@shadow:~/Desktop/Clockgear$ python clockgearrevised.py
    data:  (1.0027376804380288, 2.1956197127082078e-07, 51.0, 79.0, 49.0, 82.0)
    data:  (1.0027376804380288, 2.1956197127082078e-07, 51.0, 79.0, 82.0, 49.0)
    data:  (1.0027376804380288, 2.1956197127082078e-07, 79.0, 51.0, 49.0, 82.0)
    data:  (1.0027376804380288, 2.1956197127082078e-07, 79.0, 51.0, 82.0, 49.0)
    done
    shogun@shadow:~/Desktop/Clockgear$
    I'm guessing I got only 4 answers, all with the same target result, with the same 4 numbers for the wheels and pinions except switched around,
    because those were the most accurate answers, and less than the error value you assigned, so it posted only those 4 results.

    Since that only took 1 minute to finish, I'd be willing to try up to, say, 8 gears and pinions, and let it run for a day. Really, the calculation time doesn't
    bother me much. I'm fine with letting it run for a day or a few days if I get more accurate results with wheels and pinions.

    For now, would you be able to try a version with 4 wheels and 4 pinions, and see what happens?
    I'll try 8 or 10 or 20 later on. I also think I understand completely how the code works and limits now.

    Btw, How does it know to move up or down the values though- it realizes automatically which direction to go based on which number is higher to start?

    This is quite fun Fred
    Last edited by BastardNamban; June 14th, 2010 at 05:30 AM.

Page 2 of 5 FirstFirst 1234 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •