@tubular/astronomy
Version:
Astronomical calculations for planetary positions, moon phases, eclipses, rise, transit, and set times, and more.
102 lines • 4.01 kB
TypeScript
import { SphericalPosition } from '@tubular/math';
import { IAstroDataService } from './i-astro-data.service';
import { ISkyObserver } from './i-sky-observer';
export interface StarInfo {
bayerRank: number;
bscNum: number;
catalogIndex: number;
flamsteed: number;
codedName: string;
constellation: number;
DE: number;
duplicateName: boolean;
fk5Num: number;
hipNum: number;
messierNum: number;
name: string;
ngcIcNum: number;
pmDE: number;
pmRA: number;
RA: number;
subIndex: number;
vmag: number;
}
export interface ConstellationInfo {
index: number;
name: string;
code: string;
starList: number[];
}
export declare const LINE_BREAK = -1;
export declare const LABEL_ANCHOR = -2;
export declare class StarCatalog {
static readonly greekIndices: string[];
static readonly constellationCodes: string[];
static readonly ECLIPTIC = 2147483648;
static readonly kappa: number;
private bscLookup;
private cachedPositions;
private constellations;
private ecliptic;
private fk5Lookup;
private hipLookup;
private messierLookup;
private ngcIcLookup;
private nameLookup;
private properlyInitialized;
private starNames;
private sunCacheTime;
private sunLongitudeCache;
private stars;
private static createCodedName;
constructor(dataSource: Buffer | IAstroDataService | string, readyCallback?: (initialized: boolean) => void);
private readStarData;
isProperlyInitialized(): boolean;
getStarCount(): number;
getStarInfo(starIndex: number): StarInfo;
getStarByName(name: string): StarInfo;
getBrightStarCatalogStar(num: number): StarInfo;
getFk5Star(num: number): StarInfo;
getHipparcosStar(num: number): StarInfo;
getName(starIndex: number, skipDuplicates?: boolean): string;
getCodedName(starIndex: number): string;
getExpandedName(starIndex: number): string;
getMagnitude(starIndex: number): number;
getFK5Number(starIndex: number): number;
getBSCNumber(starIndex: number): number;
forEach(callback: (star: StarInfo, index?: number) => boolean | void): void;
isDeepSkyObject(starIndex: number): boolean;
getMessierNumber(starIndex: number): number;
getDsoByMessierNumber(mn: number): StarInfo;
/** @deprecated */
getNGCNumber(n: number): number;
getNgcNumber(starIndex: number): number;
getDsoByNgcNumber(ngc: number): StarInfo;
/** @deprecated */
getICNumber(n: number): number;
getIcNumber(starIndex: number): number;
getDsoByIcNumber(ic: number): StarInfo;
getBayerRank(starIndex: number): number;
getConstellationOfStar(starIndex: number): number;
getConstellationCount(): number;
/**
* @deprecated - Uses 0-based indexing, inconsistent with 1-based constellation codes
* */
getConstellationName(constellationIndex: number): string;
constellationName(constellationIndex: number): string;
/**
* @deprecated - Uses 0-based indexing, inconsistent with 1-based constellation codes
* */
getConstellationCode(constellationIndex: number): string;
constellationCode(constellationIndex: number): string;
/**
* @deprecated - Uses 0-based indexing, inconsistent with 1-based constellation codes
* */
getConstellationDrawingStars(constellationIndex: number): number[];
constellationDrawingStars(constellationIndex: number): number[];
forEachConstellation(callback: (constellation: ConstellationInfo, index?: number) => boolean | void): void;
getEquatorialPosition(starIndex: number, time_JDE: number, cacheTolerance?: number, flags?: number): SphericalPosition;
getEclipticPosition(starIndex: number, time_JDE: number, cacheTolerance?: number, flags?: number): SphericalPosition;
getHorizontalPosition(starIndex: number, time_JDU: number, observer: ISkyObserver, cacheTolerance?: number, flags?: number): SphericalPosition;
}
//# sourceMappingURL=star-catalog.d.ts.map