Orbital Mechanics - Lagrange Points - JWST James West Space Telescope

61 prikaz
Preskoči na prvu nepročitanu poruku

Bert Mariani

nepročitano,
26. lis 2022. 11:39:2126. 10. 2022.
u The Ring Programming Language
Hello Mahmoud et ALL

Have you ever wondered where the  JWST James West Space Telescope is ?
Why it was placed at that particular point is space
Lagrange Points Calculator  can figure that out.

Attached is the OrbitalMechanic-Zipped.zip
It calculates the Lagrange Points L1-L5 from the Sun to the various Planets, 
and also  between the Earth to the Moon.

At these points, Gravity is calculated to be 0-Zero, because of the Gravity Forces pulling in different directions and off setting the Centrifugal force of the object's orbit
You can read the "Lagrange.pdf" for the math detail if it is of interest to you.

Of particular interest is the placement of the JWST - James West Space Telescope.
It is the L2 point as should on the Image in the capture
L2:  point is 1,510,945 km from the Earth, away from the Sun

The program made heavy use of the "^^" Operator  that was recently developed
It is intuitive and easy to use, makes the code easier to read and visualize.
It can do Exponents, Powers and Any Root,  integer and decimal.
No need for calls to sqrt() or crbt() or pow() or exp()  functions ... etc
Hopefully it should be added to Ring as a Math Operator

(Python, Fortran, Visual Basic, MathLab etc .. have it as a math operator, not a function)
The attached Ring-ExpLog^^.zip has all the modified files

// Pre-Requisite: ^^ Operator -- Can do Exponents, Powers, Roots
// Example   A = 3^^4         => 81.00
//           B = 256^^(1/4)   => 4
//           C = 3.4^^4.5     => 246.41
//           D = 256^^(1/3)   => 6.35
//           E = 129.6^^(1/5) => 2.65
//           F = 5.9736*(10^^6)    => 5973600.00
//           G = 7.3476*(10^^(-5)) => 0.0000734760 


Capture-Lagrange-Results.jpg
ObitalMechanics-Zipped.ZIP
Ring-ExpLog^^Operator.zip

Mahmoud Fayed

nepročitano,
26. lis 2022. 13:07:0126. 10. 2022.
u The Ring Programming Language
Hello Bert

>> "Hopefully it should be added to Ring as a Math Operator"

Thanks, It will be added (It's already on my to-do list) once we talked about it in GitHub
We could support (^^) and (**) too as different styles for the power operator
Since (**) will be familiar to people who used Fortran, Python, Ruby, etc.

Keep up the GREAT WORK

Greetings,
Mahmoud

Ilir

nepročitano,
26. lis 2022. 13:45:1826. 10. 2022.
u The Ring Programming Language
Hello All,

Yes, ** is used by JS/PHP, REXX (Ring competitor by IBM ;), etc.

@bert, nice work, congrats

Greetings,
Ilir

Mansour Ayouni

nepročitano,
26. lis 2022. 16:53:1626. 10. 2022.
u Ilir, The Ring Programming Language
Hello,

As usual, Bert makes nice, interesting apps!
@Ilir: Thanks for talking about Rexx
@Mahloud: thanks for informing us about your plan for ^^ and ** operators, i'll be waiting for them to overload them in the stzNumber class of the Softanza library (since now, we can't overload operators with more then 1 char).

Best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ring-lang/0ec4bf82-da49-44b9-bd8f-9e0413ae3214n%40googlegroups.com.

Mahmoud Fayed

nepročitano,
28. lis 2022. 15:17:4928. 10. 2022.
u The Ring Programming Language
Hello Bert

Thanks again for your contribution, Now Ring 1.18 support ^^ and ** as the power operator
I accepted your pull requests, But In the future when sending a pull request, Please use the latest source files of Ring so I can merge things automatically


Keep up the GREAT WORK :D

Greetings,
Mahmoud

On Wednesday, October 26, 2022 at 6:39:21 PM UTC+3 Bert Mariani wrote:

Bert Mariani

nepročitano,
28. lis 2022. 17:26:2228. 10. 2022.
u The Ring Programming Language
Thank you very much Mahmound !!
for the addition to Ring 1.18

Can you use this Test routine - attached
Test^^Operator.ring    --- to verify the implementation

Output:
A = 3^^4                81.00    Expect: 81.00
B = 256^^(1/4)          4        Expect: 4
C = 3.4^^4.5            246.41   Expect: 246.41
D = 256^^(1/3)          6.35     Expect: 6.35
E = 129.6^^(1/5)        2.65     Expect: 2.65
F = 5.9736*(10^^6)      5973600.00       Expect: 5973600.00
G = 7.3476*(10^^(-5))   0.0000734760     Expect: 0.0000734760

Test^^Operator.ring

Mahmoud Fayed

nepročitano,
28. lis 2022. 18:22:5028. 10. 2022.
u The Ring Programming Language
Hello Bert

You are welcome :D

Nice test, Works as expected using Ring 1.18 (GitHub)

Greetings,
Mahmoud

Mansour Ayouni

nepročitano,
28. lis 2022. 18:28:2828. 10. 2022.
u Mahmoud Fayed, The Ring Programming Language
Hello,
Thank you Bert for making the proposal and thank you Mahmoud for accepting it!
Best,
Mansour

--

---
You received this message because you are subscribed to the Google Groups "The Ring Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ring-lang+...@googlegroups.com.

Mahmoud Fayed

nepročitano,
28. lis 2022. 19:07:0928. 10. 2022.
u The Ring Programming Language
Hello Mansour

>> "Thank you Bert for making the proposal and thank you Mahmoud for accepting it!"

You are welcome :D

Greetings,
Mahmoud
Odgovori svima
Odgovori autoru
Proslijedi
0 novih poruka