Board index FlightGear Support Tools Atlas

Atlas-like application on Android

Atlas is an addon that lets FlightGear users display a real-time "moving-map" of their flight.

Re: Atlas-like application on Android

Postby guzzi948 » Tue Jun 12, 2012 11:35 am

Thanks for the app, the screen shots look good, but I've not yet had things running on my tablet as yet (Toshiba AT100 running 3.2.1).
I'm getting the following msg:
java.lang.StringIndexOutOfBoundsException: start=0 end=-1 length=512
Did you update andatlas.xml in your PC?
Run fgfs using --generic=socket, out 10, xxx.xxx.xxx.xxx, 5501, andatlas --telnet=9000

The path to andatlas.xml is- C:\Program Files (x86)\FlightGear 2.4.0\data\Protocol, and on the select paths page I have setup the executable to run- C:\Program Files (x86)\FlightGear 2.4.0\bin\Win32\fgfs.exe "--generic=socket,out,10,xxx.xxx.xxx.xxx,5501,udp,andatlas --telnet=9000"

Am I making a fundamental numpty error? Or is there a deeper cause?

Any help at this time will be greatly appreciated, thanks
User avatar
guzzi948
 
Posts: 50
Joined: Tue Jun 12, 2012 11:20 am
Location: Queensland Australia
Callsign: VH-948
Version: 2017.1.3
OS: Win10-64

Re: Atlas-like application on Android

Postby ludomotico » Tue Jun 12, 2012 12:58 pm

krmmichal, the very first version of the application was full screen, and the commands for a full sreen mode are present in the code... but not used. Devices with Android 4.0 (most tablets) do not have a physical button to trigger the menu, and they need the top bar to select panels and preferences. I'll think how to cope with this issue, but any idea from a user of Android 4.0 will be appreciated.

In the meantime and if you know something about Android development, you can download the source code from github and comment out the corresponding lines (two lines, if a recall correctly) from the method onCreate() of FlightGearMap.java.

guzzi, StringIndexOutOfBounds means that the file andatlas.xml does not match the same version than FlightGearMap.

Which link did you use to download andatlas.xml? I confirm that you can download the version of andatlas.xml that works with the last update from https://raw.github.com/Juanvvc/FlightGe ... datlas.xml
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Atlas-like application on Android

Postby guzzi948 » Wed Jun 13, 2012 3:23 pm

Thanks for your response re andatlas.xml, I was using an older version, however I am still recieving the same error msg.
User avatar
guzzi948
 
Posts: 50
Joined: Tue Jun 12, 2012 11:20 am
Location: Queensland Australia
Callsign: VH-948
Version: 2017.1.3
OS: Win10-64

Re: Atlas-like application on Android

Postby ludomotico » Fri Jun 15, 2012 9:05 am

I'm 95% sure that this error is caused by a mismatch between the version of andatlas.xml and FlightGearMap.

Can you remove FlightGearMap from your device and andatlas.xml from your PC? Then, start fgfs again WITHOUT andatlas.xml and using exactly the same command and parameters (i.e, fgfs ---generic=socket,out,10, xxx.xxx.xxx.xxx,5501,andatlas) In this case, fgfs should fail complaining about a missing andatlas.xml. This is just to be sure that there is not any old andatlas.xml in the way. Then, download and install the last version of andatlas.xml and run fgfs again. It should run without any error. Finally, download and install FlightGearMap on your device. It should work now.

I have just followed this process using a clean install of the last versions of andatlas.xml and FlightGearMap (using fgfs 2.4 just in case, my main computer has fgfs 2.6), and it worked without any error.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Atlas-like application on Android

Postby icaunais » Mon Jun 18, 2012 7:57 pm

Looks good.
Could you make it available for Android 1.6?
icaunais
 
Posts: 4
Joined: Sun Jan 01, 2012 2:46 pm
OS: Linux

Re: Atlas-like application on Android

Postby jcuk » Wed Jun 20, 2012 11:46 am

Hi

This is looking great

I've been thinking about the same sort of app on iOS for a while and made a start. Currently I've got a very basic iphone map app that follows the location of the plane with heading info. It might be able to get in a state where I could be submitted to the istore for approval in the next few days. Ultimately I'd like to expand it into an iPad app with the same sort of instrumentation your showing.
FGMap for iOS Available now for iPhone and iPad
jcuk
 
Posts: 22
Joined: Sat Jun 02, 2012 9:35 pm
Location: Herts, UK
OS: OSX / Linux

Re: Atlas-like application on Android

Postby ludomotico » Wed Jun 20, 2012 3:21 pm

jcuk, those are good news. We can agree on a common format for the communication protocol, i.e., andatlas.xml (or any other name).
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Atlas-like application on Android

Postby jcuk » Thu Jun 21, 2012 4:32 pm

ludomotico wrote in Wed Jun 20, 2012 3:21 pm:jcuk, those are good news. We can agree on a common format for the communication protocol, i.e., andatlas.xml (or any other name).


I think some collaboration would be great. If I hadn't seen you app I probably wouldn't have got around to starting and would be still thinking about things, so if nothing else its good for motivation. I'm more than happy to use whatever you've specified in the andatlas.xml file as you're implementation is way ahead of mine - although we might have to do something about the name :D. I still plan to get the iOS map v1.0 out to the iStore next week. Functionally its there I just need to add a config screen for the machine name / telnet port, info screen and then all the extra bit and pieces to get the app registered (icons, description, screenshots, instructions, test rig .....) that always takes longer than expected. If it goes out next week it should be available 1st or 2nd week of July (providing it gets approved!). I think the screen on the iPhone is probably too small to put instruments on although I might just give it a try anyway. I'm developing on a 13" MacBook at the moment, and iPad development is difficult as the simulator takes up most of the screen space. I'm probably only going to start when I get a new 15" MBP which should make things easier.

