module
loosh-industries /

loosh.dev/orbit

sha256:804277427a7b·v0.0.1·831 B·2 layers
$cue mod get loosh.dev/orbit@v0.0.1
$oras pull registry.platform.loosh.cloud/loosh-industries/loosh.dev/orbit:v0.0.1
content-addressed · immutable
digest
sha256:804277427a7b4b8494760af29d875ab231f4be319b55f0cd1a9590743d6b7b74
media type
application/vnd.oci.image.manifest.v1+json
config
sha256:44136fa355b3 · 2 B
total size
831 B · 2 layers
loosh.dev/orbit@v0
  • #Body struct Body is a tracked celestial body — or an artifact caught in the well.
  • #Kind disjunction Kind enumerates what a body can be.
  • #Orbit struct Orbit holds the Keplerian elements of a body around a well.
CUE source
cue.mod/module.cue
module: "loosh.dev/orbit@v0"
language: {
	version: "v0.16.1"
}
source: {
	kind: "self"
}
orbit.cue
// Package orbit describes bodies tracked by the loosh platform and the
// gravitational wells they fall into.
package orbit

// Body is a tracked celestial body — or an artifact caught in the well.
#Body: {
	name!:   string
	kind!:   #Kind
	mass!:   float & >0 // kilograms
	radius!: float & >0 // meters
}

// Kind enumerates what a body can be.
#Kind: "star" | "planet" | "moon" | "artifact"

// Orbit holds the Keplerian elements of a body around a well.
#Orbit: {
	semiMajorAxis!: float & >0       // meters
	eccentricity!:  float & >=0 & <1 // 0 = circular
	inclination:    float | *0.0     // degrees
	epoch?:         string           // RFC 3339
}
1 reference point here