Skip to content

Commit

Permalink
fix: ✨ add missing lla function
Browse files Browse the repository at this point in the history
  • Loading branch information
thkruz committed Jan 17, 2024
1 parent 42e4c4a commit 21c2b7b
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/objects/GroundObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,18 @@ export class GroundObject extends BaseObject {
return lla2eci(this.toGeodetic(), gmst);
}

/**
* Returns the latitude, longitude, and altitude of the GroundObject.
* @returns The latitude, longitude, and altitude as an LlaVec3 object.
*/
lla(): LlaVec3<Degrees, Kilometers> {
return {
lat: this.lat,
lon: this.lon,
alt: this.alt,
};
}

/**
* Converts the latitude, longitude, and altitude of the GroundObject to radians and kilometers.
* @variation optimized version of this.toGeodetic() without class instantiation for better performance and
Expand Down

0 comments on commit 21c2b7b

Please sign in to comment.