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,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;AAMrD,gCAHI,MAAM,GACJ,MAAM,CAEsD;AAOzE,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;AAClC,gCAAiC;;;;;;;;;;;AAajC;;;;;;;;;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;AAGvC,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 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 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -82,6 +82,12 @@

api_codes.js

*/ 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 // =============== @@ -196,6 +202,7 @@

api_codes.js

// goto export const calibrateGotoCmd = 11205; export const startGotoCmd = 11203; +export const stopGotoCmd = 11204; export const planetsValueId = { Mercury: 0, @@ -245,6 +252,9 @@

api_codes.js

// query shot field export const queryShotFieldCmd = 10027; +// astro Autofocus +export const astroAutofocusCmd = 10031; + // =============== // 4.2 tracking // =============== @@ -322,7 +332,7 @@

api_codes.js


diff --git a/docs/api_utils.js.html b/docs/api_utils.js.html index e4c4e2ab..f09c5232 100644 --- a/docs/api_utils.js.html +++ b/docs/api_utils.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -121,7 +121,7 @@

api_utils.js


diff --git a/docs/astro.js.html b/docs/astro.js.html index 268d07b0..226a4a03 100644 --- a/docs/astro.js.html +++ b/docs/astro.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -53,18 +53,22 @@

astro.js

telephotoCamera, calibrateGotoCmd, startGotoCmd, + stopGotoCmd, binning2x2, fileTiff, takeAstroPhotoCmd, takeAstroDarkFramesCmd, darkGainDefault, utcURL, + timeZoneURL, stopAstroPhotoCmd, rawPreviewContinousSuperimpose, queryShotFieldCmd, + astroAutofocusCmd, setRAWPreviewCmd, } from "./api_codes.js"; -import { nowUTC, nowLocal, nowLocalFileName } from "./api_utils.js"; + +import { nowUTC, nowLocalFileName } from "./api_utils.js"; /** * 4.1.1 UTC+0 time @@ -75,6 +79,16 @@

astro.js

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 @@ -87,7 +101,7 @@

astro.js

camId: telephotoCamera, lon: longitude, lat: latitude, - date: nowLocal(), + date: nowUTC(), path: `DWARF_GOTO_${nowLocalFileName()}`, }; return options; @@ -95,9 +109,9 @@

astro.js

/** * 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} @@ -114,12 +128,14 @@

astro.js

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; options.dec = declination; @@ -127,6 +143,18 @@

astro.js

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 @@ -173,6 +201,7 @@

astro.js

export function stopAstroPhoto() { const options = { interface: stopAstroPhotoCmd, + camId: telephotoCamera, }; return options; } @@ -236,6 +265,18 @@

astro.js

}; return options; } + +/** + * 4.1.12 Astro Autofocus + * @returns {Object} + */ +export function astroAutofocus() { + const options = { + interface: astroAutofocusCmd, + camId: telephotoCamera, + }; + return options; +} @@ -250,7 +291,7 @@

astro.js


diff --git a/docs/camera_settings.js.html b/docs/camera_settings.js.html index 61f944f3..da69c916 100644 --- a/docs/camera_settings.js.html +++ b/docs/camera_settings.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -111,7 +111,7 @@

camera_settings.js


diff --git a/docs/image_transmission.js.html b/docs/image_transmission.js.html index 99dd1697..38ca129c 100644 --- a/docs/image_transmission.js.html +++ b/docs/image_transmission.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -109,7 +109,7 @@

image_transmission.js


diff --git a/docs/index.html b/docs/index.html index 0ad42e96..4bfb0d01 100644 --- a/docs/index.html +++ b/docs/index.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -146,7 +146,7 @@

Usage


diff --git a/docs/module-api_codes.html b/docs/module-api_codes.html index e24eb961..af02ba18 100644 --- a/docs/module-api_codes.html +++ b/docs/module-api_codes.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -219,6 +219,66 @@

(static, constant) timeZoneURL

+ + + + + +
+ + + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + @@ -445,7 +505,7 @@

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-api_utils.html b/docs/module-api_utils.html index 18f38bfc..c90e695d 100644 --- a/docs/module-api_utils.html +++ b/docs/module-api_utils.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -726,7 +726,7 @@
Parameters:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-astro.html b/docs/module-astro.html index 4d53750c..a800f810 100644 --- a/docs/module-astro.html +++ b/docs/module-astro.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -130,6 +130,110 @@

Methods

+

(static) astroAutofocus() → {Object}

