public void ProjectionChanged(int i) { var axis = GeodesyProjections.getAxisNames(Projections[i, 1]); NorthLabel.text = axis.North; EastLabel.text = axis.East; UpLabel.text = axis.Up; }
static IEnumerable <(View view, PoseDesc pose)> GetViewPoses(string videoFile) { var toSweref = GeodesyProjections.fromWGS84Converter("sweref_99_13_30"); var posFile = PrepVideo.GetPositionsFilePath(videoFile); var cp = new CaptionParser(posFile); uint TimeStamp; double Latitude; double Longitude; double Altitude; double RelativeHeight; float Pitch; float Roll; float Yaw; cp.ReadPose(out TimeStamp, out Latitude, out Longitude, out Altitude, out RelativeHeight, out Pitch, out Roll, out Yaw); var origin = toSweref(Longitude, Latitude, Altitude); yield return(GnssToViewPose(origin, origin, TimeStamp)); while (true) { try { cp.ReadPose(out TimeStamp, out Latitude, out Longitude, out Altitude, out RelativeHeight, out Pitch, out Roll, out Yaw); } catch (EndOfStreamException) { Log.Msg("GnssSfm: done loading captions"); break; } var gnssPos = toSweref(Longitude, Latitude, Altitude); yield return(GnssToViewPose(origin, gnssPos, TimeStamp)); } }
public static GPSPosition fromWGS84(string Projection, double longitude, double latitude, double elevation) { var converter = GeodesyProjections.GetConverter(Projection); return(converter.fromWGS84(longitude, latitude, elevation)); }
public static void toWGS84(GPSPosition pos, out double longitude, out double latitude, out double elevation) { var converter = GeodesyProjections.GetConverter(pos.Projection); converter.toWGS84(pos, out longitude, out latitude, out elevation); }