From 37791d5831f98c838a5443b336de1671fda657d3 Mon Sep 17 00:00:00 2001 From: Gaurav Bansal Date: Sun, 22 May 2022 19:40:46 -0700 Subject: [PATCH] refactored and polished properly --- __pycache__/Anchor.cpython-38.pyc | Bin 410 -> 0 bytes __pycache__/orbitor.cpython-38.pyc | Bin 4305 -> 0 bytes main.py | 25 ------------------------- Anchor.py => orbilib/Anchor.py | 0 orbitor.py => orbilib/Orbitor.py | 2 +- orbilib/__init__.py | 2 ++ 6 files changed, 3 insertions(+), 26 deletions(-) delete mode 100644 __pycache__/Anchor.cpython-38.pyc delete mode 100644 __pycache__/orbitor.cpython-38.pyc delete mode 100644 main.py rename Anchor.py => orbilib/Anchor.py (100%) rename orbitor.py => orbilib/Orbitor.py (99%) create mode 100644 orbilib/__init__.py diff --git a/__pycache__/Anchor.cpython-38.pyc b/__pycache__/Anchor.cpython-38.pyc deleted file mode 100644 index fb06aef77a0398470d98bd4de03dad9d317b894e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 410 zcmY*Uy-vh140h6hsuNuhFVTVP3m|m-iR~B=OBbtc%3YX8ywJM&(`$$ko37~*`7}Rj5N`?h z=ljl*BoeJFOpO?3h{o!n<@XWd^H8+Ajyt3uMhz2pz%@aRF@7J*F{dNOIN`E<#{(fg M+pRd~sUHIT0dc}my8r+H diff --git a/__pycache__/orbitor.cpython-38.pyc b/__pycache__/orbitor.cpython-38.pyc deleted file mode 100644 index 9b4c5fa2f2d980a0ab43efc5e1782bd5a2916633..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4305 zcmb7I&u`qu73K`dU23(G^~-V`J1%Pkb?By2QnZEpE4AS?L5pT%#A*=iWkGSM6(uey z4`-cvvA$F}1wHoCn{_GR7U&<7BT@8H^q@m8K~6dKdqZ-UTqyxcfiuIMH^c9}`R02= z{eESoW8nJde?Q;1t{TR_>7jm^c({){`w0qR2o@WARP&gPc%L(Bo3YuqbZz(T_YGkQ z`!hq>r@Y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DVS+WJ*VfdUn#Y#>ZN0vS-=Ex5=o1!psf`-4spo7>Z7iMLJEx?ez5n`Q zEomzFa)&Mdqrso9w`) zB5mRYIs1bofz8{}7m=T2knGV(oU;pRdSs_yG#yXIldxZz-9Gu*@kq%yQ|1yn}qEDxmt%TAH&3l%iw4`5eF zA!$sR=?mC&5?chj0)Vua(jxo|LGQqicf+9!!|X4F zrH~y^if{4BM$M7ZsNqE;&_v5p&WjLZ+tT?2A=Wa^ad)tg_G6efTV@jcb*CtxLwW z%f9v{eNNfuoZ(Y!KBLZYOTCHrk^iY%?#VatH4(&P5hX+DVjR0Ne455%lE>_4uBPMU zr=_i%MG&>6dP})|LU|=OGbM{eOK0Xnf9TXF-=gAeDt?Hfq+_8(i<@_rrP9B{v`|ZSbM`mi zz;nZ%w@KembT%0b^3Gr|O2s&)c6Ts%GWO%5M_wTS`XfSb+iUblS}I?of;M}9b5QC- z?NlPaN8MUXwOf~XB!5gMb60eWGJvE#PCF%YQ8?ULcG^zYahxT6x177qy3=uNJlT$| zt-W^N4o1E@%-d0t;lBV%k|^aZ`YKJOq;D^In+lryvX|!0FNz4fLni{Qe>l8QQZ@ev DtoWN7 diff --git a/main.py b/main.py deleted file mode 100644 index 4695718..0000000 --- a/main.py +++ /dev/null @@ -1,25 +0,0 @@ -import orbitor as o -import Anchor as a - -# anch = a.Anch(10000) - -# sat = o.orbitor(5000, 1000, anch) - -sun = a.Anch(1988920000000000000000000000000) -earth = o.orbitor(5973600000000000000000000,149508058000,sun) - -#print(str(sat.getVel())) -#print(str(sat.getTimeTaken())) - -#sat.statPrint(10000) -#sat.statPrint(10000000000) -print(str(earth.getAngVel())) - -print(str(earth.getRadiansOrbit(31536000))) -print(str(earth.getFullRadians(31536000))) -print(str(earth.getPercentage(31536000))) -print(str(earth.getDegrees(31536000))) -print(str(earth.getDistance(31536000))) -print(str(earth.orbitLen())) -print("\n") -earth.statPrinto(31536000) \ No newline at end of file diff --git a/Anchor.py b/orbilib/Anchor.py similarity index 100% rename from Anchor.py rename to orbilib/Anchor.py diff --git a/orbitor.py b/orbilib/Orbitor.py similarity index 99% rename from orbitor.py rename to orbilib/Orbitor.py index 54fbf56..be630a2 100644 --- a/orbitor.py +++ b/orbilib/Orbitor.py @@ -4,7 +4,7 @@ import os -class orbitor: +class Orbitor: def __init__(self, mass, dist, anchor): if not type(anchor) == a.Anch: diff --git a/orbilib/__init__.py b/orbilib/__init__.py new file mode 100644 index 0000000..a7131e3 --- /dev/null +++ b/orbilib/__init__.py @@ -0,0 +1,2 @@ +import Anchor +import Orbitor \ No newline at end of file