+ + + + + + +
+ +
Description:
+
  • 4.1.12 Astro Autofocus
+ + + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Object + + + +
+
+ + + + + + + + + +

(static) calibrateGoto(latitude, longitude) → {Object}

@@ -146,7 +250,7 @@

Source:
@@ -308,6 +412,184 @@
Returns:
+

(static) formatTimeZoneUrl(IP, timezone) → {string}

+ + + + + + +
+ +
Description:
+
  • 4.1.1bis TimeZone name (Not Documented)
+ + + +
Source:
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + + + + + + + + + + +
Parameters:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
NameTypeDescription
IP + + +string + + + + +
timezone + + +string + + + + +
+ + + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +string + + + +
+
+ + + + + + + + + +

(static) formatUtcUrl(IP) → {string}

@@ -324,7 +606,7 @@

Source:
@@ -478,7 +760,7 @@

Source:
@@ -632,7 +914,7 @@

Source:
@@ -714,6 +996,9 @@
Parameters:
| null +| + +undefined @@ -737,7 +1022,7 @@
Parameters:
-string +number @@ -761,7 +1046,7 @@
Parameters:
-string +number @@ -885,7 +1170,111 @@

Source:
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
Returns:
+ + + + +
+
+ Type +
+
+ +Object + + + +
+
+ + + + + + + + + + +

(static) stopGoto() → {Object}

+ + + + + + +
+ +
Description:
+
+ + + +
Source:
+
@@ -989,7 +1378,7 @@

Source:
@@ -1215,7 +1604,7 @@

Source:
@@ -1537,7 +1926,7 @@

Source:
@@ -1690,7 +2079,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-camera_settings.html b/docs/module-camera_settings.html index c2246a76..4881725f 100644 --- a/docs/module-camera_settings.html +++ b/docs/module-camera_settings.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -558,7 +558,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-image_transmission.html b/docs/module-image_transmission.html index 60e18508..86926b07 100644 --- a/docs/module-image_transmission.html +++ b/docs/module-image_transmission.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -631,7 +631,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-motion_control.html b/docs/module-motion_control.html index cd5ec152..6dfe130b 100644 --- a/docs/module-motion_control.html +++ b/docs/module-motion_control.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -1203,7 +1203,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-panoramic.html b/docs/module-panoramic.html index f1949845..d6446990 100644 --- a/docs/module-panoramic.html +++ b/docs/module-panoramic.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -619,7 +619,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-photo_video.html b/docs/module-photo_video.html index 2ba94590..a8415168 100644 --- a/docs/module-photo_video.html +++ b/docs/module-photo_video.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -935,7 +935,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-set_isp_settings.html b/docs/module-set_isp_settings.html index 7096628b..cce0ac56 100644 --- a/docs/module-set_isp_settings.html +++ b/docs/module-set_isp_settings.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -2637,7 +2637,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-system_settings.html b/docs/module-system_settings.html index 9e2acd32..1ba6624b 100644 --- a/docs/module-system_settings.html +++ b/docs/module-system_settings.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -249,7 +249,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/module-tracking.html b/docs/module-tracking.html index 15bad18e..78b9c9d9 100644 --- a/docs/module-tracking.html +++ b/docs/module-tracking.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -579,7 +579,7 @@
Returns:

- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/motion_control.js.html b/docs/motion_control.js.html index 4156dca0..5930de07 100644 --- a/docs/motion_control.js.html +++ b/docs/motion_control.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -184,7 +184,7 @@

motion_control.js


- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/panoramic.js.html b/docs/panoramic.js.html index ea359ef9..c2a2b58d 100644 --- a/docs/panoramic.js.html +++ b/docs/panoramic.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -123,7 +123,7 @@

panoramic.js


- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/photo_video.js.html b/docs/photo_video.js.html index 5552036d..2d3dcd2b 100644 --- a/docs/photo_video.js.html +++ b/docs/photo_video.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -158,7 +158,7 @@

photo_video.js


- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/set_isp_settings.js.html b/docs/set_isp_settings.js.html index ffda1ed1..19a42696 100644 --- a/docs/set_isp_settings.js.html +++ b/docs/set_isp_settings.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -324,7 +324,7 @@

set_isp_settings.js


- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/system_settings.js.html b/docs/system_settings.js.html index 9c9a4e6e..f2f5548f 100644 --- a/docs/system_settings.js.html +++ b/docs/system_settings.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -75,7 +75,7 @@

system_settings.js


- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/docs/tracking.js.html b/docs/tracking.js.html index 556d4997..269e9bdd 100644 --- a/docs/tracking.js.html +++ b/docs/tracking.js.html @@ -31,7 +31,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -113,7 +113,7 @@

tracking.js


- Documentation generated by JSDoc 4.0.2 on Tue Jul 04 2023 09:03:19 GMT-0700 (Pacific Daylight Time) using the docdash theme. + Documentation generated by JSDoc 4.0.2 on Tue Sep 19 2023 08:09:41 GMT+0200 (Central European Summer Time) using the docdash theme.
diff --git a/index.js b/index.js index b98e02f7..091f73b5 100644 --- a/index.js +++ b/index.js @@ -9,3 +9,4 @@ export * from "./src/photo_video.js"; export * from "./src/set_isp_settings.js"; export * from "./src/system_settings.js"; export * from "./src/tracking.js"; + diff --git a/package-lock.json b/package-lock.json index cf9c3069..bcf32225 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "dwarfii_api", - "version": "0.0.2-alpha.4", + "version": "0.0.2-beta.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "dwarfii_api", - "version": "0.0.2-alpha.4", + "version": "0.0.2-beta.3", "license": "ISC", "devDependencies": { "docdash": "^2.0.1", diff --git a/package.json b/package.json index c78f9029..e6cf84c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dwarfii_api", - "version": "0.0.2-alpha.9", + "version": "0.0.2-beta.4", "description": "wrapper for Dwarf II telescope API", "main": "dist/index.js", "scripts": { @@ -14,7 +14,7 @@ "build": "npm run CI && npm run ts && npm run generate-docs" }, "type": "module", - "author": "wykhuh", + "author": "wykhuh & stevejcl", "repository": { "type": "git", "url": "https://github.com/DwarfTelescopeUsers/dwarfii_api" diff --git a/src/api_codes.js b/src/api_codes.js index 10383718..c32b074e 100644 --- a/src/api_codes.js +++ b/src/api_codes.js @@ -33,6 +33,12 @@ export const rawPreviewURL = (IP) => `http://${IP}:8092/rawstream`; */ 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 // =============== @@ -147,6 +153,7 @@ export const statusWideangleCmd = 10217; // goto export const calibrateGotoCmd = 11205; export const startGotoCmd = 11203; +export const stopGotoCmd = 11204; export const planetsValueId = { Mercury: 0, @@ -196,6 +203,9 @@ export const darkGainDefault = 65528; // query shot field export const queryShotFieldCmd = 10027; +// astro Autofocus +export const astroAutofocusCmd = 10031; + // =============== // 4.2 tracking // =============== diff --git a/src/astro.js b/src/astro.js index c8d0e40e..df37af92 100644 --- a/src/astro.js +++ b/src/astro.js @@ -4,18 +4,22 @@ import { telephotoCamera, calibrateGotoCmd, startGotoCmd, + stopGotoCmd, binning2x2, fileTiff, takeAstroPhotoCmd, takeAstroDarkFramesCmd, darkGainDefault, utcURL, + timeZoneURL, stopAstroPhotoCmd, rawPreviewContinousSuperimpose, queryShotFieldCmd, + astroAutofocusCmd, setRAWPreviewCmd, } from "./api_codes.js"; -import { nowUTC, nowLocal, nowLocalFileName } from "./api_utils.js"; + +import { nowUTC, nowLocalFileName } from "./api_utils.js"; /** * 4.1.1 UTC+0 time @@ -26,6 +30,16 @@ 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 @@ -38,7 +52,7 @@ export function calibrateGoto(latitude, longitude) { camId: telephotoCamera, lon: longitude, lat: latitude, - date: nowLocal(), + date: nowUTC(), path: `DWARF_GOTO_${nowLocalFileName()}`, }; return options; @@ -46,9 +60,9 @@ export function calibrateGoto(latitude, longitude) { /** * 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} @@ -65,12 +79,14 @@ export function startGoto( 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; options.dec = declination; @@ -78,6 +94,18 @@ export function startGoto( 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 @@ -124,6 +152,7 @@ export function takeAstroPhoto( export function stopAstroPhoto() { const options = { interface: stopAstroPhotoCmd, + camId: telephotoCamera, }; return options; } @@ -187,3 +216,15 @@ 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/tsconfig.json b/tsconfig.json index d74ed64a..289367ed 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -6,7 +6,7 @@ "outDir": "./dist", "skipLibCheck": true, "declaration": true, - "declarationMap": true + "declarationMap": true, }, "include": ["src/*", "index.js"], "exclude": ["node_modules"]