[Solved] Astronomy binary star chart

Discuss the spreadsheet application
Locked
marty-0750
Posts: 31
Joined: Tue Feb 17, 2009 5:01 am

[Solved] Astronomy binary star chart

Post by marty-0750 »

How do we plot the orbit of a binary star in Calc. The result should be an ellipse centered on the x/y axis

We are given a table of the:

Position-angle (PA) 0-360 degrees

Distance from the center or the separation (SEP) which is the radius vector.

Should look something like this:
ophiuchi.jpg
ophiuchi.jpg (18 KiB) Viewed 4833 times

Here is a sample table for part of an orbit.

Code: Select all

Alpha Centauri
 YEAR ,   PA,  SEP
 2025 ,  9.1,  8.8
 2026 , 11.8,  9.4
 2027 , 14.2,  9.8
 2028 , 16.4, 10.2
 2029 , 18.5, 10.4
 2030 , 20.5, 10.5
 2031 , 22.6, 10.3
 2032 , 24.8,  9.8
 2033 , 27.3,  9.0
 2034 , 30.5,  7.8
 2035 , 35.0,  6.3
 2036 , 42.9,  4.5
 2037 , 61.9,  2.6
 2038 ,119.5,  1.7
 2039 ,168.2,  3.0
 2040 ,183.6,  4.9
 2041 ,190.3,  6.8
 2042 ,194.1,  8.6
 2043 ,196.6, 10.3
 2044 ,198.4, 11.9
 2045 ,199.8, 13.2
 2046 ,201.0, 14.5
 2047 ,201.9, 15.6
 2048 ,202.8, 16.6
 2049 ,203.6, 17.5
 2050 ,204.3, 18.3
 2051 ,204.9, 19.0
 2052 ,205.5, 19.6
 2053 ,206.0, 20.1
 2054 ,206.6, 20.6
 2055 ,207.1, 21.0
 2056 ,207.6, 21.2
 2057 ,208.1, 21.5
OOo 4.0.1 on Ms Windows 7
FJCC
Moderator
Posts: 9623
Joined: Sat Nov 08, 2008 8:08 pm
Location: Colorado, USA

Re: Astronomy binary star plot - how?

Post by FJCC »

Well, off the top of my head, you have tan(PA) = y/x and SEP^2 = x^2 + y^2. You should be able to solve for x and y and plot the results.
OpenOffice 4.1 on Windows 10 and Linux Mint
If your question is answered, please go to your first post, select the Edit button, and add [Solved] to the beginning of the title.
User avatar
floris v
Volunteer
Posts: 4635
Joined: Wed Nov 28, 2007 1:21 pm
Location: Netherlands

Re: Astronomy binary star plot - how?

Post by floris v »

Like x = SEP*cos (PA) and y = SEP*sin(PA), convert PA to radians.
LibreOffice 25.8.4.2 on Ubuntu Linux
If your problem has been solved or your question has been answered, please edit the first post in this thread and add [Solved] to the title bar.
Nederlandstalig forum
User avatar
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Astronomy binary star plot - how?

Post by Lupp »

I found the time to adapt an old sheet of mine to this example.
It uses Option VBAsupport 1 to simplify passing of parameters, and will therefore only work under (not too old) LibreOffice.
Making it independent of VBAsupport isn't difficult, however.
nextPolyLine.ods
(58.53 KiB) Downloaded 101 times
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
marty-0750
Posts: 31
Joined: Tue Feb 17, 2009 5:01 am

Re: Astronomy binary star plot - how?

Post by marty-0750 »

Neat polylines!

Thankyou for the tips

Now that I have applied the conversion to the circular plot I get the ellipse required and it matches the published ones. The graph however needs to be rotated 90 degrees clockwise to conform with astronomical convention as I attempted on the right. That is,north-down and east-left. I rotated the graph in this respect along with the axes labels but the title stubbornly remains upright on the right. Any tips?

Although one can hover the cursor over a data point and peek at the value, I would rather have every 5th (or so) data point labeled with the year, again as in the astronomical convention. How can I do this?
AlphaCent spreadsheet.jpg
AlphaCent spreadsheet.jpg (105.36 KiB) Viewed 4791 times
OOo 4.0.1 on Ms Windows 7
User avatar
Lupp
Volunteer
Posts: 3756
Joined: Sat May 31, 2014 7:05 pm
Location: München, Germany

Re: Astronomy binary star plot - how?

Post by Lupp »

PLEASE, attach "the real thing" (.ods file here) instead of pasting an image.
On Windows 10: LibreOffice 25.8.4 and older versions, PortableOpenOffice 4.1.7 and older, StarOffice 5.2
---
Lupp from München
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Astronomy binary star plot - how?

Post by Hagar Delest »

marty-0750 wrote: Wed Feb 26, 2025 11:08 am I would rather have every 5th (or so) data point labeled with the year, again as in the astronomical convention. How can I do this?
Add a new series with only the years to be shown and display the labels for that series.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
marty-0750
Posts: 31
Joined: Tue Feb 17, 2009 5:01 am

Re: Astronomy binary star plot - how?

Post by marty-0750 »

The ODS file
Alpha Cent orbit.ods
(44.98 KiB) Downloaded 69 times
OOo 4.0.1 on Ms Windows 7
User avatar
Hagar Delest
Moderator
Posts: 33629
Joined: Sun Oct 07, 2007 9:07 pm
Location: France

Re: Astronomy binary star plot - how?

Post by Hagar Delest »

Lupp and I made our homework and here is the result. Lupp for the mathematical coordinates rotation and I for the second series trick to show the dates.
I let Lupp upload his file if he wishes.
Chart.png
Chart.png (11.12 KiB) Viewed 4699 times

Please add [Solved] at the beginning of the title in your first post (top of the topic) with the button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
User avatar
MrProgrammer
Moderator
Posts: 5430
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Astronomy binary star plot - how?

Post by MrProgrammer »

marty-0750 wrote: Wed Feb 26, 2025 11:08 am The graph however needs to be rotated 90 degrees …
Rotate the chart's data 𝛑/2 radians by swapping the X-value and Y-value ranges in Format → Data Ranges → Data Series and reversing the Y-axis: Format → Axes → Y axis → Scale → Reverse direction.

If this solved your problem please go to your first post use the Edit ✏️ button and add [Solved] to the start of the Subject field. Select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.7.8, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Locked