Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Forums:

Hi All,

I am new to this forum. Currently working on GPS based application I am very much confuse between modes of GPS and want to know can we see the o/p in emulator as in my application IPOSDET_GetGPSInfo() always give EFAILED..
I donot have device right now.. :-( Can we check in emulator that GPS cordinates are correct ?

I highly appreciate if some one give me proper guide on this ..!!
Thanks
Neha

Good Question i have not seen this Topic for long time in BREW.
Well you can use this link.http://www.devx.com/wireless/Article/11195
This may help you.

Good Question i have not seen this Topic for long time in BREW.
Well you can use this link.http://www.devx.com/wireless/Article/11195
This may help you.

Thanks ..!
I will look into it..Can meanwhile any one tell me is it possible to see GPS o/p in emulator or not?

Thanks ..!
I will look into it..Can meanwhile any one tell me is it possible to see GPS o/p in emulator or not?

Yes it is possiable to see the GPS output on emulator but it will not be a original data, it is only from a GPS data file known as BGP file.

Yes it is possiable to see the GPS output on emulator but it will not be a original data, it is only from a GPS data file known as BGP file.

Sorry to bother u again but ...what do u mean by not a original data?
what is - GPS data file known as BGP file? Is thats only for emulator ?
Do we need to write seprate code for emulator and device ?

Sorry to bother u again but ...what do u mean by not a original data?
what is - GPS data file known as BGP file? Is thats only for emulator ?
Do we need to write seprate code for emulator and device ?

Yes BGP file is from where simulator read the GPS info and Simulates when in absent of a GPS device connected to COM port.

Yes BGP file is from where simulator read the GPS info and Simulates when in absent of a GPS device connected to COM port.

hi
well i have also undergone thru the same problem. But eventually i succeded to develop a GPS app.
U need to know something b4 u start with ur app
1. u cant test this app(on ur handset) in india as we dont have this infrastructure.
2. U can test ur app on the emulator . But for that u need something known as a .BGP file(Brew Geographic Position) This file is made with the help of a GPS
device which connects itself direclty to the satellite and generates a BGP file
3. Nw u wud ask that hw wil this happen. There is a utility give by BREW known as NMEA logger which comes with BREW 2.1.3 which does this act.
4. But for ur convenience i am attaching this file here.
5. Next thing is i wud like to know that hw much are u thru with ur app. Are u still collecting information or are there some minor points which u wud like to know.
Do lemme know, as i think ill be able to help u.
Bye
TC

hi
well i have also undergone thru the same problem. But eventually i succeded to develop a GPS app.
U need to know something b4 u start with ur app
1. u cant test this app(on ur handset) in india as we dont have this infrastructure.
2. U can test ur app on the emulator . But for that u need something known as a .BGP file(Brew Geographic Position) This file is made with the help of a GPS
device which connects itself direclty to the satellite and generates a BGP file
3. Nw u wud ask that hw wil this happen. There is a utility give by BREW known as NMEA logger which comes with BREW 2.1.3 which does this act.
4. But for ur convenience i am attaching this file here.
5. Next thing is i wud like to know that hw much are u thru with ur app. Are u still collecting information or are there some minor points which u wud like to know.
Do lemme know, as i think ill be able to help u.
Bye
TC

Well said Mr. utkarshseth.

Well said Mr. utkarshseth.

Hi Utkarsh
Many Many Thanx for ur info/help...!!
I write down some code on that but .. I simply donot know is it correct or not as GPS is new to me in BREW.
I have few doudts can u please tell me..?
1. Does .BGP file is only use for simulater ?...And for device(out of india with GPS enable) also do we need NMEA logger and this file ??
2.About application .. I done GPS init create instance where i set some config info (I am not sure about it Still)...like
config.mode = AEEGPS_MODE_TRACK_LOCAL;
config.server.svrType =AEEGPS_SERVER_DEFAULT ; config.optim = AEEGPS_OPT_DEFAULT;
etc.
than set this to...pPos IposDet pointer
IPOSDET_SetGPSConfig( pPos, &config );
Than I malloc the AEEGPSInfo pointer and calling POSDET_GetGPSInfo() and than checking the succes in the Callback. where i am collecting lat,lon & altitude value.
Do this work in normal(out of india) ..GPS enability ???
3. Can u tell me how to use this .bgp file and NMEA logger ??
Thanx for ur concern & time
wait for reply
Neha K.

Hi Utkarsh
Many Many Thanx for ur info/help...!!
I write down some code on that but .. I simply donot know is it correct or not as GPS is new to me in BREW.
I have few doudts can u please tell me..?
1. Does .BGP file is only use for simulater ?...And for device(out of india with GPS enable) also do we need NMEA logger and this file ??
2.About application .. I done GPS init create instance where i set some config info (I am not sure about it Still)...like
config.mode = AEEGPS_MODE_TRACK_LOCAL;
config.server.svrType =AEEGPS_SERVER_DEFAULT ; config.optim = AEEGPS_OPT_DEFAULT;
etc.
than set this to...pPos IposDet pointer
IPOSDET_SetGPSConfig( pPos, &config );
Than I malloc the AEEGPSInfo pointer and calling POSDET_GetGPSInfo() and than checking the succes in the Callback. where i am collecting lat,lon & altitude value.
Do this work in normal(out of india) ..GPS enability ???
3. Can u tell me how to use this .bgp file and NMEA logger ??
Thanx for ur concern & time
wait for reply
Neha K.

Hi neha
Your queries answered:
"Q. Does .BGP file is only use for simulater ?."
A. Yes the .BGP file which i sent is used only for emulator... you do not need it in any other case. When u run ur application, before clicking on it, in the emulator, goto Tools->GPS emulation and set the path where u have stored ur .BGP file.
Now what happens is whenever ull invole any application which uses IPOsDet the emulator wil automatically use this file and will extract the GPS information. You dont have to wworry abt that. You do not need NMEA logger as i have already attached the .BGP file. THe work of NMEA logger is to generate a .BGP file.
Q. "About application .. I done GPS init create instance where i set some config info (I am not sure about it Still)...like
config.mode = AEEGPS_MODE_TRACK_LOCAL;
config.server.svrType =AEEGPS_SERVER_DEFAULT ; config.optim = AEEGPS_OPT_DEFAULT;"
A. I dont think so that u need to do any kind of configuring. Let the settings be to their default values and call the IposDet_GetGPSInfo API. THats it.
Even i have started developing a small BREW GPS app.. wil share the code with u next time..

Hi neha
Your queries answered:
"Q. Does .BGP file is only use for simulater ?."
A. Yes the .BGP file which i sent is used only for emulator... you do not need it in any other case. When u run ur application, before clicking on it, in the emulator, goto Tools->GPS emulation and set the path where u have stored ur .BGP file.
Now what happens is whenever ull invole any application which uses IPOsDet the emulator wil automatically use this file and will extract the GPS information. You dont have to wworry abt that. You do not need NMEA logger as i have already attached the .BGP file. THe work of NMEA logger is to generate a .BGP file.
Q. "About application .. I done GPS init create instance where i set some config info (I am not sure about it Still)...like
config.mode = AEEGPS_MODE_TRACK_LOCAL;
config.server.svrType =AEEGPS_SERVER_DEFAULT ; config.optim = AEEGPS_OPT_DEFAULT;"
A. I dont think so that u need to do any kind of configuring. Let the settings be to their default values and call the IposDet_GetGPSInfo API. THats it.
Even i have started developing a small BREW GPS app.. wil share the code with u next time..

Thanx a lot :)
I am able to see some Lat , lan etc cordinates value.!
I hope my code will work fine in proper enviorment !
one more doudt ..this cordinate can be negative also ?
and how to be sure that this number are correct ?
By the way if u want for refernce i can share GPS code.!
Please if u got anythign new let me know..!!
Regards
Neha

