Documentation / @interstellar-tools/equations / galactocentricVelocity
Function: galactocentricVelocity()
function galactocentricVelocity(
direction: GalacticDirectionInterface,
distance: DistanceInterface,
motion: ObservedMotionInterface,
options?: GalactocentricVelocityOptionsInterface
): VelocityInterface;Defined in: galactic/galactocentric-velocity.ts:99
The velocity around the Milky Way's centre of something seen from the Sun, in km/s, in the 'galactocentric' frame: from its direction, distance and motion, as GALAXIES in @interstellar-tools/constants gives them.
With
It's turned into galactic coordinates, tilted into the frame's axes as galactocentricPosition does, and the Sun's own velocity is added.
Notes
- It matches Astropy's
Galactocentricframe to about 0.01 km/s, given the same Sun. - Where the proper motion isn't measured, as for M87 and Centaurus A, it's taken as 0, so only the motion along the line of sight counts. At their distances, a sideways speed of hundreds of km/s is a few µas/yr, too small to measure yet.
- A proper motion of 10 µas/yr is 36 km/s at Andromeda's distance: its sideways speed is uncertain by about 40 km/s.
Parameters
| Parameter | Type | Description |
|---|---|---|
direction | GalacticDirectionInterface | The direction from the Sun, in galactic coordinates. |
distance | DistanceInterface | The distance from the Sun. |
motion | ObservedMotionInterface | The radial velocity in km/s and, where measured, the proper motion in mas/yr. |
options? | GalactocentricVelocityOptionsInterface | The Sun's place and velocity, if not the defaults. |
Returns
The velocity in the 'galactocentric' frame, in km/s.
Throws
If the direction, distance or motion isn't finite, b is outside −90° to 90°, the distance is negative, or the Sun's height isn't less than its distance from the centre.
Example
import { GALAXIES } from '@interstellar-tools/constants';
const andromeda = GALAXIES.find((galaxy) => galaxy.id === 'andromeda')!;
const v = galactocentricVelocity(
andromeda.direction!,
andromeda.distance,
andromeda.motion!
); // { frame: 'galactocentric', x: 37.11, y: -119.81, z: -10.86 }See
galactocentricPosition, for where it is.