Board index FlightGear Development New features

FlightGear SmartPhone APP

Discussion and requests for new features. Please note that FlightGear developers are volunteers and may or may not be able to consider these requests.

FlightGear SmartPhone APP

Postby JosLeDeta » Tue Nov 08, 2016 1:15 am

Hi everybody,

my idea is to make an APP to smartphone and tablet where i can control diferents parameters of autopilot...plane...flaps... using
a python script that it connects to MySQL database and send data to virtual serial port. I made the APP, it connects to web server using
http where it make a request to PHP file that write the app data to MySQL. At the same time, a Python script read the database and write
to virtual serial port '/dev/tnt0' thats is connected to port '/dev/tnt1' where i execute 'flightgear --generic=serial,in,30,/dev/tnt1,9600,test'
using a file test.xml previously configured to recieve the data in this serial port.

The problem is that flightgear doesnt do anything, i think that the problem is in how python write the data to virtual terminal..
Here i let you some screenshots ... Hope you would help me =)

Screenshot from python script showing the data to write:
Image

Screenchost from serial port /dev/tnt1:
Image
JosLeDeta
 
Posts: 3
Joined: Tue Nov 08, 2016 12:52 am
Location: Spain
OS: Linux,Windows,Mac

Re: FlightGear SmartPhone APP

Postby wkitty42 » Tue Nov 08, 2016 9:40 am

your pictures show the difference in line endings... are you transmitting CRLF or just CR or just LF?
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9123
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: FlightGear SmartPhone APP

Postby JosLeDeta » Tue Nov 08, 2016 8:39 pm

I corrected the code to write the data in a new line, you can see it in the next screenshot. But FlightGear still without do anything...

Screenshot from 'screen /dev/tnt1':
Image
JosLeDeta
 
Posts: 3
Joined: Tue Nov 08, 2016 12:52 am
Location: Spain
OS: Linux,Windows,Mac

Re: FlightGear SmartPhone APP

Postby JosLeDeta » Tue Nov 08, 2016 10:19 pm

I made it work, but not in serial, using socket and udp. Python sends data trough upd and it works.
JosLeDeta
 
Posts: 3
Joined: Tue Nov 08, 2016 12:52 am
Location: Spain
OS: Linux,Windows,Mac

Re: FlightGear SmartPhone APP

Postby Johan G » Wed Nov 09, 2016 11:13 am

Great. :)

There are some other Android apps for FlightGear available as well.
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6625
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit


Return to New features

Who is online

Users browsing this forum: despe and 1 guest