⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 location.frm

📁 CELL-ID技术是目前最简单的定位技术
💻 FRM
📖 第 1 页 / 共 2 页
字号:
      RecordSource    =   ""
      Caption         =   "Adodc1"
      BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
         Name            =   "宋体"
         Size            =   9
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      _Version        =   393216
   End
   Begin VB.TextBox Text10 
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   5280
      TabIndex        =   18
      TabStop         =   0   'False
      Top             =   4080
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text9 
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   5280
      TabIndex        =   9
      TabStop         =   0   'False
      Top             =   2640
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text8 
      DataSource      =   "Adodc1"
      Height          =   375
      Left            =   5280
      TabIndex        =   8
      TabStop         =   0   'False
      Top             =   1200
      Visible         =   0   'False
      Width           =   1815
   End
   Begin VB.TextBox Text7 
      Height          =   375
      Left            =   1200
      TabIndex        =   7
      TabStop         =   0   'False
      Top             =   4320
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.TextBox Text6 
      Height          =   375
      Left            =   1200
      TabIndex        =   6
      TabStop         =   0   'False
      Top             =   3000
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.TextBox Text4 
      Height          =   375
      Left            =   1200
      TabIndex        =   5
      TabStop         =   0   'False
      Top             =   3720
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.TextBox Text3 
      Height          =   375
      Left            =   1200
      TabIndex        =   4
      TabStop         =   0   'False
      Top             =   2400
      Visible         =   0   'False
      Width           =   2295
   End
   Begin VB.CommandButton Command2 
      Caption         =   "退出(&Q)"
      Height          =   615
      Left            =   2400
      TabIndex        =   2
      Top             =   1080
      Width           =   1095
   End
   Begin VB.CommandButton Command1 
      Caption         =   "查询(&F)"
      Height          =   615
      Left            =   480
      TabIndex        =   1
      Top             =   1080
      Width           =   1095
   End
   Begin VB.Label Label16 
      AutoSize        =   -1  'True
      Caption         =   "x5"
      Height          =   180
      Left            =   600
      TabIndex        =   31
      Top             =   6480
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label15 
      AutoSize        =   -1  'True
      Caption         =   "y5"
      Height          =   180
      Left            =   600
      TabIndex        =   30
      Top             =   7080
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label14 
      AutoSize        =   -1  'True
      Caption         =   "r5"
      Height          =   180
      Left            =   4800
      TabIndex        =   29
      Top             =   6840
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label13 
      AutoSize        =   -1  'True
      Caption         =   "x4"
      Height          =   180
      Left            =   600
      TabIndex        =   25
      Top             =   5160
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label12 
      AutoSize        =   -1  'True
      Caption         =   "y4"
      Height          =   180
      Left            =   600
      TabIndex        =   24
      Top             =   5760
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label11 
      AutoSize        =   -1  'True
      Caption         =   "r4"
      Height          =   180
      Left            =   4800
      TabIndex        =   23
      Top             =   5520
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label10 
      AutoSize        =   -1  'True
      Caption         =   "r3"
      Height          =   180
      Left            =   4800
      TabIndex        =   19
      Top             =   4200
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label9 
      AutoSize        =   -1  'True
      Caption         =   "r2"
      Height          =   180
      Left            =   4800
      TabIndex        =   17
      Top             =   2760
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label8 
      AutoSize        =   -1  'True
      Caption         =   "r1"
      Height          =   180
      Left            =   4800
      TabIndex        =   16
      Top             =   1320
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label7 
      AutoSize        =   -1  'True
      Caption         =   "y3"
      Height          =   180
      Left            =   600
      TabIndex        =   15
      Top             =   4440
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label6 
      AutoSize        =   -1  'True
      Caption         =   "y2"
      Height          =   180
      Left            =   600
      TabIndex        =   14
      Top             =   3120
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label5 
      AutoSize        =   -1  'True
      Caption         =   "y1"
      Height          =   180
      Left            =   600
      TabIndex        =   13
      Top             =   1680
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label4 
      AutoSize        =   -1  'True
      Caption         =   "x3"
      Height          =   180
      Left            =   600
      TabIndex        =   12
      Top             =   3840
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "x2"
      Height          =   180
      Left            =   600
      TabIndex        =   11
      Top             =   2520
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "x1"
      Height          =   180
      Left            =   600
      TabIndex        =   10
      Top             =   1080
      Visible         =   0   'False
      Width           =   180
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "手机号码:"
      Height          =   180
      Left            =   360
      TabIndex        =   3
      Top             =   480
      Width           =   900
   End
End
Attribute VB_Name = "手机定位"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim r1 As Double
Dim r2 As Double
Dim r3 As Double
Dim X1 As Double
Dim X2 As Double
Dim X3 As Double
Dim Y1 As Double
Dim Y2 As Double
Dim Y3 As Double

Dim x As Double
Dim y As Double