For testing I've knocked up a small Java Telnet app. It implements some of the FlightGear telent responses so I don't need to have the full version of flight gear running to test. Currently it supports only dump /orientation and dump /position and simulates a plane flying in circles round London Heathrow, but could be easily expanded. If this would be useful to you, let me know and I'll let you have the source.
FGMap for iOS Available now for iPhone and iPad
jcuk
 
Posts: 22
Joined: Sat Jun 02, 2012 9:35 pm
Location: Herts, UK
OS: OSX / Linux

Re: Atlas-like application on Android

Postby jcuk » Fri Jun 22, 2012 12:16 am

A quick screen shot of the iPhone version while I'm circling LHR. Not very exiting!
Image
FGMap for iOS Available now for iPhone and iPad
jcuk
 
Posts: 22
Joined: Sat Jun 02, 2012 9:35 pm
Location: Herts, UK
OS: OSX / Linux

Re: Atlas-like application on Android

Postby ludomotico » Fri Jun 22, 2012 9:36 am

In my experience, I found that using telnet to stream data from fgfs to the remote application was too slow to be usable. Using telnet, you can read or write data about twice a second, just as the documentation says, and trying a shorter update period blocks the client. 2Hz may be suitable for showing the position of the plane on a map or change switches, but it is clearly not enough for instruments. Figuring out a way to solve this limitation was the main reason for the long delay in the last update of my application.

Thus, I'm using UDP for fast downstream communication (instruments, position, engines...), and telnet for the slower upstream communication (instrument calibration and switches), that is something that is expected that the pilot does just once in a while. I was not able to push data into fgfs using UDP and a custom protocol: it is documented in README.IO and README.protocol, but I wasn't able to have that bit working.

Of course, if your experience is different, please, tell us.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Atlas-like application on Android

Postby jcuk » Fri Jun 22, 2012 10:09 am

I have noticed a few problems with higher refresh rates. I would occasionally miss responses and then the responses and requests would get out of step (I'd get a position instead of an orientation response). I think this might be a manifestation of what your describing. I fixed it by processing the response by its contents rather than by what request generated it and didn't think any more about it. I'll test some more against and actual FG server rather than my mock server and see what rates I can get. 2Hz doesn't sound too bad for map updates I could live with that.
I wasn't aware of the custom protocol, thanks for pointing that out. I'll take a look at that before starting anything to do with instrumentation. Hopefully I'll be able to get away without implementing this for this simple mapping in v1.0.

Jason
FGMap for iOS Available now for iPhone and iPad
jcuk
 
Posts: 22
Joined: Sat Jun 02, 2012 9:35 pm
Location: Herts, UK
OS: OSX / Linux

Re: Atlas-like application on Android

Postby ludomotico » Fri Jun 22, 2012 2:11 pm

Just for clarification, andatlas.xml (or mobileatlas.xml :) ) defines a custom protocol from fgfs to mobile devices in the "output" section of the file. It includes location information as well as instruments. It is the other way what I wasn't able to get working, a custom protocol from the device to fgfs. That is, the "input" section of andatlas.xml. Currently, I'm using telnet for this part of the communication.
User avatar
ludomotico
 
Posts: 1269
Joined: Tue Apr 24, 2012 2:01 pm
Version: nightly
OS: Windows 10

Re: Atlas-like application on Android

Postby jcuk » Tue Jun 26, 2012 11:42 pm

Righto, the iOS version is done and submitted to the iStore, so providing its approved, it should be available in the first week of July. When (or if!) it gets approved, I'll start a new thread announcing it.

I've not got a lot of time in the next few days, but I'll start to look at the UDP stuff for the instrumentation as soon as I can.
FGMap for iOS Available now for iPhone and iPad
jcuk
 
Posts: 22
Joined: Sat Jun 02, 2012 9:35 pm
Location: Herts, UK
OS: OSX / Linux

Re: Atlas-like application on Android

Postby jcuk » Tue Jul 10, 2012 9:23 am

The approval took a bit longer than usual, but the iOS version 1.0 is now on the istore :D

http://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=540190228&mt=8

I've done some work in importing the instruments for the next version, but it might be a while before I make any significant progress. In the mean time I'll start a thread specifically for the iOS version for questions, comments and updates.
FGMap for iOS Available now for iPhone and iPad
jcuk
 
Posts: 22
Joined: Sat Jun 02, 2012 9:35 pm
Location: Herts, UK
OS: OSX / Linux

Re: Atlas-like application on Android

Postby gigirock » Mon Jul 30, 2012 1:39 pm

Hi all,

I think that many people have problems at least with Android version, due to the fact that we don't use the same launcher to run our fgfs.
Personally I'm running fgfs using FGO! application under linux ubuntu

When you have this error you want to add this line to your launch line, but note that those are 2 lines !

"Run fgfs using --generic=socket, out 10, xxx.xxx.xxx.xxx, 5501, andatlas --telnet=9000" means:

--generic=socket, out 10, xxx.xxx.xxx.xxx, 5501, andatlas
--telnet=9000

in fgo! configuration....otherwise with fgo! fgfs runs but flightgearmap doesn't work

I think is the same in fgrun , there are two different places where you specify telnet port and where you specify socket...

:)
GiGiRock....sky is the limit
gigirock
 
Posts: 6
Joined: Wed Jul 18, 2012 9:31 am

PreviousNext

Return to Atlas

Who is online

Users browsing this forum: No registered users and 2 guests