Skip to content

Commit

Permalink
refactor: ♻️ move latRad and lonRad to GroundObject class
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jan 24, 2024
1 parent c16fe23 commit 79817b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
1 change: 0 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
],
"extensions": {
"recommendations": [
"prettier.prettier-vscode",
"dbaeumer.vscode-eslint",
"steoates.autoimport",
"vivaxy.vscode-conventional-commits",
Expand Down
8 changes: 8 additions & 0 deletions src/objects/GroundObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,14 @@ export class GroundObject extends BaseObject {
};
}

get latRad(): Radians {
return this.lat * DEG2RAD as Radians;
}

get lonRad(): Radians {
return this.lon * DEG2RAD as Radians;
}

/**
* Creates a GroundObject object from a Geodetic position.
* @param geodetic The geodetic coordinates.
Expand Down

0 comments on commit 79817b2

Please sign in to comment.