Thanx a lot :)
I am able to see some Lat , lan etc cordinates value.!
I hope my code will work fine in proper enviorment !
one more doudt ..this cordinate can be negative also ?
and how to be sure that this number are correct ?
By the way if u want for refernce i can share GPS code.!
Please if u got anythign new let me know..!!
Regards
Neha

Ok
Its gud to hear that u got some success in ur code...
As far as i know these coordinates cannot be negative..
Do one thing.. u have that .BGP file... right click on it and open it with Notepad.. ull see some GPMC etc stuff( i dont remember exactly)
These digits which u see on the screen are extracted form this same file. Now how are these extracted i dunno....
OK temme one thing...... when u start with ur code.. B4 seeing the coordinates,, do u see a privacy popup wherein u need to click on yes and then u c those coordinates?
i am attaching a .pdf file which will give u an indepth understandig of GPS.
Njoi

Ok
Its gud to hear that u got some success in ur code...
As far as i know these coordinates cannot be negative..
Do one thing.. u have that .BGP file... right click on it and open it with Notepad.. ull see some GPMC etc stuff( i dont remember exactly)
These digits which u see on the screen are extracted form this same file. Now how are these extracted i dunno....
OK temme one thing...... when u start with ur code.. B4 seeing the coordinates,, do u see a privacy popup wherein u need to click on yes and then u c those coordinates?
i am attaching a .pdf file which will give u an indepth understandig of GPS.
Njoi

Hi Utkarsh
I am not getting any privacy popup.. and before that my GetGpsinfo() is returning EFAILED but now its giving sucess and I am able to see some number and its lan is neg but when i chose other .bgp file its shows + number.
This PDF is very good thanx a lot :)
Its seems that number conversation problem in my code.. I will handle that .!
Thanx for ur help and quick reply.
let me know if u want any refernce.
Neha :)

