PROFESSIONAL NEWSGROUPS
WINDEV
,
WEBDEV
and
WINDEV Mobile
Home
|
Recent messages
|
Connect
|
Sign out
|
English
Home
→
WINDEV Mobile 2024
→
GPS - Relative direction - Direcao Relativa
GPS - Relative direction - Direcao Relativa
Started by adrianoboller, Nov., 24 2014 12:54 PM - No answer
Connect yourself…
adrianoboller
#1
Registered member
3,659 messages
Popularité : +175 (223 votes)
Posted on November, 24 2014 - 12:54 PM
Procedure
GPS_DirecaoRelativa
(
LOCAL
ControleMapa
,
LOCAL
LatitudePontoA
,
LOCAL
LongitudePontoA
,
LOCAL
LatitudePontoB
,
LOCAL
LongitudePontoB
,
LOCAL
MinhaPosicaoBAtualSN
,
LOCAL
Msg
,
LOCAL
WindowSN
)
ok
=
False
Retorno is
string
=
""
IF
ControleMapa
=
""
THEN
ControleMapa
=
gloControleMapa
END
IF
GPSStatus
(
) =
gpsEnabled
OR
GPSStatus
(
) =
gpsAvailable
THEN
pos1 is
geoPosition
pos1
..
Latitude
=
LatitudePontoA
pos1
..
Longitude
=
LongitudePontoA
pos2 is
geoPosition
IF
MinhaPosicaoBAtualSN
=
"S"
pos2
=
GPSGetPosition
(
)
ELSE
pos2
..
Latitude
=
LatitudePontoB
pos2
..
Longitude
=
LongitudePontoB
END
IF
Msg
<
>
""
AND
WindowSN
=
"S"
THEN
Retorno
=
Msg
+
" "
+
geoAzimuth
(
pos1
,
pos2
)
Info
(
Retorno
)
ELSE IF
Msg
<
>
""
AND
WindowSN
<
>
"S"
Retorno
=
Msg
+
" "
+
geoAzimuth
(
pos1
,
pos2
)
ELSE IF
Msg
=
""
AND
WindowSN
<
>
"S"
Retorno
=
geoAzimuth
(
pos1
,
pos2
)
END
ok
=
MapDisplayPosition
(
ControleMapa
,
pos2
)
IF
ok
=
True
THEN
IF
WindowSN
=
"S"
THEN
Info
(
"Posição detectada"
)
END
Retorno
=
"Posição detectada"
ELSE
IF
WindowSN
=
"S"
THEN
Info
(
"Posição não foi detectada"
)
END
Retorno
=
"Posição não foi detectada"
END
ELSE IF
GPSStatus
(
) =
gpsDisabled
THEN
Info
(
"GPS Desabilitado!"
)
ELSE IF
GPSStatus
(
) =
gpsOffService
OR
GPSStatus
(
) =
gpsUnavailable
OR
GPSStatus
(
) =
gpsError
THEN
Info
(
"Região sem serviço de GPS"
,
ErrorInfo
(
)
)
END
RESULT
(
Retorno
)
Report
0
0
→ Go back to WINDEV Mobile 2024
WINDEV 2024
WEBDEV 2024
WINDEV Mobile 2024
WINDEV (earlier versions)
Français
English
Español
Portuguesa
Close this window
Search type
Only topics
All the messages
Search period
Any time
Past hour
Past 24 hours
Past week
Past month
Past year
Cancel
Preview of your message
Adding an image
Import an image from a URL
Send an image from a file of your disk
Drop a file or click "Browse..."
or
Cancel
0%
WLanguage
SQL
XML, HTML
JAVA, Javascript
Text