Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9001029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:23:00+00:00 2026-06-16T00:23:00+00:00

I am working on a BlackBerry app. This app has already been developed in

  • 0

I am working on a BlackBerry app. This app has already been developed in Android in “Basic4Android” program. The code for the android app is written in vb.net. I need to write the exact same code for BlackBerry. I am trying to understand this method but I am unable to since I am not an expert with vb.net. I will not paste the entire method but only parts which I need to clarify:

Sub HEX_T24_SHORT_GPS(latitude_decimal_degrees As Double, longitude_decimal_degrees As Double, speed_knots As Int, heading_degrees As Int, time_seconds_since_midnight_gmt As Int, alert_on As Boolean, alert_ack As Boolean, external_interface_control As Boolean, send_extended As Boolean) As String
    Dim pBuffer(11) As Int
    pBuffer(0)=0 ' T24 MSGID 0
    Log("pBuffer(2)" & pBuffer(2))
    Dim t1 As Double
    'Get latitude sign
    Dim lat_south As Boolean
    lat_south=True
    If latitude_decimal_degrees<0 Then lat_south=False
    'Get Longitude sign 
    Dim lon_west As Boolean
    lon_west=True
    If longitude_decimal_degrees<0 Then lon_west=False
    'Get number of second since midnigh extra bit
    Dim num_of_second_extra_bit As Boolean 
    num_of_second_extra_bit=False
    If time_seconds_since_midnight_gmt > 0xFFFF Then num_of_second_extra_bit=True
    'Convert latitude in bytes 1 to 3
    latitude_decimal_degrees = Abs(latitude_decimal_degrees*60000)

What does “If time_seconds_since_midnight_gmt > 0xFFFF” mean? What is happening here “latitude_decimal_degrees = Abs(latitude_decimal_degrees*60000)”. I checked the “Basic4Android” documentation but could not find the Abs API.

If num_of_second_extra_bit=True Then latitude_decimal_degrees=latitude_decimal_degrees + 0x800000
    pBuffer(1)=Bit.ShiftRight(Bit.And(latitude_decimal_degrees, 0xFF0000),16)
    pBuffer(2)=Bit.ShiftRight(Bit.And(latitude_decimal_degrees, 0x00FF00),8)
    pBuffer(3)=Bit.And(latitude_decimal_degrees, 0xFF)

How is the bit shift applied? Is the “AND” operation used between an int and hex value? What is the final value in pBuffer(1)? What is the purpose of steps pBuffer(1) to pBuffer(3). What is it doing and what is the final value of latitude_decimal_degrees?Is the final value in bytes, byte array or hex?Please explain.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T00:23:00+00:00Added an answer on June 16, 2026 at 12:23 am

    What does “If time_seconds_since_midnight_gmt > 0xFFFF” mean?

    What this does is checking if the time_seconds_since_midnight_gmt is bigger than 65,535 – this is probably some sort of compensation – remember there’s 86,400 seconds in a day.

    What is happening here “latitude_decimal_degrees =
    Abs(latitude_decimal_degrees*60000)”

    The decimal part of the latitude is being multiplied by 60,000 – this is pretty much context based what’s going on – it’s probably has something to do with the speed you are moving in – you should look into where this function is called from and try to figure out what the number range is that is going into this variable, and then try to deduce it from that.

    How is the bit shift applied?

    First 0x800000 is added (this is setting bit number 23 high)

    Is the “AND” operation used between an int and hex value?

    Yes. It seems like you’re mixing things up – an integer value can be repesented in base 2 (binary), base 8 (octal), base 10(the usual way) and base 16 (hexadecimal) – it’s still the same value.

    What is the final value in pBuffer(1)? Please explain.

    Okay – let’s run through an example:

    latitude_decimal_degrees = 0xE653 (58,963)

    then add 0x800000

    latitude = 0x80E653

    then and with 0xFF0000

    latitude = 0x800000

    and finally right shift by 16

    latitude = 0x000080

    What this means on the other hand, is up for your interpretation.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working in a Blackberry app (OS 5.0) and need to show recent tweets
I am working on a blackberry app in which I got a pdf-url from
I'm working on a blackberry app with intended target OS5+. I'm creating a GridFieldManager
I'm working on a Blackberry 5.2 browser app. I have some JavaScriptthat returns some
I am working on a blackberry application in which I need to hit a
I have been working on a BlackBerry application that consumes web services from ColdFusion
Details: I'm working on a BlackBerry app, and one of the features is signature
Currently i am working on Blackberry Application and stuck at this point that how
I'm working on a Blackberry application (JDE 4.6.1) on a Windows system. I need
I am working on a BlackBerry application that has an Image Button. The Image

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.