什么是Windows平台的GPS中间驱动程序的等效物?

什么是Windows平台的GPS中间驱动程序的等效物?,第1张

概述什么是Windows平台的GPS中间驱动程序的等效物?

通过windows Mobile开发,您的.Net应用程序可以使用GPS中间驱动程序来确保多个应用程序可以使用GPS设备,而无需一个应用程序locking另一个应用程序。 我有一个使用GPS中间驱动程序的移动应用程序(.Net Compact Framework),而且我也有一个windows版本的应用程序,不包括GPSfunction。 现在我需要为运行windows 7的平板电脑构buildGPSfunction,并且内置GPS接收器。 与GPS接收器的连接通过COM端口build立。

是否有一个相当于windows的GPS中间驱动程序,将允许我的应用程序使用GPS接收器,但不阻挡在PC上运行的其他导航软件的GPS接收器?

对多个类执行单个WMI查询,可能是?

MSBuild不能build立一个MSI。 是否有windows服务的替代品?

如何在系统托盘中显示图标?

以编程方式隐藏PropertyGrID中的属性

在windows环境中使用Etsy的StatsD

是对的! GeoFramework是一个最好的免费GPS框架。 如果您需要在飞机上投影/取消投影坐标,这些类可以帮助您:

public interface IProjector { PointD Deproject(PointD projectedCoordinate); PointD Project(PointD geographicCoordinate); PointD Project(position position); PointD Project(Latitude latitude,Longitude longitude); } [StructLayout(LayoutKind.Sequential)] public struct PointD : IEquatable<PointD>,IFormattable { private double _x; private double _y; public static PointD Empty; public PointD(double x,double y) { this._x = x; this._y = y; } public PointD(PointD p) { this._x = pX; this._y = pY; } public double X { get { return this._x; } set { this._x = value; } } public double Y { get { return this._y; } set { this._y = value; } } public bool IsEmpty { get { return this.Equals(Empty); } } public Point topoint() { return new Point((int)this._x,(int)this._y); } public voID normalize() { double num = Math.Sqrt((this.X * this.X) + (this.Y * this.Y)); this.X /= num; this.Y /= num; } public static PointD FromSize(Size size) { return new PointD((double)size.WIDth,(double)size.Height); } public static PointD FromSize(Sizef size) { return new PointD((double)size.WIDth,(double)size.Height); } public static bool operator ==(PointD left,PointD right) { return left.Equals(right); } public static bool operator !=(PointD left,PointD right) { return !left.Equals(right); } public static PointD operator -(PointD left,PointD right) { return new PointD(left.X - right.X,left.Y - right.Y); } public overrIDe bool Equals(object obj) { return ((obj is PointD) && this.Equals((PointD)obj)); } public overrIDe int GetHashCode() { return (this._x.GetHashCode() ^ this._y.GetHashCode()); } public overrIDe string ToString() { return this.ToString("G",CultureInfo.CurrentCulture); } public bool Equals(PointD other) { return (this._x.Equals(other.X) && this._y.Equals(other.Y)); } public string ToString(string format,IFormatProvIDer formatProvIDer) { CultureInfo info = (CultureInfo)formatProvIDer; return (this._x.ToString(format,formatProvIDer) + info.TextInfo.ListSeparator + " " + this._y.ToString(format,formatProvIDer)); } static PointD() { Empty = new PointD(0.0,0.0); } } public class Projector : IProjector { private const double degreestoradians = System.Math.PI / 180; private const double radianstodegrees = 180 / System.Math.PI; /* These values represent the equatorial radius of the wgs84 ellipsoID in meters. * resulting in projected coordinates which are also in meters */ private const double wgs84SEMIMAJOR = 6378137.0; private const double ONEOVERwgs84SEMIMAJOR = 1.0 / wgs84SEMIMAJOR; public PointD Deproject(PointD projectedCoordinate) { .PointD result = new PointD(); // Calculate the geographic X coordinate (longitude) result.X = (float)(projectedCoordinate.X * ONEOVERwgs84SEMIMAJOR / System.Math.Cos(0) * radianstodegrees); // Calculate the geographic Y coordinate (latitude) result.Y = (float)(projectedCoordinate.Y * ONEOVERwgs84SEMIMAJOR * radianstodegrees); return result; } public PointD Project(PointD geographicCoordinate) { PointD result = new PointD(); // Calculate the projected X coordinate result.X = (float)(geographicCoordinate.X * degreestoradians * System.Math.Cos(0) * wgs84SEMIMAJOR); // Calculate the projected Y coordinate result.Y = (float)(geographicCoordinate.Y * degreestoradians * wgs84SEMIMAJOR); // Return the result return result; } public PointD Project(position position) { PointD td = new PointD(); td.X = ((position.Latitude.Decimaldegrees * degreestoradians) * System.Math.Cos(0.0)) * wgs84SEMIMAJOR; td.Y = (position.Longitude.Decimaldegrees * degreestoradians) * wgs84SEMIMAJOR; return td; } public PointD Project(Latitude latitude,Longitude longitude) { PointD td = new RTGeoFramework.Math.PointD(); td.X = ((latitude.Decimaldegrees * degreestoradians) * System.Math.Cos(0.0)) * wgs84SEMIMAJOR; td.Y = (longitude.Decimaldegrees * degreestoradians) * wgs84SEMIMAJOR; return td; } }

我通过使用GeoFramework(用于处理位置服务的开源代码)解决了这个问题。 GeoFramework的网站在这里: http://geoframework.codeplex.com/ ,就像它在网站上提到的,GeoFramework现在是DotSpatial开源项目的一部分,可以在这里找到: http://dotspatial.codeplex。 COM /

我在GeoFramework中发现的一个优点是它可以在windows和windows Mobile上运行,这让我更进一步地实现了在windows和windows Mobile平台上运行应用程序的目标,但只有一个代码库。

正如我在评论中提到的,我的客户端使用的导航软件和我的应用程序都试图打开相同的COM端口,导致其中一个应用程序无法建立与COM的连接港口。 我通过使用一个COM端口分离器解决了这个问题,它将一个物理COM端口变成两个虚拟COM端口。 这样,我的应用程序和导航软件都能够同时读取位置数据。

总结

以上是内存溢出为你收集整理的什么是Windows平台的GPS中间驱动程序的等效物?全部内容,希望文章能够帮你解决什么是Windows平台的GPS中间驱动程序的等效物?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/langs/1276040.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-06-09
下一篇 2022-06-09

发表评论

登录后才能评论

评论列表(0条)

保存