JAFVA: A multiplayer Scene (4)

The JAFVA forum
sanhozay
Posts: 167
Joined: Fri Sep 25, 2015 5:59 pm

Re: JAFVA: A multiplayer Scene (4)

Postby sanhozay » Wed Mar 07, 2018 12:09 pm

So how are you logging your flights IH-COL? Python application with HTTP calls out from Flightgear?

I have a logging application which does something similar, although it's more of an overall flight record than a track log:

https://github.com/sanhozay/PilotLog

How are you displaying the GeoJSON on a map?

User avatar
IAHM-COL
Posts: 6413
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: JAFVA: A multiplayer Scene (4)

Postby IAHM-COL » Wed Mar 07, 2018 3:38 pm

oh nice PilotLoggin' app Richard S.

This is the problem I am facing: For JAFVA to run correctly, a service of proper flight loggin is needed. The mpserver12 died, which was a nice one in terms of functionality but ended up being evil for management. The flight-logger than runs on mpserver15, and that services every interconnected mpserver now requires registering callsigns. Which comes around to be problematic for JAFVA because one pilot has infinite combinations of possible callsigns, like DAL4244, SWA4244, and later UAL4243, etc. I can't possibly register every combination of callsigns I would end up using on JAFVA, and therefore mpserver15 does not track me as I want.

Then we have the jafva/fgmembers mpserver. This one has currently 2 main issues: Firstly, it does not connect to any other mpserver, so it creates and encapsulated and separated multiplayer server (therefore, most frequent than not, server but not multiplayer :S ), the second issue is that currently does not have tracking capabilities. So, if I were to encourage JAFVA pilots, or myself to just fly there, I would still be unable to collect a FlightLog that serves the additional purpose of flight validation.

With that problem in hand, a PilotLog like yours is very handy. My approach to save my flights is much (much much) raw than yours. I am using the generic protocol to output to a csv file a certain number of property trees nodes, like location lat, lon, alt, date/time, simrate, groundspeed. A few handful of logical ones. Coincidentally my generic protocol xml is called blackbox D:

I left you in your PilotLog an example of a generic protocol out piped blackbox.csv:
https://github.com/sanhozay/PilotLog/fi ... ox.csv.zip

Secondly I am getting a gpx file from skyvector from Flightplanning. These are simple to generate manually, but I am knocking my head off to figure out how to generate auto. Regardless of, I could maybe ask JAFVA pilots to upload me a file with the gpx; if they desired the route track added.

Finally, a little/dirty python script is taking as input the csv and the gpx and producing a customized version of a geojson. The geojson implementation is very simple but also easily expandable, so it came real handy.
One can use a few mapping application to, per example have a webpage print a map. Also with the geojson that I produce one could add some plots of some of the geojson tracks like (groundspeed ~ time ellapsed in s), (altitude ~ time), (simrate ~ time) which allows visually to verify the flight. Also some of my apps in my linux desktop can open a geojson (like marble, or gnome-maps) and I'm sure other options for other OSes exist.

An example of a geojson for the last flight has be added to your pilotLog for reference
https://github.com/sanhozay/PilotLog/fi ... eojson.zip

Finally, a quick and dirty technique to generate this map without having a webpage snippet with the map application (which is not hard to do, either if you have a webpage to display the map);

I go to this webpage:
http://geojson.io/#new

In the menu: Open->File-> Load the geojson. If the json code is valid: Boom.
Also, if I follow in the menu: Share, I get a shareable url for my generated map.


Let me know if you have further questions, and also if you would be willing to help our airline to establish a functional pilotLogging tracking technique that is simple to use and reliable.

I like your solution a lot. I also like of mine that the only thing that would break logging is a FG crashing. Failure to connect to the internet has no effect.

Best,
Israel
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

sanhozay
Posts: 167
Joined: Fri Sep 25, 2015 5:59 pm

Re: JAFVA: A multiplayer Scene (4)

Postby sanhozay » Wed Mar 07, 2018 4:39 pm