Hi Utkarsh
I am not getting any privacy popup.. and before that my GetGpsinfo() is returning EFAILED but now its giving sucess and I am able to see some number and its lan is neg but when i chose other .bgp file its shows + number.
This PDF is very good thanx a lot :)
Its seems that number conversation problem in my code.. I will handle that .!
Thanx for ur help and quick reply.
let me know if u want any refernce.
Neha :)

I am attaching a text file which will explain u the terms which u will find when u will open the .BGP file with the notepad. Goto Pg no 23 in it. This will take u to NMEA Logger utility. U can see the meaning of various terms which ull find in a BGP file.
Actually this was a .pdf file but as the size was too large i extracted relevant data from it and made a new .txt file from it..
Hope this helps
Do temme if u need some more help

I am attaching a text file which will explain u the terms which u will find when u will open the .BGP file with the notepad. Goto Pg no 23 in it. This will take u to NMEA Logger utility. U can see the meaning of various terms which ull find in a BGP file.
Actually this was a .pdf file but as the size was too large i extracted relevant data from it and made a new .txt file from it..
Hope this helps
Do temme if u need some more help

Actually this is not possible. You must see a privacy pop-up.
Have u set the privelege in the .mif file?
While creating the instance for PosDet Use AEECLSID_POSDET_20.
C wt happens

Actually this is not possible. You must see a privacy pop-up.
Have u set the privelege in the .mif file?
While creating the instance for PosDet Use AEECLSID_POSDET_20.
C wt happens

ya I set the privelege in the Mif file.
And i try to AEECLSID_POSDET_20 but its giving error as its not available in the aeeclsids.h
GPS.txt is very good. And I am undersatnding now this NMEA and how the cordinates come... !!
I think issue is How to get privacy popup?
Regards
Neha

ya I set the privelege in the Mif file.
And i try to AEECLSID_POSDET_20 but its giving error as its not available in the aeeclsids.h
GPS.txt is very good. And I am undersatnding now this NMEA and how the cordinates come... !!
I think issue is How to get privacy popup?
Regards
Neha

u dont generate a privacy popup..
It comes automatically with the code... Whenever the code encounters a
IPOSDET_GetGPSInfo it automatically gives a pop up.... can u share ue code with me?? so that i can help u better

u dont generate a privacy popup..
It comes automatically with the code... Whenever the code encounters a
IPOSDET_GetGPSInfo it automatically gives a pop up.... can u share ue code with me?? so that i can help u better

This is my code u can have a look.
void GPSINIT()
{
int Err= ISHELL_CreateInstance( m_pIShell, AEECLSID_POSDET,
(void **)&pPos );
if(Err==SUCCESS)
{
CALLBACK_Init( &cbPosDet, LocBase::GPSCallBack, this );
theInfo =(AEEGPSInfo*)MALLOC(sizeof(AEEGPSInfo));
if(theInfo)
{
nErr=IPOSDET_GetGPSInfo(pPos,AEEGPS_GETINFO_LOCATION|AEEGPS_GETINFO_ALTITUDE,
AEEGPS_ACCURACY_HIGHEST,theInfo, &cbPosDet );
}
else
{
DBGPRINTF("GPS MALLOC not working");
p_ComErr=TRUE;
}
}
}
void GPSCallBack(LocBase *pApp)
{
switch(pApp->nErr)
{
case SUCCESS:
PrintGPSData();
break;
case EIDLE:
break;
case AEEGPS_ERR_TIMEOUT:
break;
default:
break;
}
}
Regards
Neha

This is my code u can have a look.
void GPSINIT()
{
int Err= ISHELL_CreateInstance( m_pIShell, AEECLSID_POSDET,
(void **)&pPos );
if(Err==SUCCESS)
{
CALLBACK_Init( &cbPosDet, LocBase::GPSCallBack, this );
theInfo =(AEEGPSInfo*)MALLOC(sizeof(AEEGPSInfo));
if(theInfo)
{
nErr=IPOSDET_GetGPSInfo(pPos,AEEGPS_GETINFO_LOCATION|AEEGPS_GETINFO_ALTITUDE,
AEEGPS_ACCURACY_HIGHEST,theInfo, &cbPosDet );
}
else
{
DBGPRINTF("GPS MALLOC not working");
p_ComErr=TRUE;
}
}
}
void GPSCallBack(LocBase *pApp)
{
switch(pApp->nErr)
{
case SUCCESS:
PrintGPSData();
break;
case EIDLE:
break;
case AEEGPS_ERR_TIMEOUT:
break;
default:
break;
}
}
Regards
Neha