Board index FlightGear Development New features

Date selector

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

Date selector

Postby D-ECHO » Sun Dec 20, 2015 10:19 am

Hi,
I always found it sad that it is pretty difficult to set another date while in-simulator (via property menu), so I took the time selector and changed it a bit to have a date selector. One can select the months. Day is always set to the 21st (due to some great phenomenas occuring e.g. on the 21st of June for example in Norway).
Image
(Click to enlarge)
It can be downloaded here:
timeofyear.xml
(folder: $FGROOT/gui/dialogs/)
Warning: One has to reset time after setting the date!
Regard
PS: Could this maybe get into 3.8?
User avatar
D-ECHO
 
Posts: 1750
Joined: Sat May 09, 2015 12:31 pm

Re: Date selector

Postby sanhozay » Sun Dec 20, 2015 10:38 am

I think this is a really good idea but the buttons are a little cumbersome. Perhaps a combo box or slider would be better to adjust the month?

It would also be interesting to tie it to the season in the Environment settings (something that needs some thought because it is latitude dependent).
sanhozay
 
Posts: 1207
Joined: Thu Dec 26, 2013 11:57 am
Location: EGNM
Callsign: G-SHOZ
Version: Git
OS: Ubuntu 16.04

Re: Date selector

Postby dg-505 » Sun Dec 20, 2015 2:02 pm

I also would really welcome this feature!

Some thoughts:
- Would it be possible that the day remains the same and only the month is changed?
- If so, maybe the day can be selected via an input field? (Problem: Not every month has the same amount of days)
- Can it be combined with the Time dialog so that everything regarding time setting can be done in a single PUI window?
- To save space and keep the dialog window small, can the selection of the month be handled via a drop-down menu?
D-ECHO wrote in Sun Dec 20, 2015 10:19 am:[...]
one has to reset time after setting the date
[...]

- Is it possible (maybe via a nasal function) to read the time of day, then set the month/day and finally set the time back to the previous time?

Cheers
Jonathan
It's not just a hobby. I'ts a passion: FLYING !!

DHC-6 Twin Otter development
User avatar
dg-505
 
Posts: 619
Joined: Mon Jun 02, 2014 2:36 pm
Location: Bonn, Germany
Version: next
OS: Ubuntu 18.04 Bionic

Re: Date selector

Postby Hooray » Sun Dec 20, 2015 3:34 pm

I agree that this is a good idea, we have in fact seen quite a few discussions over the years where people wanted to set dates (or an era), ideally with an option to use different terrain/scenery (models) according to the date/time selected.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11475
Joined: Tue Mar 25, 2008 8:40 am

Re: Date selector

Postby D-ECHO » Sun Dec 20, 2015 5:49 pm

Well, the problem about the time is, that the property controlling this, /sim/time/gmt, is a string of the format
YYYY-MM-DDTHH:MiMi:SS, so it's quite difficult to put this together.
Please note that I've absolutely no experience with the dialogs and nasal.
User avatar
D-ECHO
 
Posts: 1750
Joined: Sat May 09, 2015 12:31 pm

Re: Date selector

Postby Hooray » Sun Jan 03, 2016 9:35 pm

if in doubt you may want to get in touch with the devel list, because it's currently being discussed there.

For now, I have updated the wiki article to mention your work:
http://wiki.flightgear.org/Time_in_Flig ... velopments

I believe that this is a worthwhile feature and that it could help FlightGear improve in other areas, just like being able to change airports/position, aircraft, we should also be able to change time without having to restart FlightGear - and if there are any remaining issues, it would be good to file dedicated bug reports for those: https://sourceforge.net/p/flightgear/codetickets/
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 11475
Joined: Tue Mar 25, 2008 8:40 am

Re: Date selector

Postby wkitty42 » Mon Jan 04, 2016 2:09 am

FWIW: i don't understand... most any language has the ability to merge string data into other strings... shirley, there has to be some method to convert numerics into strings for this...
"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: 5987
Joined: Fri Feb 20, 2015 3:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 14.04.5

Re: Date selector

Postby Richard » Mon Jan 04, 2016 8:04 am

Image

I've just added this to my FGData fork https://sourceforge.net/u/r-harrison/fg ... fe5182c4d/ and raised a merge request

Didn't use comboboxes or any fancy gui elements because of the possible range (for the year). There is also no validation or checking, and thus it could probably be improved.
Last edited by Richard on Tue Jan 05, 2016 11:39 am, edited 1 time in total.
Richard
 
Posts: 738
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10

Re: Date selector

Postby D-ECHO » Mon Jan 04, 2016 6:25 pm

Thanks!!
User avatar
D-ECHO
 
Posts: 1750
Joined: Sat May 09, 2015 12:31 pm

Re: Date selector

Postby Richard » Wed Jan 06, 2016 8:29 am

a few changes

Image

if you want to experiment / test it's here https://sourceforge.net/u/r-harrison/fg ... eofday.xml
Richard
 
Posts: 738
Joined: Sun Nov 02, 2014 10:17 pm
Version: Git
OS: Win10


Return to New features

Who is online

Users browsing this forum: No registered users and 2 guests