IAHM-COL wrote:Let me know if you have further questions, and also if you would be willing to help our airline to establish a functional pilotLogging tracking technique that is simple to use and reliable.

Thanks for all that info. Very useful.

It's not particularly difficult for me to change PilotLog to make a track log for each flight (in fact, I was thinking about doing it). I'm already making frequent callbacks from Flightgear to update the maximum altitude (which becomes the cruise altitude in the log), the fuel and odometer. Adding latitude and longitude is trivial and making a one-to-many between a flight and it's track points is trivial. Matching the GeoJSON format is probably the hardest part and that's not that difficult either. I'll look into it -- it's just finding the time to do it.

I like your solution a lot. I also like of mine that the only thing that would break logging is a FG crashing. Failure to connect to the internet has no effect

Actually PilotLog defaults to running on localhost -- no internet connection is required. I run it on a separate machine on my LAN because the PC I run Flightgear on only has 4GB of memory and the memory footprint of PilotLog is around 300MB, but it doesn't need an internet connection. Whether that is useful for JAFVA is another question.

Secondly I am getting a gpx file from skyvector from Flightplanning. These are simple to generate manually, but I am knocking my head off to figure out how to generate auto. Regardless of, I could maybe ask JAFVA pilots to upload me a file with the gpx; if they desired the route track added.

That's probably the best approach. It wouldn't be hugely difficult to take a list of fixes and navaids and make a .gpx from Flightgear data but the Flightgear airways database is not sufficiently complete to handle airway routings. SkyVector must have a very good airways database to generate the .gpx files.

User avatar
IAHM-COL
Posts: 6413
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: JAFVA: A multiplayer Scene (4)

Postby IAHM-COL » Wed Mar 07, 2018 5:06 pm