Private Sub Command1_Click()

  If Combo1.Text = "" Then
  Dim B
    B = MsgBox("手机号码不能为空", 0 + 48, "警告")
    Combo1.SetFocus
  Else
    Adodc6.ConnectionString = PublicStr
    Adodc6.RecordSource = "select * from 模拟手机信号 where 手机号码='" + Combo1.Text + "'"
    Adodc6.Refresh
  
    Text8.Text = Adodc6.Recordset.Fields(1).Value
    Text9.Text = Adodc6.Recordset.Fields(2).Value
    Text10.Text = Adodc6.Recordset.Fields(3).Value

    X1 = Text1.Text
    X2 = Text3.Text
    X3 = Text4.Text
    Y1 = Text5.Text
    Y2 = Text6.Text
    Y3 = Text7.Text
    r1 = Text8.Text
    r2 = Text9.Text
    r3 = Text10.Text


    x = ((Y1 * r3 ^ 2 + Y3 * r2 ^ 2 + Y2 * r1 ^ 2 - Y2 * r3 ^ 2 - Y1 * r2 ^ 2 - Y3 * r1 ^ 2) - 111000 ^ 2 * (Y1 * X3 ^ 2 + Y3 * X2 ^ 2 + Y2 * X1 ^ 2 - Y2 * X3 ^ 2 - Y1 * X2 ^ 2 - Y3 * X1 ^ 2) - 102680 ^ 2 * (Y1 * Y3 ^ 2 + Y3 * Y2 ^ 2 + Y2 * Y1 ^ 2 - Y2 * Y3 ^ 2 - Y1 * Y2 ^ 2 - Y3 * Y1 ^ 2)) / (2 * 111000 ^ 2 * (Y2 * X3 + Y1 * X2 + Y3 * X1 - Y1 * X3 - Y3 * X2 - Y2 * X1))

    y = ((X1 * r3 ^ 2 + X3 * r2 ^ 2 + X2 * r1 ^ 2 - X2 * r3 ^ 2 - X1 * r2 ^ 2 - X3 * r1 ^ 2) - 111000 ^ 2 * (X1 * X3 ^ 2 + X3 * X2 ^ 2 + X2 * X1 ^ 2 - X2 * X3 ^ 2 - X1 * X2 ^ 2 - X3 * X1 ^ 2) - 102680 ^ 2 * (X1 * Y3 ^ 2 + X3 * Y2 ^ 2 + X2 * Y1 ^ 2 - X2 * Y3 ^ 2 - X1 * Y2 ^ 2 - X3 * Y1 ^ 2)) / (2 * 102680 ^ 2 * (X1 * Y2 + X3 * Y1 + X2 * Y3 - X1 * Y3 - X3 * Y2 - X2 * Y1))


    Text11.Text = x
    Text14.Text = y
    
    Unload Me
    
    Dim a
    a = MsgBox("经度为:" & x & " 度" & Chr(13) & "纬度为:" & y & " 度", 0, "查询结果")
    
  
  End If
End Sub

Private Sub Command2_Click()
Unload Me
End Sub

Private Sub Form_Load()

 '此处为调取表中各行数据, 目前技术问题尚未找到更好的办法解决
 '-----------调用开始------------
  Adodc1.ConnectionString = PublicStr
  Adodc1.RecordSource = "select * from 基站信息 where 基站编号='1'"
  Adodc1.Refresh
  Adodc2.ConnectionString = PublicStr
  Adodc2.RecordSource = "select * from 基站信息 where 基站编号='2'"
  Adodc2.Refresh
  Adodc3.ConnectionString = PublicStr
  Adodc3.RecordSource = "select * from 基站信息 where 基站编号='3'"
  Adodc3.Refresh
  Adodc4.ConnectionString = PublicStr
  Adodc4.RecordSource = "select * from 基站信息 where 基站编号='4'"
  Adodc4.Refresh
  Adodc5.ConnectionString = PublicStr
  Adodc5.RecordSource = "select * from 基站信息 where 基站编号='5'"
  Adodc5.Refresh

  Text1.Text = Adodc1.Recordset.Fields(2).Value
  Text5.Text = Adodc1.Recordset.Fields(3).Value
  Text3.Text = Adodc2.Recordset.Fields(2).Value
  Text6.Text = Adodc2.Recordset.Fields(3).Value
  Text4.Text = Adodc3.Recordset.Fields(2).Value
  Text7.Text = Adodc3.Recordset.Fields(3).Value
  Text13.Text = Adodc4.Recordset.Fields(2).Value
  Text12.Text = Adodc4.Recordset.Fields(3).Value
  Text16.Text = Adodc5.Recordset.Fields(2).Value
  Text15.Text = Adodc5.Recordset.Fields(3).Value
  '-----------调用结束------------
  
  
  
End Sub



Private Sub Combo1_KeyPress(KeyAscii As Integer)
  If KeyAscii = 13 Then Call Command1_Click
End Sub


Private Sub Form_Unload(Cancel As Integer)
  系统主窗口.Enabled = True
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -