diff --git a/dist/src/api_codes.d.ts b/dist/src/api_codes.d.ts index 49310887..814fa6b2 100644 --- a/dist/src/api_codes.d.ts +++ b/dist/src/api_codes.d.ts @@ -5,6 +5,7 @@ export function wideangleURL(IP: string): string; export function telephotoURL(IP: string): string; export function rawPreviewURL(IP: string): string; export function utcURL(IP: string): string; +export function timeZoneURL(IP: string): string; export const turnOnCameraCmd: 10000; export const turnOffCameraCmd: 10017; export const telephotoCamera: 0; @@ -63,6 +64,7 @@ export const statusWorkingStateTelephotoCmd: 10022; export const statusWideangleCmd: 10217; export const calibrateGotoCmd: 11205; export const startGotoCmd: 11203; +export const stopGotoCmd: 11204; export namespace planetsValueId { let Mercury: number; let Venus: number; @@ -98,6 +100,7 @@ export const rawPreviewSingleComposite: 2; export const takeAstroDarkFramesCmd: 10026; export const darkGainDefault: 65528; export const queryShotFieldCmd: 10027; +export const astroAutofocusCmd: 10031; export const traceInitCmd: 11200; export const startTrackingCmd: 11201; export const stopTrackingCmd: 11202; diff --git a/dist/src/api_codes.d.ts.map b/dist/src/api_codes.d.ts.map index 64a6b026..dfe7d1fb 100644 --- a/dist/src/api_codes.d.ts.map +++ b/dist/src/api_codes.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"api_codes.d.ts","sourceRoot":"","sources":["../../src/api_codes.js"],"names":[],"mappings":"AAAA,wBAAwB;AAGxB,qCAAsC;AAM/B,0BAHI,MAAM,GACJ,MAAM,CAE2B;AAMvC,iCAHI,MAAM,GACJ,MAAM,CAEgD;AAM5D,iCAHI,MAAM,GACJ,MAAM,CAE+C;AAM3D,kCAHI,MAAM,GACJ,MAAM,CAE+C;AAM3D,2BAHI,MAAM,GACJ,MAAM,CAEyC;AAO5D,oCAAqC;AACrC,qCAAsC;AAEtC,gCAAiC;AACjC,gCAAiC;AAEjC,wCAAyC;AAOzC,iCAAkC;AAClC,gCAAiC;AACjC,gCAAiC;AAGjC,sCAAuC;AACvC,qCAAsC;AAGtC,sCAAuC;AACvC,qCAAsC;AAMtC,yBAA0B;AAC1B,2BAA4B;AAG5B,0CAA2C;AAG3C,wCAAyC;AAGzC,0CAA2C;AAG3C,mCAAoC;AAGpC,yCAA0C;AAG1C,uCAAwC;AACxC,wCAAyC;AACzC,0CAA2C;AAC3C,0CAA2C;AAG3C,mCAAoC;AACpC,oCAAqC;AAGrC,iCAAkC;AAClC,gCAAiC;AACjC,8BAA+B;AAG/B,2CAA4C;AAC5C,6CAA8C;AAC9C;;;;;;;;EAQE;AACF;;;;;;;;EAQE;AACF,4CAA6C;AAG7C,6BAA8B;AAC9B,sBAAuB;AACvB,uBAAwB;AAOxB,uCAAwC;AACxC,yCAA0C;AAC1C,mDAAoD;AAGpD,uCAAwC;AAOxC,qCAAsC;AACtC,iCAAkC;;;;;;;;;;;AAalC;;;;;;;;;EASE;AAGF,sCAAuC;AACvC,sCAAuC;AAEvC,2BAA4B;AAC5B,2BAA4B;AAE5B,yBAA0B;AAC1B,yBAA0B;AAE1B,uCAAwC;AACxC,6CAA8C;AAG9C,qCAAsC;AACtC,+CAAgD;AAChD,mCAAoC;AACpC,0CAA2C;AAG3C,2CAA4C;AAC5C,oCAAqC;AAGrC,sCAAuC;AAMvC,iCAAkC;AAClC,qCAAsC;AACtC,oCAAqC;AAMrC,iCAAkC;AAClC,gCAAiC;AAMjC,mCAAoC;AACpC,gCAAiC;AACjC,2BAA4B;AAE5B,kCAAmC;AAEnC,gCAAiC;AACjC,gCAAiC;AACjC,gCAAiC;AAEjC,oCAAqC;AACrC,8BAA+B;AAC/B,0BAA2B;AAE3B,oCAAqC;AAErC,0BAA2B;AAC3B,2BAA4B;AAM5B,oCAAqC;AAMrC,qCAAsC;AACtC,wCAAyC;AAMzC,4CAA6C;AAC7C,2CAA4C;AAM5C,gCAAiC"} \ No newline at end of file +{"version":3,"file":"api_codes.d.ts","sourceRoot":"","sources":["../../src/api_codes.js"],"names":[],"mappings":"AAAA,wBAAwB;AAGxB,qCAAsC;AAM/B,0BAHI,MAAM,GACJ,MAAM,CA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ACpC,gCAAiC;AACjC,2BAA4B;AAE5B,kCAAmC;AAEnC,gCAAiC;AACjC,gCAAiC;AACjC,gCAAiC;AAEjC,oCAAqC;AACrC,8BAA+B;AAC/B,0BAA2B;AAE3B,oCAAqC;AAErC,0BAA2B;AAC3B,2BAA4B;AAM5B,oCAAqC;AAMrC,qCAAsC;AACtC,wCAAyC;AAMzC,4CAA6C;AAC7C,2CAA4C;AAM5C,gCAAiC"} \ No newline at end of file diff --git a/dist/src/api_codes.js b/dist/src/api_codes.js index 471132f6..5fe22470 100644 --- a/dist/src/api_codes.js +++ b/dist/src/api_codes.js @@ -26,6 +26,11 @@ export const rawPreviewURL = (IP) => `http://${IP}:8092/rawstream`; * @returns {string} */ export const utcURL = (IP) => `http://${IP}:8092/date?date=`; +/** + * @param {string} IP + * @returns {string} + */ +export const timeZoneURL = (IP) => `http://${IP}:8092/timezone?timezone=`; // =============== // 3.1 image transmission // =============== @@ -116,6 +121,7 @@ export const statusWideangleCmd = 10217; // goto export const calibrateGotoCmd = 11205; export const startGotoCmd = 11203; +export const stopGotoCmd = 11204; export const planetsValueId = { Mercury: 0, Venus: 1, @@ -155,6 +161,8 @@ export const takeAstroDarkFramesCmd = 10026; export const darkGainDefault = 65528; // query shot field export const queryShotFieldCmd = 10027; +// astro Autofocus +export const astroAutofocusCmd = 10031; // =============== // 4.2 tracking // =============== diff --git a/dist/src/astro.d.ts b/dist/src/astro.d.ts index 32114c26..8f2a36d5 100644 --- a/dist/src/astro.d.ts +++ b/dist/src/astro.d.ts @@ -4,6 +4,13 @@ * @returns {string} */ export function formatUtcUrl(IP: string): string; +/** + * 4.1.1bis TimeZone name (Not Documented) + * @param {string} IP + * @param {string} timezone + * @returns {string} + */ +export function formatTimeZoneUrl(IP: string, timezone: string): string; /** * 4.1.2 correction * @param {number} latitude @@ -13,14 +20,19 @@ export function formatUtcUrl(IP: string): string; export function calibrateGoto(latitude: number, longitude: number): any; /** * 4.1.3 Start goto - * @param {number|null} planet - * @param {string} rightAscension - * @param {string} declination + * @param {number|null|undefined} planet + * @param {number} rightAscension + * @param {number} declination * @param {number} latitude * @param {number} longitude * @returns {Object} */ -export function startGoto(planet: number | null, rightAscension: string, declination: string, latitude: number, longitude: number): any; +export function startGoto(planet: number | null | undefined, rightAscension: number, declination: number, latitude: number, longitude: number): any; +/** + * 4.1.3bis Stop goto (Not documented) + * @returns {Object} + */ +export function stopGoto(): any; /** * 4.1.4 Take raw pictures * @param {string} rightAscension @@ -60,4 +72,9 @@ export function takeAstroDarks(binning: number, exposure: number, count?: number * @returns {Object} */ export function queryShotField(binning: number): any; +/** + * 4.1.12 Astro Autofocus + * @returns {Object} + */ +export function astroAutofocus(): any; //# sourceMappingURL=astro.d.ts.map \ No newline at end of file diff --git a/dist/src/astro.d.ts.map b/dist/src/astro.d.ts.map index 6f5024e2..f9f1f032 100644 --- a/dist/src/astro.d.ts.map +++ b/dist/src/astro.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"astro.d.ts","sourceRoot":"","sources":["../../src/astro.js"],"names":[],"mappings":"AAmBA;;;;GAIG;AACH,iCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;GAKG;AACH,wCAJW,MAAM,aACN,MAAM,OAahB;AAED;;;;;;;;GAQG;AACH,kCAPW,MAAM,GAAC,IAAI,kBACX,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,OA0BhB;AAED;;;;;;;;;;;GAWG;AACH,+CAVW,MAAM,eACN,MAAM,gBACN,MAAM,QACN,MAAM,YACN,MAAM,UACN,MAAM,eACN,MAAM,aACN,MAAM,OA4BhB;AAED;;;GAGG;AACH,sCAKC;AAED;;;;GAIG;AACH,gDAHW,MAAM,OAehB;AAGD;;;;;;;GAOG;AACH,wCANW,MAAM,YACN,MAAM,UACN,MAAM,aACN,MAAM,OAmBhB;AAED;;;;GAIG;AACH,wCAHW,MAAM,OAUhB"} \ No newline at end of file +{"version":3,"file":"astro.d.ts","sourceRoot":"","sources":["../../src/astro.js"],"names":[],"mappings":"AAuBA;;;;GAIG;AACH,iCAHW,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;GAKG;AACH,sCAJW,MAAM,YACN,MAAM,GACJ,MAAM,CAIlB;AAED;;;;;GAKG;AACH,wCAJW,MAAM,aACN,MAAM,OAahB;AAED;;;;;;;;GAQG;AACH,kCAPW,MAAM,GAAC,IAAI,GAAC,SAAS,kBACrB,MAAM,eACN,MAAM,YACN,MAAM,aACN,MAAM,OA4BhB;AAED;;;GAGG;AACH,gCAMC;AAED;;;;;;;;;;;GAWG;AACH,+CAVW,MAAM,eACN,MAAM,gBACN,MAAM,QACN,MAAM,YACN,MAAM,UACN,MAAM,eACN,MAAM,aACN,MAAM,OA4BhB;AAED;;;GAGG;AACH,sCAMC;AAED;;;;GAIG;AACH,gDAHW,MAAM,OAehB;AAGD;;;;;;;GAOG;AACH,wCANW,MAAM,YACN,MAAM,UACN,MAAM,aACN,MAAM,OAmBhB;AAED;;;;GAIG;AACH,wCAHW,MAAM,OAUhB;AAED;;;GAGG;AACH,sCAMC"} \ No newline at end of file diff --git a/dist/src/astro.js b/dist/src/astro.js index aae54a74..25add88e 100644 --- a/dist/src/astro.js +++ b/dist/src/astro.js @@ -1,6 +1,6 @@ /** @module astro */ -import { telephotoCamera, calibrateGotoCmd, startGotoCmd, binning2x2, fileTiff, takeAstroPhotoCmd, takeAstroDarkFramesCmd, darkGainDefault, utcURL, stopAstroPhotoCmd, rawPreviewContinousSuperimpose, queryShotFieldCmd, setRAWPreviewCmd, } from "./api_codes.js"; -import { nowUTC, nowLocal, nowLocalFileName } from "./api_utils.js"; +import { telephotoCamera, calibrateGotoCmd, startGotoCmd, stopGotoCmd, binning2x2, fileTiff, takeAstroPhotoCmd, takeAstroDarkFramesCmd, darkGainDefault, utcURL, timeZoneURL, stopAstroPhotoCmd, rawPreviewContinousSuperimpose, queryShotFieldCmd, astroAutofocusCmd, setRAWPreviewCmd, } from "./api_codes.js"; +import { nowUTC, nowLocalFileName } from "./api_utils.js"; /** * 4.1.1 UTC+0 time * @param {string} IP @@ -9,6 +9,15 @@ import { nowUTC, nowLocal, nowLocalFileName } from "./api_utils.js"; export function formatUtcUrl(IP) { return `${utcURL(IP)}${nowUTC()}`; } +/** + * 4.1.1bis TimeZone name (Not Documented) + * @param {string} IP + * @param {string} timezone + * @returns {string} + */ +export function formatTimeZoneUrl(IP, timezone) { + return `${timeZoneURL(IP)}${timezone}`; +} /** * 4.1.2 correction * @param {number} latitude @@ -21,16 +30,16 @@ export function calibrateGoto(latitude, longitude) { camId: telephotoCamera, lon: longitude, lat: latitude, - date: nowLocal(), + date: nowUTC(), path: `DWARF_GOTO_${nowLocalFileName()}`, }; return options; } /** * 4.1.3 Start goto - * @param {number|null} planet - * @param {string} rightAscension - * @param {string} declination + * @param {number|null|undefined} planet + * @param {number} rightAscension + * @param {number} declination * @param {number} latitude * @param {number} longitude * @returns {Object} @@ -41,11 +50,13 @@ export function startGoto(planet, rightAscension, declination, latitude, longitu camId: telephotoCamera, lon: longitude, lat: latitude, - date: nowLocal(), + date: nowUTC(), path: `DWARF_GOTO_${nowLocalFileName()}`, }; if (planet !== undefined && planet !== null) { options.planet = planet; + options.ra = 0.0; + options.dec = 0.0; } else { options.ra = rightAscension; @@ -53,6 +64,17 @@ export function startGoto(planet, rightAscension, declination, latitude, longitu } return options; } +/** + * 4.1.3bis Stop goto (Not documented) + * @returns {Object} + */ +export function stopGoto() { + const options = { + interface: stopGotoCmd, + camId: telephotoCamera, + }; + return options; +} /** * 4.1.4 Take raw pictures * @param {string} rightAscension @@ -89,6 +111,7 @@ export function takeAstroPhoto(rightAscension, declination, exposureTime, gain, export function stopAstroPhoto() { const options = { interface: stopAstroPhotoCmd, + camId: telephotoCamera, }; return options; } @@ -142,3 +165,14 @@ export function queryShotField(binning) { }; return options; } +/** + * 4.1.12 Astro Autofocus + * @returns {Object} + */ +export function astroAutofocus() { + const options = { + interface: astroAutofocusCmd, + camId: telephotoCamera, + }; + return options; +} diff --git a/docs/api_codes.js.html b/docs/api_codes.js.html index 434055c8..93f4fe8e 100644 --- a/docs/api_codes.js.html +++ b/docs/api_codes.js.html @@ -31,7 +31,7 @@ -
| Name | + + +Type | + + + + + +Description | +
|---|---|---|
IP |
+
+
+ + + +string + + + + + | + + + + + ++ |
timezone |
+
+
+ + + +string + + + + + | + + + + + ++ |