1. I can pass you my dirty Python script for piping out the geojson. That can save you some crafting.
I'll have to wait a few to have access to that file, so bear with me.
(And don't judge me on the ugliness of the code. It was a fast and furious kind of a hack :blush:


2. About gpx
I've been thinking I could allow for a fgfp type of input in addition to the gpx the flight plan track can be generated from the route manager as well.
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

sanhozay
Posts: 167
Joined: Fri Sep 25, 2015 5:59 pm

Re: JAFVA: A multiplayer Scene (4)

Postby sanhozay » Wed Mar 07, 2018 5:20 pm

This being Java and Spring, I would hope that I wouldn't have to write any code to write the JSON. It's more a case of making a Java object in the matching format and then returning that from the web service method. This is how PilotLog produces the list of flights in JSON format.

Code: Select all

    @GetMapping(path = "flights.json", produces = {APPLICATION_JSON_VALUE})
    public List<Flight> flightsJSON() {
        return flightService.findAllFlights();
    }


But send it anyway, I'd be interested.

User avatar
IAHM-COL
Posts: 6413
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: JAFVA: A multiplayer Scene (4)

Postby IAHM-COL » Wed Mar 07, 2018 7:30 pm

sanhozay wrote:But send it anyway, I'd be interested.


OK;
I pasted it as comment there in the github information issue

https://github.com/sanhozay/PilotLog/issues/7
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

sanhozay
Posts: 167
Joined: Fri Sep 25, 2015 5:59 pm

Re: JAFVA: A multiplayer Scene (4)

Postby sanhozay » Thu Mar 08, 2018 1:35 pm

I've changed PilotLog to maintain a list of track points for a flight, which was fairly straightforward. Internally, this is tracking coordinate, altitude, fuel and odometer. Making a new web service endpoint for GeoJSON was made a lot simpler by a set of GeoJSON objects for the Jackson mapper that someone has kindly created. So I have basic flight tracking in PilotLog now.

I've made these changes in a new branch "feature/Track". If you want to try it, clone this branch and run PilotLog with gradle. (Make sure you stop any other instances of PilotLog that you might have running):

Something like this ... may not work but you'll figure it out.

Code: Select all

git clone https://github.com/sanhozay/PilotLog.git # if you haven't already
cd PilotLog
git checkout feature/Track
./gradlew bootRun

You'll need the use updated pilotlog.nas from src/main/nasal. This goes in ~/.fgfs/Nasal.

Open a browser and go to http://localhost:8080. Start a flight and it should appear in "pencil" in the flight log. The date column in the flight log has a temporary link which opens a new window or tab with the GeoJSON. Copy the GeoJSON and paste into the geojson.io site to view the track. You can refresh the tab with the GeoJSON to see updated results.

To stop PilotLog, ctrl-c in the terminal window where gradle is running the bootRun task.

It's still a work in progress, but it's tracking flights. :D

Here's a sample:

Code: Select all

{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"marker-symbol":"circle","marker-color":"#800000","title":"EGCK"},"geometry":{"type":"Point","coordinates":[-4.340212821960449,53.10452651977539,18.167072296142578]}},{"type":"Feature","properties":{},"geometry":{"type":"LineString","coordinates":[[-4.340212821960449,53.10452651977539,18.167072296142578],[-4.341750621795654,53.10057067871094,95.06945037841797],[-4.343276500701904,53.09659957885742,288.7058410644531],[-4.34474515914917,53.09273910522461,468.7197265625],[-4.346209526062012,53.08891296386719,645.5103759765625],[-4.347677230834961,53.08510208129883,822.703369140625],[-4.348474979400635,53.08122253417969,994.96923828125],[-4.346762180328369,53.07734298706055,1166.2255859375],[-4.3425750732421875,53.07398986816406,1339.5693359375],[-4.3364129066467285,53.07163619995117,1513.2286376953125],[-4.328962326049805,53.07060241699219,1687.2960205078125],[-4.321043014526367,53.07107162475586,1861.65185546875],[-4.313418865203857,53.072898864746094,2039.45654296875],[-4.305719375610352,53.07499313354492,2201.066650390625],[-4.297772407531738,53.07712936401367,2381.164794921875],[-4.289713382720947,53.079288482666016,2564.66455078125],[-4.2816081047058105,53.08146286010742,2746.934814453125],[-4.273451328277588,53.08365249633789,2928.02587890625],[-4.265246868133545,53.08584976196289,3108.11865234375],[-4.257030487060547,53.088050842285156,3286.0673828125],[-4.24880313873291,53.09025192260742,3444.50732421875],[-4.240535736083984,53.092464447021484,3615.607666015625],[-4.232378005981445,53.09464645385742,3781.928466796875],[-4.224316120147705,53.09679412841797,3859.70703125],[-4.215898513793945,53.0990104675293,3886.5341796875],[-4.207151889801025,53.10129165649414,3895.86962890625],[-4.19827938079834,53.10358428955078,3883.97900390625],[-4.189366817474365,53.10589599609375,3881.599365234375],[-4.180499076843262,53.10819625854492,3905.786376953125],[-4.171874046325684,53.11045455932617,3958.164306640625],[-4.163405895233154,53.1126823425293,3999.296630859375],[-4.154995918273926,53.11489486694336,4038.504150390625],[-4.146611213684082,53.117095947265625,4077.790283203125],[-4.138261318206787,53.11928939819336,4117.69384765625],[-4.129918575286865,53.12147903442383,4158.49365234375],[-4.121584415435791,53.123661041259766,4199.7724609375],[-4.113248348236084,53.12583923339844,4241.47021484375],[-4.104928016662598,53.12800979614258,4283.45166015625],[-4.09660005569458,53.13018035888672,4326.59619140625],[-4.088268280029297,53.132347106933594,4376.22265625],[-4.079868793487549,53.134521484375,4391.16259765625],[-4.071450233459473,53.13668441772461,4377.6630859375],[-4.063270092010498,53.13895797729492,4384.978515625],[-4.0552897453308105,53.14134216308594,4387.81689453125],[-4.0473198890686035,53.143714904785156,4385.9296875],[-4.039412021636963,53.14607238769531,4393.1376953125],[-4.031525611877441,53.14849090576172,4391.72998046875],[-4.0245466232299805,53.15185546875,4392.12060546875],[-4.019349098205566,53.15627670288086,4394.494140625],[-4.014838218688965,53.16099166870117,4396.42333984375],[-4.010305404663086,53.165714263916016,4393.54931640625],[-4.005753040313721,53.170448303222656,4393.65087890625],[-4.001197338104248,53.1751823425293,4392.45654296875],[-3.996638059616089,53.17991256713867,4391.99169921875],[-3.992079257965088,53.184635162353516,4392.4541015625],[-3.987499237060547,53.18937683105469,4399.00634765625],[-3.9828879833221436,53.19414138793945,4393.2236328125],[-3.97825026512146,53.19892120361328,4385.19970703125],[-3.973651647567749,53.20365905761719,4391.21044921875],[-3.969066619873047,53.208377838134766,4393.68359375],[-3.964463472366333,53.21310806274414,4387.70947265625],[-3.9598686695098877,53.21781921386719,4390.369140625],[-3.9552762508392334,53.2225227355957,4392.77099609375],[-3.9506778717041016,53.22722625732422,4391.92529296875],[-3.94602632522583,53.231903076171875,4392.8291015625],[-3.9400177001953125,53.2359504699707,4390.21826171875],[-3.9324302673339844,53.23872375488281,4391.60498046875],[-3.924349308013916,53.240848541259766,4393.39208984375],[-3.9162421226501465,53.24296188354492,4392.56005859375],[-3.9081170558929443,53.24507141113281,4392.5419921875],[-3.8999838829040527,53.2471809387207,4392.2314453125],[-3.8918521404266357,53.24928283691406,4392.18603515625],[-3.883709192276001,53.25138473510742,4392.07470703125],[-3.8755829334259033,53.25347900390625,4392.10009765625],[-3.8674333095550537,53.25557327270508,4392.12646484375],[-3.8592936992645264,53.25766372680664,4392.10791015625],[-3.851137161254883,53.2597541809082,4392.10888671875],[-3.842984676361084,53.261837005615234,4392.10498046875],[-3.834829568862915,53.263916015625,4392.1064453125],[-3.826664924621582,53.265995025634766,4392.1083984375],[-3.8185112476348877,53.268070220947266,4392.11181640625],[-3.8103621006011963,53.270137786865234,4392.11474609375],[-3.802190065383911,53.2722053527832,4392.1181640625],[-3.7940289974212646,53.274269104003906,4392.12060546875],[-3.785872459411621,53.27632522583008,4392.1220703125],[-3.7777068614959717,53.27838134765625,4392.12353515625],[-3.7695250511169434,53.28043746948242,4392.12451171875],[-3.761340856552124,53.28248977661133,4392.125],[-3.7531747817993164,53.2845344543457,4392.12548828125],[-3.7450063228607178,53.28657531738281,4392.1259765625],[-3.7368288040161133,53.288612365722656,4392.1259765625],[-3.7286555767059326,53.2906494140625,4392.1259765625],[-3.7204666137695312,53.29268264770508,4392.1259765625],[-3.7122888565063477,53.294708251953125,4392.1259765625],[-3.704101800918579,53.29673385620117,4392.1259765625],[-3.695905923843384,53.29875946044922,4392.1259765625],[-3.6877143383026123,53.300777435302734,4392.1259765625],[-3.679513692855835,53.30279541015625,4392.1259765625],[-3.6713175773620605,53.3048095703125,4392.1259765625],[-3.663119077682495,53.306819915771484,4392.1259765625],[-3.6549184322357178,53.3088264465332,4392.1259765625],[-3.6467223167419434,53.31082534790039,4392.1259765625],[-3.638584613800049,53.31279754638672,4415.4560546875],[-3.630560874938965,53.31473922729492,4419.44873046875],[-3.6224727630615234,53.31668472290039,4418.98486328125],[-3.6143548488616943,53.318634033203125,4419.9423828125],[-3.606205940246582,53.320587158203125,4419.21337890625],[-3.598047971725464,53.322532653808594,4418.92041015625],[-3.589879035949707,53.32448196411133,4418.56298828125],[-3.581709861755371,53.32642364501953,4418.421875],[-3.5735297203063965,53.328365325927734,4418.4169921875],[-3.565340280532837,53.33030700683594,4418.53271484375],[-3.557128429412842,53.33224868774414,4418.7255859375],[-3.5489490032196045,53.33418273925781,4418.9609375],[-3.540748357772827,53.33605194091797,4419.20166015625],[-3.5323832035064697,53.33755874633789,4419.25],[-3.523981809616089,53.33902359008789,4412.025390625],[-3.51550555229187,53.34048080444336,4402.3095703125],[-3.5070810317993164,53.3419303894043,4409.06689453125],[-3.4986748695373535,53.34337615966797,4410.2197265625],[-3.4903035163879395,53.344810485839844,4412.60546875],[-3.481940269470215,53.34624481201172,4413.99951171875],[-3.4735629558563232,53.34767532348633,4415.0068359375],[-3.4651758670806885,53.34910583496094,4415.64013671875],[-3.4567911624908447,53.350528717041016,4416.0244140625],[-3.448401927947998,53.351951599121094,4416.271484375],[-3.4398226737976074,53.353214263916016,4394.12353515625],[-3.4310760498046875,53.354305267333984,4400.7724609375],[-3.422330141067505,53.35538864135742,4402.1064453125],[-3.4135496616363525,53.356468200683594,4402.22314453125],[-3.4047751426696777,53.3575439453125,4402.45654296875],[-3.3959622383117676,53.35861587524414,4402.1640625],[-3.3871452808380127,53.359683990478516,4402.0],[-3.3782527446746826,53.360748291015625,4349.34130859375],[-3.369304656982422,53.36176300048828,4246.08203125],[-3.3602771759033203,53.36181640625,4135.54931640625],[-3.3513023853302,53.361202239990234,4027.122802734375],[-3.342305898666382,53.360496520996094,3916.8955078125],[-3.3334240913391113,53.35977554321289,3804.677734375],[-3.324765920639038,53.35906982421875,3682.81787109375],[-3.316347599029541,53.3583869934082,3548.663330078125],[-3.308224678039551,53.35773468017578,3404.019775390625],[-3.3002867698669434,53.35710525512695,3251.925537109375],[-3.2924177646636963,53.35648727416992,3098.1884765625],[-3.2844858169555664,53.35586929321289,2949.02783203125],[-3.276048183441162,53.355224609375,2825.506103515625],[-3.2669999599456787,53.354496002197266,2745.23974609375],[-3.257697105407715,53.353721618652344,2675.312255859375],[-3.2482073307037354,53.35291290283203,2603.769287109375],[-3.2386374473571777,53.35208511352539,2528.718994140625],[-3.2289586067199707,53.35121154785156,2448.912353515625],[-3.219403028488159,53.35032272338867,2444.70703125],[-3.210054874420166,53.34946060180664,2443.32666015625],[-3.2007980346679688,53.34860610961914,2443.685791015625],[-3.1916167736053467,53.34775161743164,2445.640380859375],[-3.18245792388916,53.34689712524414,2447.074462890625],[-3.1733410358428955,53.34604263305664,2448.319580078125],[-3.1642305850982666,53.345184326171875,2449.084228515625],[-3.155118942260742,53.34431838989258,2449.523193359375],[-3.146024227142334,53.343448638916016,2449.73388671875],[-3.1369221210479736,53.34257507324219,2449.809326171875],[-3.127826690673828,53.341697692871094,2449.8505859375],[-3.118730306625366,53.34081268310547,2449.880615234375],[-3.109602689743042,53.33992385864258,2449.92529296875],[-3.1005122661590576,53.33903121948242,2450.0107421875],[-3.091391086578369,53.338130950927734,2450.127685546875],[-3.08223032951355,53.33731460571289,2450.019775390625],[-3.0730130672454834,53.33663558959961,2452.642822265625],[-3.0639593601226807,53.33595657348633,2444.034423828125],[-3.0549983978271484,53.33528518676758,2443.615234375],[-3.0461559295654297,53.33462905883789,2444.844970703125],[-3.0372955799102783,53.333946228027344,2419.906005859375],[-3.0283942222595215,53.333045959472656,2401.181640625],[-3.019498348236084,53.33192825317383,2368.15966796875],[-3.0105843544006348,53.3306884765625,2342.36376953125],[-3.001584529876709,53.32949447631836,2296.00146484375],[-2.992408514022827,53.32831954956055,2245.051513671875],[-2.983173131942749,53.32700729370117,2193.308837890625],[-2.9739184379577637,53.32558822631836,2127.8505859375],[-2.964561700820923,53.324275970458984,2080.292236328125],[-2.955207347869873,53.3230094909668,2035.0775146484375],[-2.945901870727539,53.32177734375,1978.37939453125],[-2.936516046524048,53.32079315185547,1858.7640380859375],[-2.9269495010375977,53.32023239135742,1753.1976318359375],[-2.917314291000366,53.31996536254883,1643.668212890625],[-2.9076497554779053,53.31980514526367,1533.356201171875],[-2.8980278968811035,53.319664001464844,1432.719482421875],[-2.888404607772827,53.31949234008789,1314.5211181640625],[-2.8787343502044678,53.31923294067383,1210.504638671875],[-2.869084596633911,53.319000244140625,1104.3046875],[-2.8597464561462402,53.318721771240234,1012.0254516601562],[-2.8506784439086914,53.31843566894531,938.0471801757812],[-2.841979742050171,53.318214416503906,865.5409545898438],[-2.8336260318756104,53.317989349365234,848.5072631835938],[-2.825488805770874,53.317935943603516,795.8843383789062],[-2.817847967147827,53.31962966918945,727.6618041992188],[-2.813347101211548,53.323421478271484,647.9421997070312],[-2.8121228218078613,53.32748794555664,609.0217895507812],[-2.8127965927124023,53.331302642822266,513.2620849609375],[-2.8165462017059326,53.333961486816406,418.7390441894531],[-2.822000741958618,53.33477783203125,319.02545166015625],[-2.8274855613708496,53.33462905883789,239.76107788085938],[-2.8322880268096924,53.334407806396484,136.87191772460938],[-2.8367269039154053,53.33420181274414,88.83455657958984],[-2.8378498554229736,53.33415222167969,82.3921127319336]]}},{"type":"Feature","properties":{"marker-symbol":"circle","marker-color":"#008000","title":"EGGP"},"geometry":{"type":"Point","coordinates":[-2.8378498554229736,53.33415222167969,82.3921127319336]}}]}

