Constructor
new CommPath(Path, Calib)
Creates a parsed path to send to the ESP32 server.
Parameters:
Name | Type | Description |
---|---|---|
Path |
Path | Path to be parsed. |
Calib |
Calibration | calibration used to transform celestial to step coordinates |
Members
_decBase :Array.<number>
Number of bits of the base used to communicate the path segments.
Type:
- Array.<number>
_encBase :Array.<number>
Number of bits of the base used to represent the path segments, respectively for: laser state, step delay, fix step, mob step.
Type:
- Array.<number>
_parsedPath :Array.<number>
Parsed path obtained from this._path.
Type:
- Array.<number>
_path :Path
Type:
- Path
calib :Calibration
Type:
- Calibration
clipped :boolean
True if path clipped due to be below horizon.
Type:
- boolean
decBase
Set decBase.
decBase
Get decBase.
encBase
Set encBase.
encBase
Get encBase.
parsedPath
Get parsedPath.
path
Set path.
path
Get path.
size
Get this path size
Methods
composePath()
Method for parsing this._path.
isAboveHorizon(Step) → {boolean}
Checks if the laser will point above the horizon for safe operation.
Parameters:
Name | Type | Description |
---|---|---|
Step |
Step | step to be checked if is above horizon. |
Returns:
true if above horizon, false otherwise.
- Type
- boolean
parseSegment(Segment) → {Array.<number>}
Parses a segment to be added to a parsed path.
Parameters:
Name | Type | Description |
---|---|---|
Segment |
Segment | Segment to be parsed. |
Returns:
Array with decBase size representing the parsed segment.
- Type
- Array.<number>