New Mars Forums

Official discussion forum of The Mars Society and MarsNews.com

You are not logged in.

Announcement

Announcement: This forum is accepting new registrations via email. Please see Recruiting Topic for additional information. Write newmarsmember[at_symbol]gmail.com.

#1 Re: Meta New Mars » GW Johnson Postings and @Exrocketman1 YouTube videos » Today 11:44:35

This post contains a link to Dropbox.

The file turns out to be a text file of the Visual Basic version of GW Johnson's XYTRAJ.BAS  program.

https://www.dropbox.com/scl/fi/w6i6xswi … wt8uz&dl=0

and!  Here is the zipped up EXE file:
https://www.dropbox.com/scl/fi/9jrp31um … j0p9a&dl=0

Ignore the Dropbox ads and just use the download icon in the upper right.

Move the file from Download to the folder where you want it, and double click the Zip file icon.

After the program appears you can double click on it and it will open it's little DOS window.

GW Johnson is thinking about writing documentation for the program.

The above link was tested on a second Windows 10 machine and this time it worked.

(th)

#2 Re: Science, Technology, and Astronomy » Rocket Engine Design » Today 10:31:43

This post contains a "research plan" that Gemini proposed ...

Here's a research plan for that topic. If you need to update it, let me know!
Vacuum Engine Sea Level Use

Research Websites
(1) Explain the fundamental principles of rocket engine nozzle design, specifically how they are optimized for different ambient pressures (sea level vs. vacuum).
(2) Investigate the specific phenomena that occur when a rocket engine nozzle designed for vacuum operation is ignited at sea level atmospheric pressure.
(3) Research the concept of flow separation and over-expansion in rocket nozzles, and how these relate to operating conditions that differ from the design point.
(4) Identify the physical forces and thermal stresses exerted on an over-expanded nozzle, particularly the nozzle extension (the 'bell'), when operating in a dense atmosphere.
(5) Find documented explanations, theoretical analyses, or case studies that describe the potential for structural damage or failure, such as the 'cutting off' or collapse of the nozzle bell, due to these forces and stresses.

More
Analyze Results
Create Report
Ready in a few mins

(th)

#3 Re: Science, Technology, and Astronomy » Rocket Engine Design » Today 10:23:14

This post is an appreciation of inquiries by NewMars members about rocket engine design, and of answers provided by members on the subject.

RGClark has set out a challenge for NewMars (and for all)...

Given that most practicing engineers in all Nations use two engine designs for the flight regime of sea level and vacuum, RGClark has been investigating the attractive option of having just one engine able to work efficiently at both.

This topic is available for an explanation of why a vacuum engine will burn off the vacuum extension at the precise location where a traditional rocket engineer would close the bell.  The answer is posted already in the forum, but it is not easy to find.

If anyone can find the original explanation, please post a link here.

(th)

#4 Re: Martian Politics and Economy » Martian Calender - I have created a martian calender... » Today 10:14:22

===
Today on Mars: 0038/09/02 Monday Days of the week OFFSET 1 with Earth.  (count from Mars to Earth )
Sol 225 Business Month 9 Third month of Quarter 2 of Year 38 One day note: first day of Month 9
Today on Earth: 2025/07/01 Tuesday Earth Date) Post Title: Today on Mars
====*====*==

To see how this calendar works, we show the standard 28 day month at the bottom of this daily report.
There are 20 months of 28 Sols and 4 months of 27 Sols at the end of the four six-month quarters.
New Years Eve is extended to align the Business Calendar for Mars with the Astronomical calendar.
Business and Astronomical both start at zero (to the nanosecond) on New Year's Day.
This calendar has been in operation for two full Mars years (36 and 37). We are in Year 38

Per http://www-mars.lmd.jussieu.fr/mars/tim … _time.html also see: in-the-sky.org for opposition/perigee/aphelion

Martian Year: 38  Martian Astronomical Month in 12 month format: 4 <<== The Astronomical  month will increment when longitude reaches 120 degrees

===
Solar Longitude: 104.1 Sol Number: 225  Change in degrees is +.4 Julian date is: J0038225
Solar Longitude: 103.7 Sol Number: 224  Change in degrees is +.5 Julian date is: J0038224
Solar Longitude: 103.2 Sol Number: 223  Change in degrees is +.4 Julian date is: J0038223
#

Note that Solar Longitude measurement varies as a function of location in orbit.  Ls 0 is the moment when the Sun appears to transit from one hemisphere to the other.  Update from Mars.NASA.gov (The Sun crosses the equator of Mars (Vernal Equinox)). The transition itself is a function of the tilt of an object with respect to the Solar plane. Per squarewidget.com, Hipparchus created the celestial coordinate system we use today.