User avatar
IAHM-COL
Posts: 6413
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: JAFVA: A multiplayer Scene (4)

Postby IAHM-COL » Thu Mar 08, 2018 2:20 pm

Really cool. I'll try this out soon.
I wonder if I could have a server set to receive these http transfers from this software as to have pilot logging for jafva getting tracked
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?

User avatar
IAHM-COL
Posts: 6413
Joined: Sat Sep 12, 2015 3:43 pm
Location: Homey, NV (KXTA) - U.S.A
Contact:

Re: JAFVA: A multiplayer Scene (4)

Postby IAHM-COL » Sun Mar 18, 2018 8:23 pm

@ALL

Pilot Roster updated to flight 1058


Congratulations to SP-BAN for reaching the highest rank in our airline, Captain (PIC) Senior,
and for currently leading our roster sheet


Starting now, his call-sign will be SP-BNA, or JAFVA2260 when flying any airline ICAO code.

Best,
IH-COL
JAFVA CEO
https://raw.githubusercontent.com/IAHM-COL/gpg-pubkey/master/pubkey.asc

R.M.S.
If we gave everybody in the World free software today, but we failed to teach them about the four freedoms, five years from now, would they still have it?


Return to “JAFVA - Just Another FlightGear Virtual Airline”

Who is online

Users browsing this forum: No registered users and 8 guests