Why am I not getting good Lat, Lon, Alt and E, N, Up values at the end of my code.

I'm willing to pay someone to look through the attached code and find out what I'm doing wrong, if possible. It does not have to be exactly corret. I just need a good visual to show the readers of my book how the magic orbs work. I will place this visual in an appendix to the book. The latitude and longitude should be kept to the North East Quadrant (Possitive Latitude and Longitude). Thank You.
William José Blanch
650 Garin Ave
Hayward, CA 94544-6816
(510) 329-4891
bjblanch@sbcglobal.net
CPORB
scint1 = 1×3
0.4790 0.7037 0.0599
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
rad1 = 0.0497
scint2 = 1×3
0.1575 0.7778 0.9903
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
rad2 = 0.9724
scint3 = 1×3
0.7503 0.4837 0.2786
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
rad3 = 0.9182
x1 = -8.4443
y1 = 59.2816
z1 = -9.2751
x2 = -8.4443
y2 = 59.2816
z2 = -9.2751
darodar =
referenceEllipsoid with defining properties: Code: [] Name: 'Unit Sphere' LengthUnit: 'meter' SemimajorAxis: 2400000 SemiminorAxis: 2391917.59055365 InverseFlattening: 296.94115547254 Eccentricity: 0.082 and additional properties: Flattening ThirdFlattening MeanRadius SurfaceArea Volume
lat1 = -89.7882
lon1 = 98.1069
alt1 = -2.3919e+06
lat2 = -89.7882
lon2 = 98.1069
alt2 = -2.3919e+06
lla = 2×3
1.0e+06 * -0.0001 0.0001 -2.3919 -0.0001 0.0001 -2.3919
<mw-icon class=""></mw-icon>
<mw-icon class=""></mw-icon>
x1E = -1.0484e-14
y1N = -1.3685e-12
z1Up = -2.5737e-10
x2E = -1.0484e-14
y2N = -1.3685e-12
z2Up = -2.5737e-10

2 Comments

As you can see, there is a lot of output from your code without much coherent explanation of why any of this is unexpected or wrong. What exactly do you wish to see?
I should be getting; Longitude values between +180 degrees and -180 degrees, and Latitude values between +90 degrees and -90 degrees, with altitude values at a credible terrain height-above sea level. I included the E, N, Up coordinates as a check of the geodetic coordinates and can be disregared.

Sign in to comment.

Answers (0)

Asked:

on 4 Jun 2026

Commented:

on 11 Jun 2026

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!