Skip to content

Commit

Permalink
added LatLng
Browse files Browse the repository at this point in the history
  • Loading branch information
Ivan Stanojevic committed Mar 16, 2015
1 parent 66ff8d1 commit 8de00e0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions TLE/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -275,12 +275,13 @@ class Parser
* Class Constructor.
*
* @param $tleString string TLE Data.
* @param $dateTime array DateTime array as result from getdate() function.
*
* @throws \Exception
*/
public function __construct($tleString) {
public function __construct($tleString, $dateTime = null) {
$this->dateTimeZone = new \DateTimeZone('UTC');
$this->currentDateTime = getdate();
$this->currentDateTime = ($dateTime == null) ? getdate() : $dateTime;

$lines = explode("\n", $tleString);

Expand Down
1 change: 1 addition & 0 deletions examples.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
2 25544 51.6451 186.7036 0008612 107.8141 252.3953 15.55144393 13625';

foreach($tleData as $tle) {

echo "<pre>"; print_r($tle); echo "</pre>";

$parser = new Parser($tle);
Expand Down

0 comments on commit 8de00e0

Please sign in to comment.