Jump to content




[cc1.5.x][build 16] Gps Tower Builder

turtle

  • You cannot reply to this topic
45 replies to this topic

#1 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 08:47 AM

GPS Tower Builder

Easily Construct and (WIP: Deconstruct) GPS Clusters

Current Build is #16 (November 10, 2013)

http://pastebin.com/xhyTFyZp


Hello nerds, i have not really seen much on GPS clusters out there and ive seen a few programs that use GPS so why not deliver a way to get your satellites up in the sky without you having to do so. May i present my GPS Tower Builder. This program combines my old two GPS tower creator scripts into one where it can run and find coordinates off of a current GPS cluster or enter them in manually to start out. Also in my old program you had to create a separate startup file to get the GPS computers to run, not anymore this program creates a file on disk to run that creates the file to be saved on the computer with the correct coordinates so you do not have to. As for the clusters themselves they will always be constructed in the same orientation no matter what the turtle's orientation.

!! Important: include your 'debug.txt' file in post for bugs and errors !!

Usage:
  • for entering orientation you can use actual inworld facings (0,1,2,3) or you can enter in "North" or just the letter for a shorthand "N", "n" it is not case sensitive
  • to update program simply pass in -u argument
    <FILENAME> -u
  • to enable debugging info and log to file pass in argument "-d"
    <FILENAME> -d
  • if you are having errors updating pass in the debug argument after your update argument
    <PROGRAMNAME> -u -d
Features:
  • Creates a install file for activating gps clusters
  • Predicts fuel consumption/usage with details on how much coal or wood you need
  • Orientation smart
  • Cluster is constructed in same orientation
  • Simple & easy GUI interface
  • Inline Program updates (download once)
  • Save cluster locations on the turtle in a ".pos" file
  • Predicts next locations for cluster to expand coverage
  • Debugging
Planned features:
  • consolidate different file types into one package
  • "-r" argument to disassemble a GPS cluster
Ideas to implement:
  • goto next cluster position if user wants
  • intergrate option for a turtleAI API
Bugs and/or things to fix:
  • none at the moment
In Conclusion i would love feedback. use it, try and break it (within reason) as i have been working on this program the past few days and I have tested this to the best of my ability. There is still some things i want to add but for those of you that use it and think i missed something LET ME KNOW =D

Screenshots
Spoiler

How The Next Cluster Prediction Works
Spoiler

## Changelog ##
Spoiler

Edited by Cozzimoto, 12 January 2014 - 02:04 PM.


#2 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 08:54 AM

For getting rid of ".0" you could use string.format.

Possible next spot to place a gps cluster to stay in coverage sounds like great idea!.

I Love UI in this program. Looks nice and functional. Can't test it right now but i will :).

Edited by wojbie, 07 November 2013 - 09:01 AM.


#3 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 08:58 AM

Spoiler

ok thanks for the ".0", Once i find out a way to update the program with a simple argument ill add that fix in.

#4 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 09:06 AM

You could download paste and compare it to contents of program. If there is a difference save pastebin version onto program and quit.
Something like (Danger pseudocode!)
Spoiler

Is it possible to make it build just top part (cross on top) without long vertical column to ground??

Edited by wojbie, 07 November 2013 - 09:07 AM.


#5 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 09:10 AM

in my mind i put the column for a little sense of realism, but i think i can add an option for the user to decide if they would want the column built or not. i thought it would be cool to see where your GPS Clusters are

#6 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 09:33 AM

updated to Build 8

+ option to construct center column or not right before the start program command

#7 Nujugi

  • Members
  • 15 posts

Posted 07 November 2013 - 02:40 PM

Hi.

I tried to make my first GPS tower, but got this error:
302: attempt to perform arithmetic __sub on number and nil

The line is: meta.targHeight = math.ceil(254 - meta.yPos)

Anyone know why?

I'm using: GPS Tower Builder B:8 http://pastebin.com/xhyTFyZp

Edited by Nujugi, 07 November 2013 - 02:43 PM.


#8 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 02:52 PM

Also got small suggestion.
Right now this program won't work on standard computer.
if you added
if not turtle then print("This program needs a turtle to work") return end
Then it would error in way people would understand why it don't work.
Always assume end user will do weird stuff.

#9 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 03:21 PM

yea good point, ive added that into the next build. i got a question for you wojbie. i got an idea for how ill do the update check within the program. so my question is if i create a startup file to run temporary is there a way to delete that startup file when the operation is complete?

#10 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 03:23 PM

When work is done but before ending program simply add
fs.delete("/startup")
And it wll get deleted.

Edited by wojbie, 07 November 2013 - 03:23 PM.


#11 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 03:28 PM

ok then yea i figure so but i was not sure if it would crash because i was attempting to delete a file while it was running, but yea here in a few hours i should have an auto updater for build #9

#12 Nujugi

  • Members
  • 15 posts

Posted 07 November 2013 - 03:59 PM

Hi Cozzimoto

Did you see my post? ;)


Spoiler


#13 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 04:27 PM

Spoiler

hmm that error shows that the Y Position was not entered in the setup part of the program, what was your step by step operation to re-create the crash?

#14 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 05:31 PM

updated to Build #9

+ '-u' argument to check for updates, to use <FILENAME> -u
+ Fix crash if program was ran on a computer/Advanced computer

#15 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 05:38 PM

Stupid question but why create startup file in order to update? Is it part of some long - term plan of some sort?
Cause same code run from program would do same action.

That would skip creating startup file / resetting / removing it.

#16 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 05:43 PM

well i didnt want to edit the file currently being in use. most updates on windows after they are installed they usually require a reboot.

so what i did is i download the update create a startup file to run that reads and checks the file versions and if the downloaded version is newer it deletes the current one and replace it with the downloaded one. and after the startup is finished it deletes the startup file.

#17 Wojbie

  • Members
  • 631 posts
  • LocationKinda lost

Posted 07 November 2013 - 05:45 PM

Oh i see what are you making here :D Never mind then.

Edited by wojbie, 07 November 2013 - 05:45 PM.


#18 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 05:58 PM

Updated Build 10

its a little hard to test this but i just found an issue when trying to run the program without checking the -u argument so i pushed a quick fix on build 10

#19 Nujugi

  • Members
  • 15 posts

Posted 07 November 2013 - 06:35 PM

Nothing happend befor the error :(
The was the first thing it show after i run the program.

Thanks for fast reply

View PostCozzimoto, on 07 November 2013 - 04:27 PM, said:

Spoiler

hmm that error shows that the Y Position was not entered in the setup part of the program, what was your step by step operation to re-create the crash?


#20 Cozzimoto

  • Members
  • 221 posts
  • LocationDallas, Tx

Posted 07 November 2013 - 06:48 PM

Spoiler

hmm interesting, well ive done a few changes and updated the version on the program, if you can try the new update and if the error happens again let me know.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users