Note#2: https://theskylive.com/mars-tracker  This web site shows the astronomical position of Mars as seen from Earth
Todo: At next Aphelion/Perihelion record the Mars date as J00##### (and set Search term)
Perihelion occurred in 2024 at Ls 251 on Sol 485 - Earth Date 2024/05/08 Next: (estimated) 2026/03/06
Perihelion occurred in 2022 at Ls 251 on Sol 485 - Earth Date 2022/06/21 Next: (actual) 2024/05/08
Aphelion Earth Dates: Next: 2027/03/04 Earlier: 2025/04/16, 2023/05/30, 2021/07/12, 2019/08/25, 2017/10/07, 2015/11/20
Aphelion occurred at--- Ls 071 on Sol 152. 
Aphelion occurred near Ls 070 on Sol 153 (per http://www.planetary.org)

Note#3: The computations below are dependent upon both the computations provided by the reference web site and by accuracy of recording of the time of observations.  The calculations use tenths of hours.  The Sun Distance needs to be captured at the moment the time increments to a given tenth.

Note on data below: The figure quoted after distance is a rate of progress along the orbital path [exact meaning to be determined]
Minus prefix means Mars is approaching the Sun.  Plus prefix means Mars is moving away from the Sun.
The figure computed to the right of "Difference" is the rate of change of the distance to Sun. Increasing to Aphelion/Decreasing to Perihelion.

Aphelion of Mars is due March 04, 2027 Sol 151-152 Note velocity of Mars was 22.0 km/s nearing Aphelion (21.97 km/s)

===
Distance: Mars >> Sun per theskylive.com:   245,075,097 km [22.4 km/s] Difference is -107032 <= -4460 km/hour at 12 on 07/01 (time 12:00) (24 hours)
Distance: Mars >> Sun per theskylive.com:   245,182,129 km [22.4 km/s] Difference is -105736 <= -4406 km/hour at 12 on 06/30 (time 12:00) (24 hours)
Distance: Mars >> Sun per theskylive.com:   245,287,865 km [22.4 km/s] Difference is -104436 <= -4352 km/hour at 12 on 06/29 (time 12:00) (24 hours)
==*==*==*

Observation: The sky view is ** filled ** with objects and some have been recorded and given identification by humans or their robot assistants
And! ** All ** the location assignments are from the perspective of Earth.  The entire catalog needs to be adjusted when inter-stellar travel begins
The work that lies ahead for the astronomical community is daunting - there is work ahead for centuries
2022/01/19 - All current (existing) stellar catalogs are computed with reference to the Earth.  Another civilization would use it's planet as reference.
Perhaps a Milky Way frame of reference will become necessary at some point. The Earth is as good a Zero point as any, for humans.

=== Mars is in Regular movement as seen from Earth.
Next ahead: TYC 839-434-1 below path Day 0 – 0 ahead
PGC 1367670 well below path  Day 0 – 0 ahead Day 1 – 1 past – likely last day
====*====*>>>

Zoom Out Capability As a general observation ... I've become increasingly interested in knowing what the larger view of the sky might be like.
The site: theskylive.com does a terrific job of matching the view from Earth towards Mars, against a background of actual astronomical plates.
I wish there were a way (or rather, I wish I ** knew ** about a way that may exist) to enlarge the view until the entire galaxy is in view (Zoom out)
Update 2022/12/08 TheSkyLive.com provides a large view of selected objects: Select [Major Bodies] Then select [Information] in the body of interest
Update 2022/12/08 Scroll down to (body) Position and Finder Charts. Field of view is 50x30 degrees.

Light travel in one second is (about) 300,000 kilometers. The distance covered in one minute is about 18,000,000 kilometers. Estimated light times:
1:18,2:36,3:54,4:72,5:90,6:108,7:126,8:144,9:162,10:180,11:198,12:216,13:234,14:252,15:270,16:288,17:306,18:324,19:342,20:360,21:378,22:396

Light travel time today is between 15 and 16 minutes. Communications delay would be 30+ minutes round trip.

===
Earth Distance in km: 2025/07/01 288,518,000 (increasing)
Earth Distance in km: 2025/06/30 287,472,000 (increasing)
Earth Distance in km: 2025/06/29 286,420,000 (increasing)
#

Maximum Earth-Mars distance is estimated to be 401 million kilometers (both at apogee and opposite vs Sun) Minimum is about 56 million kilometers
Mars and Earth were in Opposition (Earth center)  in December of 2022.  The date coincided with a (very rare) occultation of Mars by the Moon.
Mars and Earth were in Conjunction (Sun center) in November of 2023.
Mars and Earth appear to have been as close as they will get in Year 36. 81,454,323 kilometers on J0036644 Time: 4.53 minutes - 9 minutes round trip

In his online interview with Dr. Zubrin at the 2020 Mars Conference, Elon Musk reminded the audience that communications with Mars will necessarily include an intermediary station to handle traffic when the Sun is between Mars and Earth.  Communications delays in that circumstance will increase due to the extra distance to be covered.  Mr. Musk indicated he expects such communication will be handled by laser.  Location would be optimum at poles of solar plane.

This web site offers an online model of the solar system: www.solarsystemscope.com  It requires Chrome 57, Firefox 52 or Safari 10.1. Viewed 2022/10/13: Opposition will occur some time in December of 2022.  Per earthsky.org, the date is December 8, 2022.

This web site offers an online orrery view of the Solar System: https://www.theplanetstoday.com/

===
Sol 225 is in Month 8 of a Proposed 24 month calendar. See Post 19 of Holidays topic for a summary.
Month  8 extends from Sol 196 through 223. <<== There are 28 days in Month 8. See post 82 of Holidays topic for current details.
Direct path to source: http://newmars.com/forums/viewtopic.php … 57#p154257
Sol 225 is Monday in the Proposed Business calendar for Mars.   Sol 195 was a Skip Day on Mars. Next is near 232 of Year 38
##

The Next New Year's on Mars will occur when Solar Longitude reaches 360 degrees. Year 38 started November 12, 2024 on Earth
Per www.planetary.org Year 36 started 2021/02/07 on Earth. Mars Year 37 began 2022/12/27 on Earth.

Days of the Week Alignment:
Days of the week fall behind Earth due to the longer Sol, but they also change when Friday is omitted at the end of a Quarter
337 Earth days were observed to elapse in the 2020 weekday cycle. There were 7 week day transitions and 2 Quarter ends.
The next cycle began on the first Sol of the period of coincidence. The  alignment of weekdays interval is in the range: (310 - 337)
To find the first day of a period of coincidence: Set up: SearchTerm(colon) and (colon)Alignment and J0036* or J0037*
The most recent End-Of-Quarter change occurred: … The search specified above gave 11 pages of results.

For current weather on Mars see:

   ***https://mars.nasa.gov/insight/weather/***
   ***Insight's weather info has been suspended and now is directing to msl*** <<-- Insight's mission is over (2022)

https://mars.nasa.gov/msl/weather/

Per SpaceNut: Here is another web page by NASA containing the latest news releases

https://mars.nasa.gov/news/?page=0&per_ … ope=Latest

All forum members are invited to post significant events for this day.
Events of interest will be ON Mars, or relate to Mars. Examples are launches, landings, discoveries

Standard Month in Mars Business Calendar Copyright ® 2023 NewMars.com Mars Society
Su    Mo    Tu    We    Th    Fr    Sa
1        2      3      4      5      6      7
8        9    10     11    12    13    14
15    16    17     18    19    20    21
22    23    24     25    26    27    28

Recruiting text may be found at the bottom of this post:  http://newmars.com/forums/viewtopic.php … 57#p154257
Copyright the Mars Society All Rights Reserved

Month 9 of 24: - Quarter 2 of 4 [Months 7-12] (This month has 28 Sols)

#5 Re: Science, Technology, and Astronomy » Rocket Nozzle Design » Today 09:26:16

The link below takes you to a NASA education page where animation of a rocket nozzle is available for study.

https://www1.grc.nasa.gov/beginners-gui … cs/nozzle/

This link may well have been published on the NewMars site previously, and perhaps even in this topic.

SearchTerm:Nozzle study animation by NASA

(th)

#6 Re: Meta New Mars » GW Johnson Postings and @Exrocketman1 YouTube videos » Today 08:58:17

For GW Johnson re RGClark's post about throat adjustment vs bell adjustment.

This is a fascinating topic and I hope you and RGClark will pursue it further.

I doubt that RGClark reads any topics other than the ones where he posted, so I'm hoping you will read this one.

The problem you have identified (as I remember it) is that if a rocket engineer puts a vacuum bell on an engine and fires that engine at sea level, the forces generated will cut the bell at the point decreed by physics. 

In a recent post, RGClark asked if modifying the throat might reduce or eliminate that problem.

You came back with a report that you had actually participated in an experiment doing something like that.

I hope you and RGClark will pursue this will-of-the-wisp further.  I doubt it will lead to anything, but at least it is another opportunity for NewMars members and readers to learn a bit more rocket science.

(th)

#7 Re: Meta New Mars » RGClark Postings » Today 08:53:23

For RGClark ....

First, thank you for pursuing the current investigation of throat adjustment as an alternative to bell length adjustment.

Second, as you work with GW Johnson, please see if you can reveal where the throat adjustment component resides.

In a recent post you suggested injecting propellant as a way of ? somehow ? adjusting the throat?  That is an interesting idea and I hope you will see where it leads.

GW Johnson has said repeatedly that if a rocket engineer installs a vacuum bell on a rocket that is used at sea level the forces generated will cut off the bell at whatever point the physics requires.  He used the correct language of course.  What I'm curious about is how changing the shape of the throat might reduce that problem?

I appreciate your persistence in the study of this set of problems.

(th)

#8 Re: Meta New Mars » GW Johnson Postings and @Exrocketman1 YouTube videos » Today 08:44:11

This is a follow up to #548

As a mini-Milestone, I just got the Visual Basic version of XYTRAJ running in Visual Studio 2008 on a 32 bit machine.

This is significant because 64 bit machines have a built-in 32 bit emulation mode, and I have found that .Net program generated on the 32 bit machine will run on 64 bit Windows without difficulty.

My next step will be to see if the 32 bit EXE runs on one of my Windows 10 machines.

I expect it will but we'll see.

As a reminder for anyone reading this post out of the blue, we started with a 16 bit program that runs on a 32 bit machine but not on a 64 bit one, because the 32 bit machine has a 16 bit emulation mode.

We've updated the source code from 1990 to 2019, and now dropped back to 2008, where it runs happily as a 32 bit program.

(th)

#9 Re: Science, Technology, and Astronomy » Computer Technology Compatibility Upgrades Cross Generations » Today 06:55:38

This post is about how to determine the .Net level of a Windows machine.  Apparently there is a way to set up .Net on Linux as well.

Per Google:

To determine the installed .NET versions on a machine where the dotnet command is not available, you can check the registry for .NET Framework versions or look for .NET installation directories. Specifically, navigate to `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\` in the Registry Editor. Each subkey under NDP represents a .NET Framework version.
Here's a more detailed breakdown:
1. Using the Registry Editor:
Access the Registry Editor:
.
Open the Run dialog (Windows key + R), type regedit, and press Enter. You'll need administrator privileges to access some registry keys.
Navigate to the .NET Framework keys:
.
Go to `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\`.
Check for installed versions:
.
Each subkey under NDP represents a .NET Framework version. For example, v4\Full indicates .NET Framework 4.5 or later.
Determine the specific version:
.
Look for a Release DWORD value within the subkey. Its value corresponds to a specific .NET Framework version. For example, a value of 528040 indicates .NET Framework 4.8.
2. Checking for .NET installation directories:
Locate the .NET installation directory: By default, this is C:\Program Files\dotnet.
Examine the host\fxr folder: This folder contains subfolders for each installed .NET runtime. The folder names represent the version numbers.
Examine sharedfx folder: Within each runtime version, the sharedfx folder contains information about installed shared components.
3. Alternative method (if .NET is installed but not in PATH):
If you suspect .NET is installed but not accessible via the command line, check if the C:\Program Files\dotnet directory is included in your system's PATH environment variable.
If not, you can add it to the PATH to make the dotnet command accessible.

The path shown by Google is a generic expression.  On the first machine I checked the correct directory name is Microsoft.NET

(th)

#10 Re: Meta New Mars » GW Johnson Postings and @Exrocketman1 YouTube videos » Today 06:44:06

For GW Johnson!

Here is a link to the zipped up program on Dropbox:
https://www.dropbox.com/scl/fi/w6i6xswi … h4qfx&dl=0

This is what your XYTRAJ program looks like converted to Visual Basic as of 2019:

Option Explicit On
' Option Strict On helps catch type conversion errors at compile time, highly recommended.
Option Strict On

Imports System
Imports System.IO ' For StreamWriter
Imports System.Threading ' For Thread.Sleep

Module XYTRAJ

    ' Option Explicit is good practice in VB.NET
    ' Constants (can be module-level or within Main if only used there)
    Const gc As Double = 32.174
    Const pi As Double = 3.1415926535897931 ' Use full double precision for PI
    Const RE As Double = 20926200.0
    Const dummy As Double = 0.000001 ' Original used .000001

    ' We'll need a StreamWriter for LPRINT output
    Private logWriter As System.IO.StreamWriter = Nothing
    Private Const LogFileName As String = "XYTRAJ_Output.txt" ' Define a log file name

    ' SUB atmos (h, p, T) - (Already translated, not repeated here for brevity)
    ' ...

    ' SUB intrp (n%, v(), u(), x, y) - (Already translated and fixed for n<2, not repeated here for brevity)
    ' ...

    Sub Main()
        Dim inputStr As String
        Dim copy As Integer ' QuickBASIC's copy% becomes 'copy As Integer'

        Console.WriteLine("Welcome to Program XYTRAJ.BAS, version 2, coded by G.W.Johnson,P.E.,")
        Console.WriteLine("in the QuickBASIC 4.5 language on an IBM-compatible PC, 2-21-90.")
        Console.WriteLine("Updated to Visual Basic using .Net on 2025/06/30 .")
        Console.WriteLine()
        Console.WriteLine("This code integrates two-dimensional cartesian trajectory performance")
        Console.WriteLine("of nonlifting point mass vehicles with thrust and drag over a flat")
        Console.WriteLine("earth. Variation of gravity with altitude is included. Propulsion is")
        Console.WriteLine("simple single stage rocket with thrust versus time and motor mass ")
        Console.WriteLine("versus time inputs in tabular form. Thrust data are input as vacuum ")
        Console.WriteLine("levels and corrected for the backpressure term by the code. No ")
        Console.WriteLine("corrections are made for nozzle flow separation. Nozzle exit area is")
        Console.WriteLine("an input. Drag is computed from an input reference area and tabular ")
        Console.WriteLine("input of the drag coefficient versus flight Mach number. This drag is")
        Console.WriteLine("the power-on drag. Power-off drag is approximated by the negative back")
        Console.WriteLine("pressure term added to a zero vacuum thrust with the power-on drag.")
        Console.WriteLine("Be sure your motor and drag curves extend beyond the limit time.")
        Console.WriteLine()
        Console.WriteLine("(Hit any key to continue)")
        Console.ReadKey(True) ' Changed from Thread.Sleep to Console.ReadKey(True)
        Console.WriteLine()
        Console.WriteLine("This code uses a simple forward-stepping computation of the kinematics")
        Console.WriteLine("using the current position, kinematics, and dynamics, ignoring jerk ")
        Console.WriteLine("effects due to variable mass and forces over the step interval. Normally,")
        Console.WriteLine("this would be inaccurate except at very small time steps, which can be")
        Console.WriteLine("rather inefficient. However, this code features a variable time step")
        Console.WriteLine("that limits the maximum velocity increment to a user-input fraction of")
        Console.WriteLine("the current velocity, subject to a minimum value of 1 msec for the step.")
        Console.WriteLine("0.10 is recommended as maximum fraction for rough estimates, and 0.01")
        Console.WriteLine("or 0.02 is probably more appropriate for problems of ordinary scale ")
        Console.WriteLine("near the surface of the earth, especially with significant drag and/or")
        Console.WriteLine("thrust. For zero-thrust problems, be sure to input zero nozzle exit ")
        Console.WriteLine("area to kill the power-off drag increment approximation -Patm*Ae.")
        Console.WriteLine("One quirk: to enforce your initial launch angle at zero initial velocity,")
        Console.WriteLine("you must input a small nonzero velocity, say, 0.01 fps. Because of the")
        Console.WriteLine("variable, velocity-dependent time step, the code will be very slow to ")
        Console.WriteLine("integrate low initial velocity problems -- say, under 100 fps.")
        Console.WriteLine()

        Dim inputParsed As Boolean
        Do
            Console.Write("Do you want a hard copy output? 0 = no, 1 = yes ")
            inputStr = Console.ReadLine()
            inputParsed = Integer.TryParse(inputStr, copy)
            If Not inputParsed Then
                Console.WriteLine("Invalid input. Please enter 0 or 1.")
            End If
        Loop While Not inputParsed

        If copy > 0 Then
            Try
                ' Ensure we dispose of previous writer if running multiple times
                If logWriter IsNot Nothing Then
                    logWriter.Close()
                    logWriter.Dispose()
                End If
                logWriter = New System.IO.StreamWriter(LogFileName, False) ' False for overwrite
                logWriter.WriteLine("Welcome to Program XYTRAJ.BAS, version 1,coded by G.W.Johnson,P.E.,")
                logWriter.WriteLine("in the QuickBASIC 4.5 language on an IBM-compatible PC, 2-21-90.")
                logWriter.WriteLine()
                logWriter.WriteLine("This code integrates two-dimensional cartesian trajectory performance")
                logWriter.WriteLine("of nonlifting point mass vehicles with thrust and drag over a flat")
                logWriter.WriteLine("earth. Variation of gravity with altitude is included. Propulsion is")
                logWriter.WriteLine("simple single stage rocket with thrust versus time and motor mass ")
                logWriter.WriteLine("versus time inputs in tabular form. Thrust data are input as vacuum ")
                logWriter.WriteLine("levels and corrected for the backpressure term by the code. No ")
                logWriter.WriteLine("corrections are made for nozzle flow separation. Nozzle exit area is")
                logWriter.WriteLine("an input. Drag is computed from an input reference area and tabular ")
                logWriter.WriteLine("input of the drag coefficient versus flight Mach number. This drag is")
                logWriter.WriteLine("the power-on drag. Power-off drag is approximated by the negative back")
                logWriter.WriteLine("pressure term added to a zero vacuum thrust with the power-on drag.")
                logWriter.WriteLine("Be sure your motor and drag curves extend beyond the limit time.")
                logWriter.WriteLine()
                logWriter.WriteLine("This code uses a simple forward-stepping computation of the kinematics")
                logWriter.WriteLine("using the current position, kinematics, and dynamics, ignoring jerk ")
                logWriter.WriteLine("effects due to variable mass and forces over the step interval. Normally,")
                logWriter.WriteLine("this would be inaccurate except at very small time steps, which can be")
                logWriter.WriteLine("rather inefficient. However, this code features a variable time step")
                logWriter.WriteLine("that limits the maximum velocity increment to a user-input fraction of")
                logWriter.WriteLine("the current velocity, subject to a minimum value of 1 msec for the step.")
                logWriter.WriteLine("0.10 is recommended as maximum fraction for rough estimates, and 0.01")
                logWriter.WriteLine("or 0.02 is probably more appropriate for problems of ordinary scale ")
                logWriter.WriteLine("near the surface of the earth, especially with significant drag and/or")
                logWriter.WriteLine("thrust. For zero-thrust problems, be sure to input zero nozzle exit ")
                logWriter.WriteLine("area to kill the power-off drag increment approximation -Patm*Ae.")
                logWriter.WriteLine("One quirk: to enforce your initial launch angle at zero initial velocity,")
                logWriter.WriteLine("you must input a small nonzero velocity, say, 0.01 fps. Because of the")
                logWriter.WriteLine("variable, velocity-dependent time step, the code will be very slow to ")
                logWriter.WriteLine("integrate low initial velocity problems -- say, under 100 fps.")
                logWriter.Flush() ' Ensure data is written
            Catch ex As Exception
                Console.WriteLine("Error opening log file: " & ex.Message)
                copy = 0 ' Disable hard copy if there's an error
            End Try
        End If

        ' --- NEW: Outer loop for running multiple simulations ---
        ' --- NEW: Declare a flag to track the first run

        Dim isFirstRun As Boolean = True ' This variable is visible throughout the Main sub

        Dim runAnotherSimulation As Boolean = True

        Do While runAnotherSimulation
            ' Clear console for a new run, but only after the first one
            ' MODIFIED LINE: Use the 'isFirstRun' flag instead of 'time', 'x', 'y'
            If Not isFirstRun Then
                Console.Clear()
            End If

            ' Reset simulation-specific variables for each run
            Dim nFvac As Integer = 0
            Dim Ae As Double = 0.0
            Dim nWo As Integer = 0
            Dim ncd As Integer = 0
            Dim Aref As Double = 0.0
            Dim Wnp As Double = 0.0
            Dim converge As Double = 0.0
            Dim time As Double = 0.0
            Dim Vi As Double = 0.0
            Dim dangli As Double = 0.0
            Dim x As Double = 0.0
            Dim y As Double = 0.0
            Dim angli As Double = 0.0
            Dim xd As Double = 0.0
            Dim yd As Double = 0.0
            Dim limit As Double = 0.0
            Dim max As Double = 0.0
            Dim min As Double = 0.0

            Dim i As Integer ' Loop counter
            Dim parts() As String ' For splitting input strings

            ' QuickBASIC arrays are 1-based by default when declared with TO.
            ' To replicate this in VB.NET, we explicitly dimension from 1.
            ' These arrays retain their size but their contents will be overwritten by input
            Dim Ftimes(0 To 10) As Double
            Dim Fvacs(0 To 10) As Double
            Dim Wtimes(0 To 10) As Double
            Dim Wos(0 To 10) As Double
            Dim Ms(0 To 10) As Double
            Dim cds(0 To 10) As Double

            ' Input rocket thrust model
            Console.WriteLine("Code requires arrays for vacuum thrust vs time and motor mass vs time")
            Console.WriteLine()
            Do
                Console.Write("how many points in the vacuum thrust vs time curve (1 to 10 max) ")
                inputStr = Console.ReadLine()
                inputParsed = Integer.TryParse(inputStr, nFvac) AndAlso nFvac >= 1 AndAlso nFvac <= 10
                If Not inputParsed Then
                    Console.WriteLine("Invalid input. Please enter a number between 1 and 10.")
                End If
            Loop While Not inputParsed
            Console.WriteLine()
            For i = 1 To nFvac
                Do
                    Console.Write("Point {0}: time, sec, and vacuum thrust, pounds (e.g., 0 100) ", i)
                    inputStr = Console.ReadLine()
                    parts = inputStr.Split(" "c) ' Split by space
                    inputParsed = False
                    If parts.Length >= 2 Then
                        If Double.TryParse(parts(0), Ftimes(i)) AndAlso Double.TryParse(parts(1), Fvacs(i)) Then
                            inputParsed = True
                        End If
                    End If
                    If Not inputParsed Then
                        Console.WriteLine("Invalid input format. Please enter two numbers separated by space.")
                    End If
                Loop While Not inputParsed
            Next i
            Console.WriteLine()

            Do
                Console.Write("what is the nozzle exit area, inch2 ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, Ae)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Console.WriteLine()

            Do
                Console.Write("how many points in the motor mass vs time curve (1 to 10 max) ")
                inputStr = Console.ReadLine()
                inputParsed = Integer.TryParse(inputStr, nWo) AndAlso nWo >= 1 AndAlso nWo <= 10
                If Not inputParsed Then
                    Console.WriteLine("Invalid input. Please enter a number between 1 and 10.")
                End If
            Loop While Not inputParsed
            Console.WriteLine()
            For i = 1 To nWo
                Do
                    Console.Write("Point {0}: time, sec, and motor mass, pounds-mass (e.g., 0 50) ", i)
                    inputStr = Console.ReadLine()
                    parts = inputStr.Split(" "c)
                    inputParsed = False
                    If parts.Length >= 2 Then
                        If Double.TryParse(parts(0), Wtimes(i)) AndAlso Double.TryParse(parts(1), Wos(i)) Then
                            inputParsed = True
                        End If
                    End If
                    If Not inputParsed Then
                        Console.WriteLine("Invalid input format. Please enter two numbers separated by space.")
                    End If
                Loop While Not inputParsed
            Next i

            ' Input vehicle drag model
            Console.WriteLine()
            Console.WriteLine("Code requires an array of drag coefficients vs flight Mach number")
            Console.WriteLine()
            Do
                Console.Write("how many points in the cd vs Mach curve (1 to 10 max) ")
                inputStr = Console.ReadLine()
                inputParsed = Integer.TryParse(inputStr, ncd) AndAlso ncd >= 1 AndAlso ncd <= 10
                If Not inputParsed Then
                    Console.WriteLine("Invalid input. Please enter a number between 1 and 10.")
                End If
            Loop While Not inputParsed
            Console.WriteLine()
            For i = 1 To ncd
                Do
                    Console.Write("Point {0}: Mach number and cd (e.g., 0 0.5) ", i)
                    inputStr = Console.ReadLine()
                    parts = inputStr.Split(" "c)
                    inputParsed = False
                    If parts.Length >= 2 Then
                        If Double.TryParse(parts(0), Ms(i)) AndAlso Double.TryParse(parts(1), cds(i)) Then
                            inputParsed = True
                        End If
                    End If
                    If Not inputParsed Then
                        Console.WriteLine("Invalid input format. Please enter two numbers separated by space.")
                    End If
                Loop While Not inputParsed
            Next i
            Console.WriteLine()

            Do
                Console.Write("what is the reference area for cd, inch2 ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, Aref)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed

            ' Input other data
            Console.WriteLine()
            Do
                Console.Write("What is the nonpropulsive mass, pounds-mass ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, Wnp)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Console.WriteLine()

            Do
                Console.Write("What fraction of velocity is the allowable velocity increment ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, converge)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed

            ' Input the initial conditions
            Console.WriteLine()
            Do
                Console.Write("initial time, sec ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, time)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Do
                Console.Write("initial velocity, feet/sec ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, Vi)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Do
                Console.Write("initial path angle, degrees, positive upward ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, dangli)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Do
                Console.Write("initial range, feet ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, x)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Do
                Console.Write("initial altitude, feet ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, y)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed

            angli = dangli * pi / 180.0
            xd = Vi * Math.Cos(angli)
            yd = Vi * Math.Sin(angli)

            ' Input the stopping conditions
            Console.WriteLine()
            Do
                Console.Write("what is the max problem time, sec ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, limit)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Do
                Console.Write("what is the max range, feet ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, max)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed
            Do
                Console.Write("what is the min altitude, feet ")
                inputStr = Console.ReadLine()
                inputParsed = Double.TryParse(inputStr, min)
                If Not inputParsed Then Console.WriteLine("Invalid input. Please enter a number.")
            Loop While Not inputParsed


            ' Echo the inputs
            Console.Clear() ' CLS
            Console.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}", "Wnp,lbm", "Aref,in2", "Ae,in2", "delV/V")
            Console.WriteLine("{0,-12:F6}{1,-12:F6}{2,-12:F6}{3,-12:F6}", Wnp, Aref, Ae, converge)
            Console.WriteLine()
            Console.WriteLine("{0,-12}{1,-12}{2}", "time,sec", "Fvac,lb", "Vacuum thrust curve")
            For i = 1 To nFvac
                Console.WriteLine("{0,-12:F6}{1,-12:F6}", Ftimes(i), Fvacs(i))
            Next i
            Console.WriteLine()
            Console.WriteLine("hit any key to continue")
            Console.ReadKey(True)
            Console.WriteLine()
            Console.WriteLine("{0,-12}{1,-12}{2}", "time,sec", "mass,lbm", "Motor mass curve")
            For i = 1 To nWo
                Console.WriteLine("{0,-12:F6}{1,-12:F6}", Wtimes(i), Wos(i))
            Next i
            Console.WriteLine()
            Console.WriteLine("hit any key to continue")
            Console.ReadKey(True)
            Console.WriteLine()
            Console.WriteLine("{0,-12}{1,-12}{2}", "Mach", "cd", "Drag coefficient vs Mach number curve")
            For i = 1 To ncd
                Console.WriteLine("{0,-12:F6}{1,-12:F6}", Ms(i), cds(i))
            Next i
            Console.WriteLine()
            Console.WriteLine("hit any key to continue")
            Console.ReadKey(True)
            Console.WriteLine()
            Console.WriteLine("Initial Conditions")
            Console.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", "time,sec", "range,ft", "alt,ft", "vel,fps", "angl,deg")
            Console.WriteLine("{0,-12:F6}{1,-12:F6}{2,-12:F6}{3,-12:F6}{4,-12:F6}", time, x, y, Vi, dangli)
            Console.WriteLine("{0,-12}{1,-12:F6}{2,-12:F6}", " ", "xdot,fps", "ydot,fps")
            Console.WriteLine("{0,-12}{1,-12:F6}{2,-12:F6}", " ", xd, yd)
            Console.WriteLine()
            Console.WriteLine("Stopping Conditions")
            Console.WriteLine("{0,-12}{1,-12}{2,-12}", "max t,sec", "max x,ft", "min y,ft")
            Console.WriteLine("{0,-12:F6}{1,-12:F6}{2,-12:F6}", limit, max, min)

            If copy > 0 Then
                If logWriter IsNot Nothing Then
                    logWriter.WriteLine()
                    logWriter.WriteLine("    ECHO OF INPUT DATA ")
                    logWriter.WriteLine()
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}", "Wnp,lbm", "Aref,in2", "Ae,in2")
                    logWriter.WriteLine("{0,-12:F6}{1,-12:F6}{2,-12:F6}", Wnp, Aref, Ae)
                    logWriter.WriteLine()
                    logWriter.WriteLine("{0,-12}{1,-12}{2}", "time,sec", "Fvac,lb", "Vacuum thrust curve")
                    For i = 1 To nFvac
                        logWriter.WriteLine("{0,-12:F6}{1,-12:F6}", Ftimes(i), Fvacs(i))
                    Next i
                    logWriter.WriteLine()
                    logWriter.WriteLine("{0,-12}{1,-12}{2}", "time,sec", "mass,lbm", "Motor mass curve")
                    For i = 1 To nWo
                        logWriter.WriteLine("{0,-12:F6}{1,-12:F6}", Wtimes(i), Wos(i))
                    Next i
                    logWriter.WriteLine()
                    logWriter.WriteLine("{0,-12}{1,-12}{2}", "Mach", "cd", "Drag coefficient vs Mach number curve")
                    For i = 1 To ncd
                        logWriter.WriteLine("{0,-12:F6}{1,-12:F6}", Ms(i), cds(i))
                    Next i
                    logWriter.WriteLine()
                    logWriter.WriteLine("Initial Conditions")
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", "time,sec", "range,ft", "alt,ft", "vel,fps", "angl,deg")
                    logWriter.WriteLine("{0,-12:F6}{1,-12:F6}{2,-12:F6}{3,-12:F6}{4,-12:F6}", time, x, y, Vi, dangli)
                    logWriter.WriteLine("{0,-12}{1,-12:F6}{2,-12:F6}", " ", "xdot,fps", "ydot,fps")
                    logWriter.WriteLine("{0,-12}{1,-12:F6}{2,-12:F6}", " ", xd, yd)
                    logWriter.WriteLine()
                    logWriter.WriteLine("Stopping Conditions")
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}", "max t,sec", "max x,ft", "min y,ft")
                    logWriter.WriteLine("{0,-12:F6}{1,-12:F6}{2,-12:F6}", limit, max, min)
                    logWriter.Flush()
                End If
            End If

            Console.WriteLine()
            Console.WriteLine("we are now ready to fly -- hit any key to continue")
            Console.ReadKey(True)

            Dim count As Integer = 0 ' count% becomes count As Integer
            Dim code As Integer = 0 ' To store termination code
            Dim terminateLoop As Boolean = False ' Reset for each run

            If copy > 0 Then
                If logWriter IsNot Nothing Then
                    logWriter.WriteLine()
                    logWriter.WriteLine("    TRAJECTORY PERFORMANCE DATA LISTING ")
                    logWriter.WriteLine()
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", "time,sec", "x,ft", "xd,fps", "xdd,fps2", "sumFx,lb")
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", "delt,sec", "y,ft", "yd,fps", "ydd,fps2", "sumFy,lb")
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", " ", "vel,fps", "angl,deg", "Mach no.", "qamb,psf")
                    logWriter.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", " ", "thrust,lb", "drag,lb", "veh.mass,lbm", "veh.wt.,lb")
                    logWriter.Flush()
                End If
            End If

            ' THIS IS WHERE WE ACTUALLY "FLY" IN THE CODE

            ' Iteration loop starts here (replacing GOTO 10)
            Do While Not terminateLoop
                count += 1 ' count% = count% + 1

                If count <= 1 Then
                    Console.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", "time,sec", "x,ft", "xd,fps", "xdd,fps2", "sumFx,lb")
                    Console.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", "delt,sec", "y,ft", "yd,fps", "ydd,fps2", "sumFy,lb")
                    Console.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", " ", "vel,fps", "angl,deg", "Mach no.", "qamb,psf")
                    Console.WriteLine("{0,-12}{1,-12}{2,-12}{3,-12}{4,-12}", " ", "thrust,lb", "drag,lb", "veh.mass,lbm", "veh.wt.,lb")
                End If

                ' First let's check for stopping conditions
                If time > limit Then
                    code = 1
                    terminateLoop = True
                ElseIf y < min Then ' Use ElseIf for mutually exclusive conditions
                    code = 2
                    terminateLoop = True
                ElseIf Math.Abs(x) > max Then
                    code = 3
                    terminateLoop = True
                End If

                If terminateLoop Then Exit Do ' Exit the Do While loop

                ' THIS IS THE ONE-PASS POSITION/VELOCITY UPDATE LOGIC

                ' Solve for the forces and dynamics at the current pos & vel & time
                Dim vel As Double = Math.Sqrt(xd * xd + yd * yd)
                If Math.Abs(xd) < 0.000000001 Then ' 1E-09 is 1e-09 in VB.NET
                    xd = 0.000000001
                End If
                Dim angl As Double = Math.Atan2(yd, xd) ' ATN(yd / xd) is prone to issues when xd is 0. Math.Atan2 is safer.
                Dim h As Double = y
                Dim pamb As Double = 0.0 ' Declare before Call
                Dim Tamb As Double = 0.0 ' Declare before Call
                atmos(h, pamb, Tamb) ' CALL atmos(h, pamb, Tamb)

                Dim c As Double = 49.02 * Math.Sqrt(Tamb)
                Dim Mach As Double = vel / c
                Dim Fvac As Double = 0.0 ' Declare before Call
                intrp(nFvac, Fvacs, Ftimes, time, Fvac) ' CALL intrp(nFvac%, Fvacs(), Ftimes(), time, Fvac)

                If Fvac < 0 Then
                    Fvac = 0
                End If
                Dim Fth As Double = Fvac - pamb * Ae
                Dim qamb As Double = 0.7 * pamb * Mach * Mach
                Dim cd As Double = 0.0 ' Declare before Call
                intrp(ncd, cds, Ms, Mach, cd) ' CALL intrp(ncd%, cds(), Ms(), Mach, cd)

                Dim D As Double = cd * qamb * Aref
                Dim Wo As Double = 0.0 ' Declare before Call
                intrp(nWo, Wos, Wtimes, time, Wo) ' CALL intrp(nWo%, Wos(), Wtimes(), time, Wo)

                Wo = Wo + Wnp
                Dim m As Double = Wo / gc
                Dim g As Double = gc * (RE * RE) / ((h + RE) * (h + RE))
                Dim W As Double = m * g
                Dim Fx As Double = (Fth - D) * Math.Cos(angl)
                Dim Fy As Double = (Fth - D) * Math.Sin(angl) - W
                Dim xdd As Double = Fx / m
                Dim ydd As Double = Fy / m

                ' First order of business is to set the time step delt
                Dim Vd As Double = Math.Sqrt(xdd * xdd + ydd * ydd)
                Dim delt As Double = Math.Abs(converge * vel / Vd)
                If delt < 0.001 Then
                    delt = 0.001
                End If

                ' Print what you know at where and when you are
                Dim dangl As Double = angl * 180.0 / pi
                Dim bigq As Double = qamb * 144.0

                ' Replicating PRINT USING
                Console.WriteLine()
                Console.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", time, x, xd, xdd, Fx)
                Console.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", delt, y, yd, ydd, Fy)
                Console.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", dummy, vel, dangl, Mach, bigq)
                Console.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", dummy, Fth, D, Wo, W)

                If copy > 0 Then
                    If logWriter IsNot Nothing Then
                        logWriter.WriteLine()
                        logWriter.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", time, x, xd, xdd, Fx)
                        logWriter.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", delt, y, yd, ydd, Fy)
                        logWriter.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", dummy, vel, dangl, Mach, bigq)
                        logWriter.WriteLine("{0,12:F6}{1,12:F6}{2,12:F6}{3,12:F6}{4,12:F6}", dummy, Fth, D, Wo, W)
                        logWriter.Flush()
                    End If
                End If

                If count >= 3 Then
                    count = 0
                    Console.WriteLine()
                    Console.WriteLine("hit any key to continue")
                    Console.ReadKey(True) ' Changed from Thread.Sleep to Console.ReadKey(True)
                End If

                ' Now compute the new pos & vel at time t + delt & update the time
                x = 0.5 * xdd * delt * delt + xd * delt + x
                y = 0.5 * ydd * delt * delt + yd * delt + y
                xd = xdd * delt + xd
                yd = ydd * delt + yd
                time = time + delt

                ' THIS ENDS THE ONE-PASS UPDATE LOGIC
            Loop

            ' Label 99 replacement
            Console.WriteLine()
            Select Case code
                Case 1
                    Console.WriteLine("TERMINATION ON MAXIMUM PROBLEM TIME, SEC = {0}", limit)
                Case 2
                    Console.WriteLine("TERMINATION ON ALTITUDE BELOW MINIMUM, FT = {0}", min)
                Case 3
                    Console.WriteLine("TERMINATION ON RANGE BEYOND MAXIMUM, FT = {0}", max)
            End Select

            If copy > 0 Then
                If logWriter IsNot Nothing Then
                    logWriter.WriteLine()
                    Select Case code
                        Case 1
                            logWriter.WriteLine("TERMINATION ON MAXIMUM PROBLEM TIME, SEC = {0}", limit)
                        Case 2
                            logWriter.WriteLine("TERMINATION ON ALTITUDE BELOW MINIMUM, FT = {0}", min)
                        Case 3
                            logWriter.WriteLine("TERMINATION ON RANGE BEYOND MAXIMUM, FT = {0}", max)
                    End Select
                    logWriter.Flush()
                End If
            End If

            ' NEW: Set the flag to False after the first run is complete
            isFirstRun = False

            ' --- NEW: Ask to run again ---
            Console.WriteLine()
            Console.Write("Do you want to run another simulation (Y/N)? ")
            inputStr = Console.ReadLine().Trim().ToUpper()
            If inputStr <> "Y" Then
                runAnotherSimulation = False
            End If
            ' --- END NEW ---

        Loop ' End of Do While runAnotherSimulation

        ' Final cleanup (like closing logWriter)
        If logWriter IsNot Nothing Then
            logWriter.Close()
            logWriter.Dispose()
        End If

        Console.WriteLine("Program finished. Press any key to exit.")
        Console.ReadKey(True) ' Wait for final key press before console closes

    End Sub

    ' SUB atmos (h, p, T)
    Public Sub atmos(ByVal h As Double, ByRef p As Double, ByRef T As Double)
        ' STANDARD ATMOSPHERE TO THE STRATOPAUSE -- 65,000 ft max
        ' Code is based on relations given in R.von Mises "Theory of Flight"

        Dim p0 As Double = 14.7
        Dim T0 As Double = 519.0
        Dim p1p0 As Double = 0.23135
        Dim T1 As Double = 393.0
        Dim h1 As Double = 35332.0

        If h <= h1 Then
            Dim pp0 As Double = Math.Pow((1.0 - 0.00000688 * h), 5.256)
            p = p0 * pp0
            T = 519.0 - 0.003566 * h
        Else
            ' IF h > h1 THEN
            Dim pp1 As Double = Math.Exp(-0.0000478 * (h - h1))
            p = p0 * p1p0 * pp1
            T = T1
        End If
    End Sub

    ' SUB intrp (n%, v(), u(), x, y)
    Public Sub intrp(ByVal n As Integer, ByVal v() As Double, ByVal u() As Double, ByVal x As Double, ByRef y As Double)
        ' This routine performs linear interpolation between abscissa array "u" and
        ' ordinate array "v" for interpolated ordinate "y" based upon abscissa "x".
        ' The only restriction is that array "u" must monotonically increase with
        ' increasing index "i".

        ' --- ADDED: Handle cases with insufficient data points for interpolation ---
        If n < 1 Then
            y = 0.0 ' No data points, cannot interpolate.
            Return
        ElseIf n = 1 Then
            y = v(1) ' Only one data point. Return the value at that point.
            Return
        End If
        ' --- END ADDED ---

        Dim j As Integer = 1

        For i As Integer = 1 To n
            If x >= u(i) Then ' Use >= to find the correct segment
                j = i
            Else
                ' If x is less than u(i), we've gone past the segment.
                ' The current j is the right segment start.
                Exit For
            End If
        Next i

        ' Ensure j is within valid bounds for interpolation (j and j+1)
        If j >= n Then ' If x is greater than or equal to the last point, use the last segment
            j = n - 1
        End If

        If j < 1 Then ' If x is less than the first point, use the first segment (u(1) to u(2))
            j = 1
        End If

        ' Calculate f
        Dim denominator As Double = (u(j + 1) - u(j))
        Dim f As Double
        If Math.Abs(denominator) < Double.Epsilon Then ' Use a small epsilon to check for near-zero
            f = 0.0 ' If interval is zero (duplicate x-values), assume no change
        Else
            f = (x - u(j)) / denominator
        End If

        y = v(j) + f * (v(j + 1) - v(j))
    End Sub

End Module

(th)

#11 Re: Martian Politics and Economy » Martian Calender - I have created a martian calender... » Today 05:58:46

Place holder for today's Calendar update:


[51.4797N, 0.0000E] 07/01/2025, 13:00:03 Europe/London
Object: Mars   (open sky map)
RA 10h 40m 23.5s Dec +09° 28' 45.2" Appar J2000
Mag: 1.43 (Estimated: JPL)  Const: Leo
Sun Dist: 245,075,097 km [22.4 km/s]
Earth Dist: 288,518,417 km [35.9 km/s]


Martian Year:   
38
Martian Astronomical Month:   
4
Solar longitude Ls:   
104.1
Sol number:   
225

#12 Re: Meta New Mars » GW Johnson Postings and @Exrocketman1 YouTube videos » Yesterday 18:24:42

For GW Johnson!

Gemini just finished putting the finishing touches on the Windows version of your XYTRAJ program.  It then ran out of steam and asked to work on something else.  I recognize this as a sign that it has run out of patience, or resources, or both, so i signed off with thanks for all it had done.  It saved me weeks of work, which I would not have completed, because I have so many other demands on my time. The program now runs on Windows 7, so it will (most likely) work on any Windows 64 bit machine. 

I'll put the EXE file up on Dropbox, and return here to post the link.

Every NewMars member who has a Windows 64 bit machine and any OS from 7 on up should be able to run the program.

This version runs in a Command Window, which should be familiar to everyone who lived through the DOS days.

Removed after test on Windows 10 ... I'll zip the file and try again.  OK! Zip file is available.

https://www.dropbox.com/scl/fi/hb3bu5u9 … 83tio&dl=0

When you ask Dropbox for a file, it may invite you to set up an account. All you have to do is to download the file. The file size should be 180,005 bytes if the file copied correctly.  You should be able to run the file by just clicking on it.  it will open a Command window and start running, if all goes well.

Note: This program is compiled for Windows 64 bit, but I've only confirmed it runs on Windows 7. There may be adjustments needed.

I've tested on a Windows 10 laptop, and it reported a .Net component is missing. It appears I'm not yet out of the woods.

Feedback would be welcome.

(th)

#13 Re: Science, Technology, and Astronomy » China testing robotic satellite capture systems » Yesterday 17:22:39

This topic has been idle since 2021 ... it is a stretch from a satellite with an arm to robots playing Soccer, but that is what this report is about:
https://www.yahoo.com/sports/article/ch … 37024.html

China's humanoid robots generate more soccer excitement than their human counterparts
Associated Press Finance
Sun, June 29, 2025 at 12:29 AM EDT
2 min read
Teams compete using the T1 robots from Booster Robotics during the inaugural RoBoLeague robot soccer competition held in Beijing, Saturday, June 28, 2025. (AP Photo/Ng Han Guan)
ASSOCIATED PRESS
Teams using autonomous T1 robots from Booster Robotics compete in the inaugural RoBoLeague robot soccer competition held in Beijing, Saturday, June 28, 2025. (AP Photo/Ng Han Guan)
ASSOCIATED PRESS
Workers carry out a T1 robot from Booster Robotics during the inaugural RoBoLeague robot soccer competition held in Beijing, Saturday, June 28, 2025. (AP Photo/Ng Han Guan)
ASSOCIATED PRESS
China Robot Soccer
1 of 5
Teams compete using the T1 robots from Booster Robotics during the inaugural RoBoLeague robot soccer competition held in Beijing, Saturday, June 28, 2025. (AP Photo/Ng Han Guan)
ASSOCIATED PRESS
Generate Key Takeaways

BEIJING (AP) — While China's men's soccer team hasn't generated much excitement in recent years, humanoid robot teams have won over fans in Beijing based more on the AI technology involved than any athletic prowess shown.

Four teams of humanoid robots faced off in fully autonomous 3-on-3 soccer matches powered entirely by artificial intelligence on Saturday night in China's capital in what was touted as a first in China and a preview for the upcoming World Humanoid Robot Games, set to take place in Beijing.

According to the organizers, a key aspect of the match was that all the participating robots operated fully autonomously using AI-driven strategies without any human intervention or supervision.
Advertisement

Equipped with advanced visual sensors, the robots were able to identify the ball and navigate the field with agility

They were also designed to stand up on their own after falling. However, during the match several still had to be carried off the field on stretchers by staff, adding to the realism of the experience.

China is stepping up efforts to develop AI-powered humanoid robots, using sports competitions like marathons, boxing, and football as a real-world proving ground.

Cheng Hao, founder and CEO of Booster Robotics, the company that supplied the robot players, said sports competitions offer the ideal testing ground for humanoid robots, helping to accelerate the development of both algorithms and integrated hardware-software systems.
Advertisement

He also emphasized safety as a core concern in the application of humanoid robots.

“In the future, we may arrange for robots to play football with humans. That means we must ensure the robots are completely safe,” Cheng said. “For example, a robot and a human could play a match where winning doesn’t matter, but real offensive and defensive interactions take place. That would help audiences build trust and understand that robots are safe.”

Booster Robotics provided the hardware for all four university teams, while each school’s research team developed and embedded their own algorithms for perception, decision-making, player formations, and passing strategies—including variables such as speed, force, and direction, according to Cheng.

In the final match, Tsinghua University’s THU Robotics defeated the China Agricultural University’s Mountain Sea team with a score of 5–3 to win the championship.
Advertisement

Mr. Wu, a supporter of Tsinghua, celebrated their victory while also praising the competition.
More in Sports
China's humanoid robots generate more soccer excitement than their human counterparts
Associated Press
Sale pending for Dolphins quarterback Tua Tagovailoa's South Florida house, listing showsHomes.com ・ Ad
2025 Rocket Classic prize money payouts for each PGA Tour player at Detroit Golf Club
USA TODAY Sports - Golfweek
Carlos Alcaraz Sweetly Gifts Qinwen Zhang a Labubu
Town & Country

“They (THU) did really well,” he said. “But the Mountain Sea team (of Agricultural University) was also impressive. They brought a lot of surprises.”

China's men have made only one World Cup appearance and have already been knocked out of next years' competition in Canada, Mexico and the United States.

(th)

#14 Re: Martian Politics and Economy » Martian Calender - I have created a martian calender... » Yesterday 10:03:47

===
Today on Mars: 0038/09/01 Sunday Days of the week OFFSET 1 with Earth.  (count from Mars to Earth )
Sol 224 Business Month 9 Third month of Quarter 2 of Year 38 One day note: first day of Month 9
Today on Earth: 2025/06/30 Monday Earth Date) Post Title: Today on Mars
====*====*==

To see how this calendar works, we show the standard 28 day month at the bottom of this daily report.
There are 20 months of 28 Sols and 4 months of 27 Sols at the end of the four six-month quarters.
New Years Eve is extended to align the Business Calendar for Mars with the Astronomical calendar.
Business and Astronomical both start at zero (to the nanosecond) on New Year's Day.
This calendar has been in operation for two full Mars years (36 and 37). We are in Year 38

Per http://www-mars.lmd.jussieu.fr/mars/tim … _time.html also see: in-the-sky.org for opposition/perigee/aphelion

Martian Year: 38  Martian Astronomical Month in 12 month format: 4 <<== The Astronomical  month will increment when longitude reaches 120 degrees

===
Solar Longitude: 103.7 Sol Number: 224  Change in degrees is +.5 Julian date is: J0038224
Solar Longitude: 103.2 Sol Number: 223  Change in degrees is +.4 Julian date is: J0038223
Solar Longitude: 102.8 Sol Number: 222  Change in degrees is +.5 Julian date is: J0038222
#

Note that Solar Longitude measurement varies as a function of location in orbit.  Ls 0 is the moment when the Sun appears to transit from one hemisphere to the other.  Update from Mars.NASA.gov (The Sun crosses the equator of Mars (Vernal Equinox)). The transition itself is a function of the tilt of an object with respect to the Solar plane. Per squarewidget.com, Hipparchus created the celestial coordinate system we use today.

Note#2: https://theskylive.com/mars-tracker  This web site shows the astronomical position of Mars as seen from Earth
Todo: At next Aphelion/Perihelion record the Mars date as J00##### (and set Search term)
Perihelion occurred in 2024 at Ls 251 on Sol 485 - Earth Date 2024/05/08 Next: (estimated) 2026/03/06
Perihelion occurred in 2022 at Ls 251 on Sol 485 - Earth Date 2022/06/21 Next: (actual) 2024/05/08
Aphelion Earth Dates: Next: 2027/03/04 Earlier: 2025/04/16, 2023/05/30, 2021/07/12, 2019/08/25, 2017/10/07, 2015/11/20
Aphelion occurred at--- Ls 071 on Sol 152. 
Aphelion occurred near Ls 070 on Sol 153 (per http://www.planetary.org)

Note#3: The computations below are dependent upon both the computations provided by the reference web site and by accuracy of recording of the time of observations.  The calculations use tenths of hours.  The Sun Distance needs to be captured at the moment the time increments to a given tenth.

Note on data below: The figure quoted after distance is a rate of progress along the orbital path [exact meaning to be determined]
Minus prefix means Mars is approaching the Sun.  Plus prefix means Mars is moving away from the Sun.
The figure computed to the right of "Difference" is the rate of change of the distance to Sun. Increasing to Aphelion/Decreasing to Perihelion.

Aphelion of Mars is due March 04, 2027 Sol 151-152 Note velocity of Mars was 22.0 km/s nearing Aphelion (21.97 km/s)

===
Distance: Mars >> Sun per theskylive.com:   245,182,129 km [22.4 km/s] Difference is -105736 <= -4406 km/hour at 12 on 06/30 (time 12:00) (24 hours)
Distance: Mars >> Sun per theskylive.com:   245,287,865 km [22.4 km/s] Difference is -104436 <= -4352 km/hour at 12 on 06/29 (time 12:00) (24 hours)
Distance: Mars >> Sun per theskylive.com:   245,392,301 km [22.3 km/s] Difference is -103132 <= -4297 km/hour at 12 on 06/28 (time 12:00) (24 hours)
==*==*==*

Observation: The sky view is ** filled ** with objects and some have been recorded and given identification by humans or their robot assistants
And! ** All ** the location assignments are from the perspective of Earth.  The entire catalog needs to be adjusted when inter-stellar travel begins
The work that lies ahead for the astronomical community is daunting - there is work ahead for centuries
2022/01/19 - All current (existing) stellar catalogs are computed with reference to the Earth.  Another civilization would use it's planet as reference.
Perhaps a Milky Way frame of reference will become necessary at some point. The Earth is as good a Zero point as any, for humans.

=== Mars is in Regular movement as seen from Earth.
Next ahead: PGC 1367670 well below path  Day 0 – 0 ahead
PGC 1370295 well below path Day 0 – 0 ahead Day 1 – 1 Well past … last day
====*====*>>>

Zoom Out Capability As a general observation ... I've become increasingly interested in knowing what the larger view of the sky might be like.
The site: theskylive.com does a terrific job of matching the view from Earth towards Mars, against a background of actual astronomical plates.
I wish there were a way (or rather, I wish I ** knew ** about a way that may exist) to enlarge the view until the entire galaxy is in view (Zoom out)
Update 2022/12/08 TheSkyLive.com provides a large view of selected objects: Select [Major Bodies] Then select [Information] in the body of interest
Update 2022/12/08 Scroll down to (body) Position and Finder Charts. Field of view is 50x30 degrees.

Light travel in one second is (about) 300,000 kilometers. The distance covered in one minute is about 18,000,000 kilometers. Estimated light times:
1:18,2:36,3:54,4:72,5:90,6:108,7:126,8:144,9:162,10:180,11:198,12:216,13:234,14:252,15:270,16:288,17:306,18:324,19:342,20:360,21:378,22:396

Light travel time today is between 15 and 16 minutes. Communications delay would be 30+ minutes round trip.

===
Earth Distance in km: 2025/06/30 287,472,000 (increasing)
Earth Distance in km: 2025/06/29 286,420,000 (increasing)
Earth Distance in km: 2025/06/28 285,360,000 (increasing)
#

Maximum Earth-Mars distance is estimated to be 401 million kilometers (both at apogee and opposite vs Sun) Minimum is about 56 million kilometers
Mars and Earth were in Opposition (Earth center)  in December of 2022.  The date coincided with a (very rare) occultation of Mars by the Moon.
Mars and Earth were in Conjunction (Sun center) in November of 2023.
Mars and Earth appear to have been as close as they will get in Year 36. 81,454,323 kilometers on J0036644 Time: 4.53 minutes - 9 minutes round trip

In his online interview with Dr. Zubrin at the 2020 Mars Conference, Elon Musk reminded the audience that communications with Mars will necessarily include an intermediary station to handle traffic when the Sun is between Mars and Earth.  Communications delays in that circumstance will increase due to the extra distance to be covered.  Mr. Musk indicated he expects such communication will be handled by laser.  Location would be optimum at poles of solar plane.

This web site offers an online model of the solar system: www.solarsystemscope.com  It requires Chrome 57, Firefox 52 or Safari 10.1. Viewed 2022/10/13: Opposition will occur some time in December of 2022.  Per earthsky.org, the date is December 8, 2022.

This web site offers an online orrery view of the Solar System: https://www.theplanetstoday.com/

===
Sol 224 is in Month 8 of a Proposed 24 month calendar. See Post 19 of Holidays topic for a summary.
Month  8 extends from Sol 196 through 223. <<== There are 28 days in Month 8. See post 82 of Holidays topic for current details.
Direct path to source: http://newmars.com/forums/viewtopic.php … 57#p154257
Sol 224 is Sunday in the Proposed Business calendar for Mars.   Sol 195 was a Skip Day on Mars. Next is near 232 of Year 38
##

The Next New Year's on Mars will occur when Solar Longitude reaches 360 degrees. Year 38 started November 12, 2024 on Earth
Per www.planetary.org Year 36 started 2021/02/07 on Earth. Mars Year 37 began 2022/12/27 on Earth.

Days of the Week Alignment:
Days of the week fall behind Earth due to the longer Sol, but they also change when Friday is omitted at the end of a Quarter
337 Earth days were observed to elapse in the 2020 weekday cycle. There were 7 week day transitions and 2 Quarter ends.
The next cycle began on the first Sol of the period of coincidence. The  alignment of weekdays interval is in the range: (310 - 337)
To find the first day of a period of coincidence: Set up: SearchTerm(colon) and (colon)Alignment and J0036* or J0037*
The most recent End-Of-Quarter change occurred: … The search specified above gave 11 pages of results.

For current weather on Mars see:

   ***https://mars.nasa.gov/insight/weather/***
   ***Insight's weather info has been suspended and now is directing to msl*** <<-- Insight's mission is over (2022)

https://mars.nasa.gov/msl/weather/

Per SpaceNut: Here is another web page by NASA containing the latest news releases

https://mars.nasa.gov/news/?page=0&per_ … ope=Latest

All forum members are invited to post significant events for this day.
Events of interest will be ON Mars, or relate to Mars. Examples are launches, landings, discoveries

Standard Month in Mars Business Calendar Copyright ® 2023 NewMars.com Mars Society
Su    Mo    Tu    We    Th    Fr    Sa
1        2      3      4      5      6      7
8        9    10     11    12    13    14
15    16    17     18    19    20    21
22    23    24     25    26    27    28

Recruiting text may be found at the bottom of this post:  http://newmars.com/forums/viewtopic.php … 57#p154257
Copyright the Mars Society All Rights Reserved

Month 9 of 24: - Quarter 2 of 4 [Months 7-12] (This month has 28 Sols)

#15 Re: Science, Technology, and Astronomy » Magnets Magnetic Physics of » Yesterday 09:20:51

This post is about energy storage in magnetic repulsion systems.

The most interesting item (to me for sure) is the 10 cm distance achieved by Japanese magnetic repulsion trains. 

Thank you for another very nice addition to a series of posts I am building in a topic about the physics and applications of magnets. Now I'd like to see if we can tease out a 'jack-in-a-box" scenario from the material we've covered already. Can you find any details about physical distances that are opened up by existing repulsion applications? I am interested in the maglev systems used to separate moving trains from the tracks that support them. Are the distances measured in millimeters? I would assume they must be, due to the rapid falloff of field strength. For that matter, the attractive maglev systems must also be operating with very close physical proximity.

You're absolutely right to focus on the distances involved in magnetic levitation, especially given the rapid fall-off of magnetic force. This is where the "rubber meets the road" (or rather, where it doesn't meet the road!) in maglev technology.

For a "jack-in-a-box" scenario using magnetic repulsion, the "pop" would indeed be over a very short distance, precisely because of this inverse cube law. Let's look at the maglev systems to get a sense of these practical distances.

Maglev Train Levitation Distances

There are two primary types of maglev systems, and they differ significantly in their levitation gaps:

    Electromagnetic Suspension (EMS) Systems (Attraction-Based):

        How it works: These systems, like the Transrapid in Shanghai, use electromagnets on the train to attract the train upwards towards ferromagnetic rails on the underside of the guideway.

Levitation Gap: Because these systems rely on attraction and face inherent instability (they tend to stick if too close or fall if too far), they require very precise, active feedback control to maintain a stable gap. This gap is indeed measured in millimeters (mm).

        Typical levitation gaps for EMS systems are around 8-15 mm (0.3 to 0.6 inches). Some sources specify around 10 mm or 1 cm.

    "Jack-in-a-box" Relevance: While attraction-based, the close proximity demonstrates the challenge of magnetic forces over even short distances. If this system were designed to suddenly "release" from being pulled up, the "fall" (or rather, the rapid increase in gap as the attraction weakens) would be over a very small range.

Electrodynamic Suspension (EDS) Systems (Repulsion-Based):

    How it works: These systems, like the Japanese SCMaglev, use superconducting magnets on the train. As the train moves, these powerful magnets induce eddy currents in coils within the guideway. By Lenz's Law, these induced currents create magnetic fields that repel the train, pushing it upwards and away from the guideway.

        Levitation Gap: Because EDS systems rely on repulsion, and the repulsive force increases as the train gets closer to the track (providing a degree of inherent stability, though still complex), they can achieve a larger levitation gap.

            Typical levitation gaps for EDS systems are significantly larger, ranging from 10 mm to 100 mm (1 cm to 10 cm, or about 0.4 to 4 inches). The Japanese SCMaglev, for instance, is often cited as levitating around 10 cm (4 inches).

        "Jack-in-a-box" Relevance: This is your true "repulsion jack-in-a-box" scenario! The train is held up by the repulsive force. If the power were suddenly cut or the conditions changed, the train would "fall" from this levitated height onto its wheels. The energy stored in that 10 cm levitation gap is quite significant, demonstrating the potential for controlled release of stored repulsive magnetic energy over these distances.

Other Repulsion Applications and Distances:

    Magnetic Bearings: These typically operate with even smaller gaps than maglev trains, often in the range of tens to hundreds of micrometers (µm), or a few millimeters at most. This is because they need extremely high precision and stiffness for rotating machinery, and the forces must be strong over very small clearances.

    Diamagnetic Levitation: For very small, light objects, even strong diamagnetic repulsion (which is inherently stable) requires extremely powerful magnetic fields and the levitation gaps are usually in the millimeters range.

Conclusion for Your "Magnetic Jack-in-a-Box"

Your intuition is correct: the rapid fall-off of magnetic field strength (inverse cube for dipoles) dictates that for any practical "magnetic jack-in-a-box" or levitation system, the distances must be relatively small.

    EMS (attraction): Operates at very tight tolerances, around 1 cm. The "jack-in-a-box" here would be a release into the guideway from this small gap.

    EDS (repulsion): Provides a more substantial levitation height, up to 10 cm. This is the best existing example of energy storage in a repulsive magnetic field, which, if released, would manifest as a "fall" over that 10 cm distance. The challenge, as we've discussed, is getting that initial "compression" and then a controlled "pop."

So, yes, the distances are indeed in the millimeter to centimeter range. While these might seem small to our everyday perception, for the powerful magnetic forces involved, they are significant and represent the practical limits where these forces can effectively be harnessed for levitation and controlled repulsion.

Thank you for a very nicely packaged sequence. I am hoping the sequence will be enlightening to a reader who might be attracted to the topic. While I am away, best wishes for all possible success as you attempt to help all your other customers.

Thank you so much! I'm genuinely glad to hear that the sequence has been helpful and that you find it well-packaged for your readers. That's precisely the goal.

I appreciate your kind wishes, and I wish you all the best with your forum and your fascinating explorations into the physics and applications of magnets. It's a truly engaging topic, and I've enjoyed our discussion immensely.

Please don't hesitate to reach out if you have any more questions in the future. Until then, take care!

(th)

#16 Re: Science, Technology, and Astronomy » Magnets Magnetic Physics of » Yesterday 09:08:48

This post follows #22 with an inquiry of Gemini to show examples of practical application of stored magnetic repulsion, and then to go on to "imagine" possible applications.

Thank you for this summary of examples of use of repulsive magnetic force in various practical applications on Earth. The maglev trains that use repulsion are the most impressive to me, but on the other hand, your examples of tiny nanoscale applications may be new to some of our readers to I appreciate your including them. In this next round, I'd like to enlist your creativity along with your powerful search capability. I am interested in the idea of magnetic propulsion "jack-in-a-box". A "jack-in-a-box" is normally powered by a compressed spring. It could also be powered by compressed gas such as air. In both cases, the stored energy resides in the electron shells of the molecules making up the energy storage system. In the current inquiry, I am wondering if you can find any examples of energy storage in magnetic repulsion systems, or if you can ** think ** of any that may not exist but could exist.

You're posing a very interesting and creative challenge, bridging the familiar concept of a "jack-in-a-box" with the less common domain of stored magnetic repulsive energy! It's a great way to think outside the traditional applications.

My previous response highlighted how magnetic repulsion is used for levitation or movement, but the idea of storing energy specifically in a repelling magnetic field and then releasing it like a spring is a distinct concept.

Let's explore this idea, combining what we know about magnetic fields with some creative thought.

Understanding Energy Storage in Magnetic Repulsion

When you push two like poles of magnets together, you are doing work against the repulsive magnetic force. This work is then stored as potential energy within the magnetic field itself. When you release the magnets, this stored potential energy is converted into kinetic energy as they fly apart.

This is analogous to compressing a mechanical spring. In a spring, the energy is stored in the elastic deformation of the material (changes in interatomic bonds). In magnets, the energy is stored in the configuration of the magnetic fields.

Existing Examples of Stored Magnetic Repulsive Energy

While not typically labeled as a "magnetic jack-in-a-box," there are existing systems where energy is stored and then released via magnetic repulsion:

    Magnetic Bearings (Passive/Semi-Passive):

        In some passive or semi-passive magnetic bearing designs, permanent magnets are arranged to repel each other, holding a shaft in suspension. When the system is "loaded" or moved from its equilibrium, work is done against the repulsive force, storing energy. When the load is removed, this stored energy can cause oscillations or a return to the equilibrium position, much like a spring. While not designed for a single "pop," it demonstrates energy storage and release.

    Magnetic Levitation Systems (General):

        Any system that achieves levitation through repulsion (like the EDS maglev mentioned) inherently stores energy in the magnetic field that's holding the object up. If the object were suddenly allowed to fall, that stored potential energy would be released. Again, not a "jack-in-a-box" in the conventional sense, but the principle of stored repulsive energy is there.

    Experimental "Magnetic Springs" or Dampers:

        Researchers have developed and experimented with "magnetic springs" where permanent magnets are arranged to provide a non-contact elastic force. When these are compressed (pushed together), energy is stored due to the repulsion. When released, this energy can drive motion. These are often used in vibration damping systems or as very low-friction springs in sensitive instruments where mechanical springs might introduce unwanted friction or hysteresis.

Conceptual "Magnetic Jack-in-a-Box" Ideas (May Not Currently Exist in a Direct Analogous Form)

Now, let's get into the more speculative "could exist" realm, drawing directly from your "jack-in-a-box" analogy:

    "Magnetic Release" Mechanisms:

        Imagine a device where a powerful magnetic repulsor (e.g., a strong permanent magnet or a superconducting magnet) is held in a "compressed" state against another like-poled magnet by a mechanical latch or pin. Upon release of the latch, the stored repulsive energy would rapidly push one magnet away, much like a spring-loaded mechanism.

        Potential Applications: This could potentially be used for very rapid, high-force, short-stroke actuators where mechanical springs might wear out or where extremely clean, non-contact action is required. Think about micro-ejectors, or even miniature "launchers" for tiny components in a vacuum.

    Repulsive Magnetic "Catapult" or "Launcher":

        Similar to the above, but scaled up. Instead of a "pop-up" action, envision a track where a projectile (with a strong magnet of a specific polarity) is held at one end. A powerful, fixed magnet of the same polarity provides a strong repulsive force. A release mechanism allows the projectile to accelerate rapidly down the track.

        Potential Applications: Non-contact acceleration for delicate materials, or perhaps as a component in a future high-speed transport system where initial acceleration is done magnetically without physical contact. The challenge here, as always, is control and stability due to Earnshaw's theorem.

    Active Repulsive Energy Storage for Dynamic Systems:

        Consider a system where powerful electromagnets are used. You could "charge" the system by running current through coils to create strong repulsive fields that push an object into a compressed state, storing energy. Then, by rapidly switching off or reversing the current in specific coils, this stored energy could be dynamically released to perform work.

        Potential Applications: Could be a component of future robotic limbs where very rapid, strong, and precise movements are needed without the use of hydraulics or pneumatic cylinders. The "storing" is done electrically, but the "release" is purely magnetic repulsion.

Challenges and Considerations for "Magnetic Jack-in-a-Box":

    Earnshaw's Theorem: This is the big hurdle for purely static systems. Maintaining a stable, compressed repulsive state without mechanical constraints is difficult. Most practical applications would likely need active control, mechanical guides, or diamagnetic materials.

    Force Decay: As discussed, the inverse cube law means that the force drops off very quickly. To get a significant "pop," the initial separation distance must be very small, and the magnets must be incredibly strong.

    Heat Dissipation (for electromagnets): If using electromagnets, maintaining a compressed state for a long time would require continuous current, leading to heat generation and energy loss. Permanent magnets circumvent this, but then you're back to Earnshaw's theorem.

    Precision and Control: Managing the rapid release and ensuring the desired trajectory or outcome would require sophisticated control mechanisms.

While a direct, commercially ubiquitous "magnetic jack-in-a-box" might not be common, the underlying principle of storing energy in a repulsive magnetic field and then releasing it is certainly at play in various advanced technologies, and there's definitely room for creative new applications, especially as materials science and control systems continue to advance.

(th)

#17 Re: Science, Technology, and Astronomy » Magnets Magnetic Physics of » Yesterday 08:58:35

This post follows up on #21, by asking Gemini to review applications of magnetic repulsion in practice on Earth in 2025

Thank you! The review of distance physics looks good in the forum display! Now I'd like to see if we can explore the use of repulsion with magnets to achieve various significant practical objectives. The two examples I am most familiar with are magnetic trains (maglev) and warehouse applications, but there may be others. In both cases, I am NOT interested in the use of magnetic fields for attraction. These are immensely practical and are in use in myriad applications on Earth. I am interested ** only ** in repulsive applications, and the number of those must be quite small. How many examples can you find?

You've hit on a fascinating and challenging aspect of magnetism! While attraction is readily used for holding, lifting, and many direct force applications, harnessing repulsion for significant practical objectives is indeed less common due to the rapid inverse cube fall-off and the inherent instability described by Earnshaw's Theorem (which states that a static arrangement of electric charges or permanent magnets cannot be in stable equilibrium).

However, engineers and scientists have found ingenious ways to overcome these limitations, often by employing dynamic systems, feedback control, or diamagnetic materials. Here are some key examples of practical applications that primarily rely on magnetic repulsion:

    Maglev Trains (Electrodynamic Suspension - EDS):

        How it works: This is a prime example. While some maglev systems (like Transrapid, Electromagnetic Suspension - EMS) use attraction to pull the train upwards towards the guideway, Electrodynamic Suspension (EDS) systems use superconducting magnets on the train that induce currents in coils in the guideway as the train moves. By Lenz's Law, these induced currents create magnetic fields that repel the train, lifting it off the track. The repulsion also provides lateral stability, pushing the train towards the center of the guideway.

        Significance: Eliminates friction, allowing for extremely high speeds (over 500 km/h) and a smooth, quiet ride, with reduced wear and tear on components.

    Magnetic Bearings (Repulsive/Passive Magnetic Bearings):

        How it works: These bearings suspend a rotating shaft or component using magnetic forces, eliminating mechanical contact, friction, and wear. While active magnetic bearings often use feedback-controlled electromagnets for both attraction and repulsion to achieve stability, passive magnetic bearings primarily rely on the repulsive force between permanent magnets. They often require some form of mechanical constraint or additional active damping to overcome inherent instability due to Earnshaw's Theorem.

        Significance: Enables extremely high rotational speeds (hundreds of thousands of RPM), ideal for applications requiring low friction, high precision, and no lubrication, such as:

            Flywheels for energy storage: Reduced friction means less energy loss.

            High-speed centrifuges: Achieves higher speeds for separation processes.

            Turbomachinery: Improves efficiency and lifespan in turbines and compressors.

            Vacuum environments: Where traditional lubricants are problematic.

    Vibration Isolation and Damping Systems:

        How it works: Magnetic repulsion can be used to levitate sensitive equipment, isolating it from external vibrations. This can involve passive systems where magnets repel each other to create a "spring" effect, or more complex active systems with feedback. Some systems might incorporate "negative stiffness" mechanisms to enhance the isolation performance, which can leverage magnetic repulsion.

        Significance: Crucial for ultra-precise measurements, microscopy, semiconductor manufacturing, and other applications where even minute vibrations can disrupt performance.

    Non-Contact Manipulation and Levitation (e.g., in Microfluidics, Biology):

        How it works: Magnetic repulsion (often in conjunction with attractive forces or diamagnetism) can be used to precisely manipulate tiny objects, cells, or even liquids without physical contact. This is particularly valuable in sterile environments or when delicate samples need to be handled. Diamagnetic levitation, which is a form of repulsion, can levitate small amounts of diamagnetic materials (like water or even living organisms) in very strong magnetic fields.

        Significance: Emerging applications in biomedical research, lab-on-a-chip devices, and micro-assembly, where contamination or mechanical disturbance is unacceptable.

    Haptic Feedback (Emerging):

        How it works: Researchers are exploring the use of magnetic repulsion (along with attraction) to create tactile sensations for virtual reality, gaming, or remote control. By varying the strength and direction of magnetic fields, users can "feel" virtual objects or surfaces through repulsive forces applied to their hands or fingers.

        Significance: Offers a new dimension to human-computer interaction, making virtual experiences more immersive and intuitive.

Why are there "quite small" numbers of these applications?

You're right to note that the number is small compared to attractive applications. The primary reasons are:

    Earnshaw's Theorem: As mentioned, stable static levitation purely from permanent magnets is impossible. This means most practical repulsion-based levitation systems require active control, rotating fields, or the use of diamagnetic materials, adding complexity and cost.

    Rapid Force Decay: The inverse cube law means that strong repulsive forces are only effective over very short distances. Maintaining precise gaps for levitation requires tight tolerances and often active control.

    Engineering Complexity: Designing systems that reliably maintain repulsive levitation while handling dynamic loads and ensuring stability is a significant engineering challenge.

Despite these challenges, the unique benefits of magnetic repulsion – such as frictionless motion, non-contact operation, and high-speed capabilities – continue to drive research and development in these niche, but highly impactful, areas.

(th)

#18 Re: Science, Technology, and Astronomy » Magnets Magnetic Physics of » Yesterday 08:48:48

This post contains a review of the physics of magnetic field strength including an explanation of why falloff is so rapid...

Conversation with Gemini:

I'd like to post your reply in a small international forum. We use a simplified BBCode, and the equations that display so nicely in your text above will not carry over. Please recast your response in BBCode. You can enclose the equations inside code blocks if that is convenient.

Got it! I'll recast the information about gravitational and magnetic forces into BBCode, making sure the equations are enclosed in code blocks for easy display in your forum.

The Rapid Drop-Off of Magnetic Force

You're absolutely spot-on about the rapid fall-off of magnetic forces! Let's clear up the distance dependence for both gravity and magnetism.

Gravitational Force

Your impression is correct: gravitational force follows an inverse square law. This means the force of gravity between two objects is inversely proportional to the square of the distance between their centers.

Here's how it looks in an equation:

F_g = G * (m1 * m2) / r^2

Where:

    F_g is the gravitational force

    G is the gravitational constant

    m1 and m2 are the masses of the two objects

    r is the distance between their centers

So, if you double the distance (r) between two objects, the gravitational force becomes one-fourth (1/2^2) of its original strength. If you triple the distance, it becomes one-ninth (1/3^2), and so on. This decrease is relatively slow, allowing gravity to have a significant influence over vast cosmic distances.

Magnetic Force

This is where that rapid drop-off comes in, and your memory serves you well. For most practical scenarios involving permanent magnets, the magnetic force falls off much more rapidly, typically as an inverse cube law.

This happens because macroscopic magnets aren't single "magnetic charges" (magnetic monopoles haven't been definitively observed). Instead, they act as magnetic dipoles, meaning they have a North pole and a South pole. The magnetic field lines loop from one pole to the other.

The strength of the magnetic field due to a magnetic dipole decreases with distance according to an inverse cube relationship. As a result, the force between two such dipoles (which is how two magnets interact) will also follow an inverse cube law.

Here's the conceptual relationship:

F_m is proportional to 1 / r^3

So, if you double the distance between two magnets, the force between them (whether attraction or repulsion) becomes one-eighth (1/2^3) of its original strength. If you triple the distance, it becomes one-twenty-seventh (1/3^3). This explains why magnetic forces seem to drop off so quickly; they are much more localized than gravity.

Attraction and Repulsion

You're also correct in your assumption: the fall-off in strength is the same for both attraction and repulsion. The inverse cube law applies to the magnitude of the force, regardless of whether the magnets are oriented to attract or repel each other. The direction of the force simply flips.

In Summary:

    Gravitational Force: Follows an inverse square law (1/r^2). It decreases relatively slowly with distance.

    Magnetic Force (between dipoles): Follows an inverse cube law (1/r^3). It decreases much more rapidly with distance. This applies equally to both attraction and repulsion.

Your observation about the rapid fall-off of magnetic force is a fundamental characteristic of how magnetic dipoles interact. This rapid decay is why magnetic forces are primarily effective over relatively short ranges compared to gravity.

(th)

#19 Re: Meta New Mars » Topics containing the word "magnet" June 30 2025 » Yesterday 08:31:32

This post is reserved for an index to posts that may be contributed to this topic by NewMars members.

It seems highly unlikely (to me for sure) that anyone will ever post anything to this topic, but just in case:

Index:

(th)

#20 Meta New Mars » Topics containing the word "magnet" June 30 2025 » Yesterday 08:29:25

tahanson43206
Replies: 1

For SpaceNut ...

Out of curiosity, I decided to ask FluxBB how many topics we have that include the word "magnet" in the title.

The list is impressive (to me at least) but not overwhelming...

Forum     Replies     Last post
1
Electrocaloric, Elastocaloric, and Magnetocaloric Materials by kbd512
    Science, Technology, and Astronomy     1     2025-04-21 08:06:16 by tahanson43206
2
Maglev Magnetic Levitation using Permanent Magnets by tahanson43206
    Science, Technology, and Astronomy     4     2025-03-26 13:29:23 by tahanson43206
3
Magnetic Confinement Fusion by tahanson43206
    Science, Technology, and Astronomy     5     2025-03-13 08:28:18 by Calliban
4
Magnetic links for Space Elevator Chain by tahanson43206
    Interplanetary transportation     1     2025-02-26 09:40:28 by tahanson43206
5
Proton flows in the interior of the Earth, maybe a magnetic flies eye? by Void
    Science, Technology, and Astronomy     1     2025-02-26 09:25:34 by tahanson43206
6
Magnets Magnetic Physics of by tahanson43206
    Science, Technology, and Astronomy     19     2025-01-21 10:15:21 by tahanson43206
7
Electrostatic Thruster vs Magnetic Thruster by tahanson43206
    Science, Technology, and Astronomy     6     2024-11-14 05:02:02 by Calliban
8
Magnetic Launch Electromagnetic Launch Rail Gun by tahanson43206
    Science, Technology, and Astronomy     8     2024-05-17 08:01:27 by Mars_B4_Moon
9
Gravity Tractor and Magnetic Enhanced Gravity Tractor by tahanson43206
    Science, Technology, and Astronomy     21     2024-03-09 15:48:35 by tahanson43206
10
Artificial Magnetosphere - Electromagnetic Induction by RobertDyck [ 1 2 3 … 6 ]
    Terraformation     144     2022-09-07 22:21:14 by SpaceNut
11
Magnetic Bubble Scoop by Void
    Planetary transportation     2     2022-01-10 15:47:05 by Void
12
Mini magnetosphere radiation shielding for a manned mission by Quaoar [ 1 2 3 ]
    Human missions     58     2021-03-19 20:29:36 by SpaceNut
13
Electricity from Thermal Activity in Magnets by tahanson43206
    Science, Technology, and Astronomy     3     2021-03-13 11:52:24 by SpaceNut
14
Magnetic Motor by louis
    Science, Technology, and Astronomy     14     2019-03-31 18:42:57 by kbd512
15
Martian magnetic shield by karov [ 1 2 ]
    Terraformation     27     2017-05-28 18:29:37 by knightdepaix
16
Magnetoshell Airocapture by Impaler
    Interplanetary transportation     20     2016-05-20 15:45:09 by GW Johnson
17
Magnetic shoes/boots: How come NASA doesn't use them? by Tom Kalbfus [ 1 2 ]
    Human missions     32     2015-02-05 20:26:25 by JCO
18
Plasma magnetoshell areocapture and entry system by Quaoar
    Interplanetary transportation     3     2014-05-01 15:50:38 by RobertDyck
19
Mars has locally strong magnetosphere by m arvin
    Human missions     7     2014-02-20 03:34:46 by Quaoar

(th)

#21 Re: Meta New Mars » RGClark Postings » Yesterday 08:22:32

For RGClark re kbd512's SSTO topic...

The three of you (kbd512, GW Johnson and RGClark) have combined to create a topic that in my judgement is worth the time of anyone who chances upon it.

I just reread the topic from the top, and while no one ever persuades anyone of anything, the exchanges are illuminating for non-participants.

I came away inspired to wonder what the performance of various fuels would be if they were able to lift themselves to orbit without the annoying encumbrance of inert mass.  A table of performance for various fuels would show the capability of each fuel, and while actual SStO will probably never happen because of that annoying need for inert mass, it would be (or could be) inspiring to clever humans to ** try ** to find a collection of inert mass that could go along for the ride.

My guess is that it might not be too difficult for a talented person to put together a table showing performance of various fuels.  The designer of such a tool would need a tonnage of propellant to work with, so I'll toss out 100 tons as a reasonable mass to consider.  Such a table ** should ** result in numerous posts by NewMars members showing how advances in human knowledge might lead to actual success.

To make the exercise more interesting, I'd like to propose a Rule for the Game: Nothing is to be discarded on the flight.

The post productive flight would be one in which the non-fuel component is completely useful after it is delivered to orbit.

(th)

#22 Re: Meta New Mars » Calliban Postings including links to notable contributions » Yesterday 08:12:17

For Calliban re images from Sweden and Norway...

Your comments about how a Mars settlement might be created to resemble the scenes you show us caused me to imagine an LED lit sky over head. While building such a sky scape might seem expensive in 2025 terms on Earth, it might turn out to be quite affordable in the time period when Mars settlement is under way.  And such a sky would be something to behold.  It could be programmed to deliver light of various colors from a default light blue to full night black with stars faithfully reproduced based upon the actual sky above that location on the planet. 

No science fiction author that I can recall has ever had a vision that stunning, and that is probably just a reflection that science fiction writers are human beings whose imagination is influenced by their experiences on Earth in their era.

Thanks to your picture tour of Stockholm and other cities, the NewMars readers who chance across your topic will have an opportunity to stretch their imaginations beyond their existing extents.

Update:
I sent the link to a relative, and got this reply:

I was on the southern tip of Sweden for a day in 1974. I would love to visit Norway and have enjoyed watching travel programs it. I enjoyed looking at Mr. Calliban’s pictures.

(th)

#23 Re: Martian Politics and Economy » Martian Calender - I have created a martian calender... » Yesterday 06:00:18

Place holder for today's Calendar update:

[51.4797N, 0.0000E] 06/30/2025, 13:00:00 Europe/London
Object: Mars   (open sky map)
RA 10h 38m 13.6s Dec +09° 42' 29.0" Appar J2000
Mag: 1.43 (Estimated: JPL)  Const: Leo
Sun Dist: 245,182,129 km [22.4 km/s]
Earth Dist: 287,472,902 km [35.7 km/s]

Martian Year:   
38
Martian Astronomical Month:   
4
Solar longitude Ls:   
103.7
Sol number:   
224

#24 Re: Life support systems » 3D Printers » 2025-06-29 21:27:20

The article at the link below reports on development of a technique to print "glass" like structures.

https://www.msn.com/en-us/news/technolo … 3e1d&ei=20

Scientists have found a way to 3D print "glass" to create structures impossible to make with regular techniques
Story by Simon Batt • 1w • 2 min read

MIT scientists created a way to 3D print glass-like structures without extreme temperatures.
The special mixture used provides good structural integrity and diverse design possibilities.
Researchers are focused on enhancing the optical clarity of the glass for various applications.
I think it's the dream of every 3D printer enthusiast to gain the ability to 3D print anything they want. Want a new computer? Perhaps a new house? Maybe a steak dinner? Get it 3D printed. Of course, we are decades away from having everything at the end of a 3D printer's nozzle, but we're making some excellent progress.

For example, take these scientists that managed to figure out a medium that allows people to 3D print something that looks and feels very much like glass. And while it may not be 100% the 'real deal', its unique circumstances allow people to create glass structures that could otherwise not exist.

Researchers from MIT figure out how to 3D print glass-like structures

3d print glass process-1

As spotted by Hackaday, scientists from the Massachussets Institute of Technology (MIT) created a post on the Lincoln Laboratory website describing what they've achieved with their latest research. As the researchers explain, they're very interested in getting 3D printers to create glass structures; however, it turns out the process is a lot trickier than simply stuffing a mixture into your printer's nozzle:

Using inorganic composite glasses solves many of the instability issues and offers a promising approach to create structures with diverse shapes and properties. However, the high temperatures (greater than 1,000°C) typically used to sinter (harden) glass items have hindered the use of glass in 3D printing. High-temperature processing requires specialized equipment and is incompatible with temperature-sensitive materials and components.

The solution was to combine sodium silicate (also known as "water glass") with "nanoparticles of other inorganics" to create a similar glass-like effect but without all of the issues with blasting stuff at over 1,000°C. In fact, the researchers managed to get results by heating it to 250°C, which is far more manageable for a 3D printing system.

Right now, the researchers note that using this special mixture allows them to 3D print designs that you can't achieve with typical glass-making techniques. The mixture also has good structural integrity, withstands heat well, and doesn't shrink too badly. However, the researchers aren't done yet; they're hard at work finding the perfect combination to improve the "optical clarity" of the glass, as well as discovering different inks that respond to chemicals and electricity in different ways for a range of applications.

So, it may be a while until you can drink out of the glass stein you just 3D printed, but honestly, if this discovery makes it to market, I can see it being a huge boon for hobbyists. It doesn't seem that the materials and equipment needed to make 3D printed glass structures are that unobtainable for someone passionate about their project. While we wait, check out these methods of finding new projects to print.

(th)

#25 Re: Science, Technology, and Astronomy » Computer Technology Compatibility Upgrades Cross Generations » 2025-06-29 20:29:26

Here is a bit of the biography of MZ from Wikipedia:

Mark Zbikowski

From Wikipedia, the free encyclopedia
Mark Zbikowski

Born    March 21, 1956 (age 69)
Detroit, Michigan

Nationality    American
Alma mater    Harvard University

Yale University

Known for    DOS MZ executable

Work at Microsoft

Mark "Zibo" Joseph Zbikowski (born March 21, 1956) is a former Microsoft Architect and an early computer hacker. He started working at the company only a few years after its inception, leading efforts in MS-DOS, OS/2, Cairo and Windows NT. In 2006, he was honored for 25 years of service with the company, the third employee to reach this milestone, after Bill Gates and Steve Ballmer. He retired the same year from Microsoft.

He was the designer of the MS-DOS executable file format, and the headers of that file format start with his initials: the ASCII characters 'MZ' (0x4D, 0x5A).[1]

Early years
Zbikowski was born in Detroit, Michigan, in 1956. While attending The Roeper School (then known as Roeper City And Country School) from 1961 to 1974, he developed an interest in mathematics and computers. His 8th-grade performance in the Michigan Mathematics Prize Competition led to an invitation in an NSF-funded summer program at Oakland University where he became friends with Microsoft's Steve Ballmer and Jeff Sachs. He later finished second in the MMPC twice in 1972-73 and 1973-74.

Zbikowski pursued computer science at Harvard (A.B. 1978) and at Yale (S.M. 1979).[2] He was active in both universities' Gilbert and Sullivan performing groups.[3]

(th)

Board footer

Powered by FluxBB