Exploring a Computational Orbital Model (NKTg Law) and Its Software Simulation

I would like to share an exploration I’ve been working on that blends mathematical modeling with software simulation. It’s not directly about blockchain, but it’s a good technical exercise in computational modeling, numerical precision, and software architecture — topics that often come up in smart contract and off-chain computation contexts.

Background

I’m experimenting with a model where a certain quantity remains constant throughout orbital motion, inspired by what I call the NKTg Law.
The key mathematical relationship is:

p = m * v
C = x * p

From this we derive the orbital velocity as:

v = C / (x * m)

Here:

x is the orbital distance

v is the velocity

m is the mass

p is momentum

C is a constant parameter

This model allows reconstructing velocity values from position values and a constant C, instead of using force-based gravity equations.

Application Example: Mercury

To test the model numerically, I used real reference positions for Mercury and computed reconstructed velocity values. A relative error compared to reference data was derived to evaluate the model’s precision.

Go Implementation

Here is a simple Go program that implements the model and produces output for a set of position inputs:

package main

import (
“fmt”
)

// MercuryData holds inputs for a single data point
type MercuryData struct {
Date string
X float64
VNASA float64
}

func computeVelocity(C, x, m float64) float64 {
return C / (x * m)
}

func computeRelativeError(vModel, vNASA float64) float64 {
return (vModel - vNASA) / vNASA * 100
}

func main() {
C := 8.90e38
mass := 3.301e23

dataSet := []MercuryData{
    {"1/1/2025", 5.16e10, 53400},
    {"4/1/2025", 6.97e10, 38900},
    {"7/1/2025", 5.49e10, 50400},
    {"10/1/2025", 6.83e10, 39800},
    {"12/31/2025", 4.61e10, 58900},
}

fmt.Println("NKTg Law Orbit Simulation in Go")
fmt.Println("--------------------------------------------------")
for _, d := range dataSet {
    vModel := computeVelocity(C, d.X, mass)
    relErr := computeRelativeError(vModel, d.VNASA)

    fmt.Printf("Date: %s\n", d.Date)
    fmt.Printf("Computed Velocity: %g m/s\n", vModel)
    fmt.Printf("Reference Velocity: %g m/s\n", d.VNASA)
    fmt.Printf("Relative Error: %.2f%%\n", relErr)
    fmt.Println("--------------------------------------------------")
}

}
Discussion Points

I’d love to hear feedback on:

Numerical computing considerations — especially handling very large constants and floating-point precision.

Software architecture — how to structure a simulation engine for extensibility (e.g., multi-body systems).

Potential connections between off-chain computation and models like this — for example preparing simulation data for on-chain use or verification.

Thanks in advance!