Skip to content

Commit

Permalink
Improved coordinate handling II.
Browse files Browse the repository at this point in the history
  • Loading branch information
halmaia committed Feb 19, 2023
1 parent aa0920c commit c012497
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SL3Reader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ public unsafe void ExamineUnknown8Datasets()
}
}

public unsafe void Export3D(string path, bool includeUnreliable = false)
public unsafe void Export3D(string path, bool includeUnreliable = false, bool magneticHeading = false)
{
ArgumentNullException.ThrowIfNull(nameof(path));

Expand Down Expand Up @@ -317,7 +317,7 @@ public unsafe void Export3D(string path, bool includeUnreliable = false)

uint campaignID = frame.CampaignID;
double centralX = coord.X, centralY = coord.Y, centralZ = .3048 * coord.Altitude;
(double sin, double cos) = double.SinCos(frame.MagneticHeading - .5 * double.Pi);
(double sin, double cos) = double.SinCos((magneticHeading ? frame.MagneticHeading : frame.GNSSHeading) - .5 * double.Pi);

// Left side
byte* limit = measurements + header.NumberOfLeftBytes;
Expand Down Expand Up @@ -400,7 +400,7 @@ internal void AugmentTrajectory()
frame.UnpackNavParameters();
double sv = nv + v,
dt = nt - t;
double vec = C * .5d * sv * dt,
double vec = C * .5d * sv * dt,
ad = (nv * nd + v * d) / sv;
(double sin, double cos) = double.SinCos(ad);

Expand Down

0 comments on commit c012497

Please sign in to comment.