WarpTwin
Documentation for WarpTwin models and classes.
Loading...
Searching...
No Matches
planetrelutils.h
Go to the documentation of this file.
1/******************************************************************************
2* Copyright (c) ATTX LLC 2024. All Rights Reserved.
3*
4* This software and associated documentation (the "Software") are the
5* proprietary and confidential information of ATTX, LLC. The Software is
6* furnished under a license agreement between ATTX and the user organization
7* and may be used or copied only in accordance with the terms of the agreement.
8* Refer to 'license/attx_license.adoc' for standard license terms.
9*
10* EXPORT CONTROL NOTICE: THIS SOFTWARE MAY INCLUDE CONTENT CONTROLLED UNDER THE
11* INTERNATIONAL TRAFFIC IN ARMS REGULATIONS (ITAR) OR THE EXPORT ADMINISTRATION
12* REGULATIONS (EAR99). No part of the Software may be used, reproduced, or
13* transmitted in any form or by any means, for any purpose, without the express
14* written permission of ATTX, LLC.
15******************************************************************************/
16/*
17Planet relative state Utils header file
18---------------------------------------
19The planet relative state utilities header file contains
20utiltities for converting between planet-based spherical
21coordinates and planet-centered rotating frame coordinates.
22
23Author: Alex Reynolds
24
25Update Log
26----------
27May 9, 2024, Gabriel A. Heredia Acevedo
28Jun 16, 2025, James Tabony - added llaDeticToPCR
29Jan 19, 2026, Alex Jackson - Added nedToLlaDetic function
30
31Update tools to support planet (celestial) relative states model
32*/
33
34#ifndef GNCUTILS_STATES_PLANET_REL_UTILS_H
35#define GNCUTILS_STATES_PLANET_REL_UTILS_H
36
37#include "types.h"
39#include "core/mathmacros.h"
40#include "dynamics/DCM.h"
41#include "core/safemath.h"
42
43namespace warpos {
44
53 int16 pcrToDeticLla(CartesianVector3 pos__pcr,
54 floating_point r_planet_equatorial,
55 floating_point flattening,
56 floating_point& lat_rad,
57 floating_point& lon_rad,
58 floating_point& alt);
59
69 int16 llaDeticToPCR(double r_planet_equitorial,
70 double flattening,
71 double lat_rad,
72 double lon_rad,
73 double alt,
74 clockwerk::CartesianVector<3> &pos__pcr);
75 int16 llaDeticToPCR(float r_planet_equitorial,
76 float flattening,
77 float lat_rad,
78 float lon_rad,
79 float alt,
80 clockwerk::CartesianVector<3> &pos__pcr);
81
86 clockwerk::DCM enuFromLatLonDetic(floating_point lat_rad,
87 floating_point lon_rad);
88
93 clockwerk::DCM nedFromLatLonDetic(floating_point lat_rad,
94 floating_point lon_rad);
95
107 int16 nedToLlaDetic(floating_point lat_origin_deg,
108 floating_point lon_origin_deg,
109 floating_point alt_origin,
110 CartesianVector3 pos__ned,
111 floating_point r_planet_equatorial,
112 floating_point flattening,
113 floating_point &lat_deg,
114 floating_point &lon_deg,
115 floating_point &alt);
116
117}
118
119#endif
#define CartesianVector3
Definition mathmacros.h:43
Definition DeadReckon.cpp:20
clockwerk::DCM nedFromLatLonDetic(floating_point lat_rad, floating_point lon_rad)
Function to calculate the North, East, Down frame attitude from detic lat and lon.
Definition planetrelutils.cpp:149
int16 llaDeticToPCR(double r_planet_equitorial, double flattening, double lat_rad, double lon_rad, double alt, clockwerk::CartesianVector< 3 > &pos__pcr)
Function to return the PCR (planet centered rotating) position of an object from detic latitude,...
Definition planetrelutils.cpp:97
int16 pcrToDeticLla(clockwerk::CartesianVector< 3 > pos__pcr, floating_point r_planet_equatorial, floating_point flattening, floating_point &lat_rad, floating_point &lon_rad, floating_point &alt)
Function to calculate detic LLA from PCR state.
Definition planetrelutils.cpp:26
int16 nedToLlaDetic(floating_point lat_origin, floating_point lon_origin, floating_point alt_origin, clockwerk::CartesianVector< 3 > pos__ned, floating_point r_planet_equatorial, floating_point flattening, floating_point &lat, floating_point &lon, floating_point &alt)
Function to calculate detic LLA from NED position.
Definition planetrelutils.cpp:161
clockwerk::DCM enuFromLatLonDetic(floating_point lat_rad, floating_point lon_rad)
Function to calculate the East, North, Up frame attitude from detic lat and lon.
Definition planetrelutils.cpp:139