Skip to content

Commit

Permalink
Bad and temporary way to fix ending frequency range in exported csv f…
Browse files Browse the repository at this point in the history
…iles
  • Loading branch information
Dan Stark committed Feb 11, 2018
1 parent 66ff0a5 commit 19cfbaf
Show file tree
Hide file tree
Showing 7 changed files with 42 additions and 50 deletions.
Binary file modified .vs/RFEOnSite/v15/.suo
Binary file not shown.
Binary file modified .vs/RFEOnSite/v15/Server/sqlite3/storage.ide
Binary file not shown.
Binary file modified .vs/RFEOnSite/v15/sqlite3/storage.ide
Binary file not shown.
4 changes: 2 additions & 2 deletions RFEOnSite/FileOps.cs
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public bool IsValidPath(string path)
// ** Write CsvFiles from Swept List Data
// *****************************************************************************************
// *****************************************************************************************
public bool ExportCsvFile(double start, double stop, double stepSize, List<string> data)
public bool ExportCsvFile(double startMhz, double stopMhz, double stepSize, List<string> data)
{
mCsvExport = new CsvExport();

Expand All @@ -256,7 +256,7 @@ public bool ExportCsvFile(double start, double stop, double stepSize, List<stri
frequencyList.Clear();

//double stepMHz = stepSize / 1000.0;
double freq = start;
double freq = startMhz;
for (int step = 0; step < 112; step++)
{
frequencyList.Add(freq);
Expand Down
42 changes: 39 additions & 3 deletions RFEOnSite/Forms/Main Form/ApplicationMainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,8 +297,44 @@ public void UIUpdateCallback_SweepData(List<string> sweepsFromExplorer)
{
string fileName = TextBoxCollectionLocation.Text + "-" + gRFEOnSite.FileOps.FileCounter.ToString("D2") + " ";
string dateString = gRFEOnSite.FileOps.RunStartTime.ToString("yyyy-MM-dd HH-mm-ss", System.Globalization.DateTimeFormatInfo.InvariantInfo) + " ";
string rangeString1 = Convert.ToInt64(TextBoxStartFrequency.Text.Replace(".", "")).ToString("D5") + "to";
string rangeString2 = Convert.ToInt64(TextBoxStopFrequency.Text.Replace(".", "")).ToString("D5");

// Convert 714.3435 in MHz to string like 07143
// 714.0000 should be 07140
// The Text box may or may not have a decimal point
string rangeString1;
string rangeString2;

if (TextBoxStartFrequency.Text.Contains("."))
{
rangeString1 = Convert.ToInt64(TextBoxStartFrequency.Text.Replace(".", "")).ToString("D5") + "to";
}
else
{
rangeString1 = Convert.ToInt64(TextBoxStartFrequency.Text).ToString("D4") + "0to";
}


if (TextBoxStopFrequency.Text.Contains("."))
{
rangeString2 = Convert.ToInt64(TextBoxStopFrequency.Text.Replace(".", "")).ToString("D5");
}
else
{
rangeString2 = Convert.ToInt64(TextBoxStopFrequency.Text).ToString("D4") + "0";
}


// *********************************
// *********************************
// This is a BAD way of fixing the file name

double tempStopMhz = Convert.ToDouble(rangeString2);
double tempStepSize = Convert.ToDouble(TextBoxStepFrequency.Text);
string tempRangeString2 = (tempStopMhz - (tempStepSize/100.0)).ToString();
rangeString2 = Convert.ToInt64(tempRangeString2.Replace(".", "")).ToString("D5");


//**********************************

if (gRFEOnSite.RadialSurvey)
{
Expand Down Expand Up @@ -1009,7 +1045,7 @@ private void TextBoxStopFrequency_TextChanged(object sender, EventArgs e)
double start, stop, stepSize;
bool bStatus;

bStatus = Double.TryParse(TextBoxStopFrequency.Text, out start);
bStatus = Double.TryParse(TextBoxStartFrequency.Text, out start); // **** stop
Double.TryParse(TextBoxStopFrequency.Text, out stop);

if (bStatus)
Expand Down
44 changes: 0 additions & 44 deletions RFEOnSite/GlobalData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,24 +139,6 @@ public WhoopTable()
{
mPairs = new List<PresetTableEntry>();

//mPairs.Add(new PresetTableEntry(728.0, 739.2, eBand.e700));
//mPairs.Add(new PresetTableEntry(739.2, 750.4, eBand.e700));
//mPairs.Add(new PresetTableEntry(750.4, 761.6, eBand.e700));
//mPairs.Add(new PresetTableEntry(865.0, 876.2, eBand.e850));
//mPairs.Add(new PresetTableEntry(876.2, 887.4, eBand.e850));
//mPairs.Add(new PresetTableEntry(887.4, 898.6, eBand.e850));
//mPairs.Add(new PresetTableEntry(1929.0, 1940.2, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1940.2, 1951.4, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1951.4, 1962.6, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1962.6, 1973.8, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1973.8, 1985.0, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1985.0, 1996.2, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(2105.0, 2116.2, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2116.2, 2127.4, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2127.4, 2138.6, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2138.6, 2149.8, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2149.8, 2161.0, eBand.eAWS));

mPairs.Add(new PresetTableEntry(728.0, 739.1, eBand.e700));
mPairs.Add(new PresetTableEntry(739.2, 750.3, eBand.e700));
mPairs.Add(new PresetTableEntry(750.4, 761.5, eBand.e700));
Expand Down Expand Up @@ -194,32 +176,6 @@ public DownlinkTable()
{
mPairs = new List<PresetTableEntry>();

//mPairs.Add(new PresetTableEntry(714.0, 725.2, eBand.e700));
//mPairs.Add(new PresetTableEntry(725.2, 736.4, eBand.e700));
//mPairs.Add(new PresetTableEntry(736.4, 747.6, eBand.e700));
//mPairs.Add(new PresetTableEntry(747.6, 758.8, eBand.e700));
//mPairs.Add(new PresetTableEntry(758.8, 770.0, eBand.e700));

//mPairs.Add(new PresetTableEntry(865.0, 876.2, eBand.e850));
//mPairs.Add(new PresetTableEntry(876.2, 887.4, eBand.e850));
//mPairs.Add(new PresetTableEntry(887.4, 898.6, eBand.e850));

//mPairs.Add(new PresetTableEntry(1929.0, 1940.2, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1940.2, 1951.4, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1951.4, 1962.6, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1962.6, 1973.8, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1973.8, 1985.0, eBand.ePCS));
//mPairs.Add(new PresetTableEntry(1985.0, 1996.2, eBand.ePCS));


//mPairs.Add(new PresetTableEntry(2105.0, 2116.2, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2116.2, 2127.4, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2127.4, 2138.6, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2138.6, 2149.8, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2149.8, 2161.0, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2161.0, 2172.2, eBand.eAWS));
//mPairs.Add(new PresetTableEntry(2172.2, 2183.4, eBand.eAWS));

mPairs.Add(new PresetTableEntry(714.0, 725.1, eBand.e700));
mPairs.Add(new PresetTableEntry(725.2, 736.3, eBand.e700));
mPairs.Add(new PresetTableEntry(736.4, 747.5, eBand.e700));
Expand Down
2 changes: 1 addition & 1 deletion RFEOnSite/RFEOnSite.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
<MinimumRequiredVersion>1.3.2.0</MinimumRequiredVersion>
<CreateWebPageOnPublish>true</CreateWebPageOnPublish>
<WebPage>publish.htm</WebPage>
<ApplicationRevision>7</ApplicationRevision>
<ApplicationRevision>12</ApplicationRevision>
<ApplicationVersion>2.2.0.%2a</ApplicationVersion>
<UseApplicationTrust>false</UseApplicationTrust>
<CreateDesktopShortcut>true</CreateDesktopShortcut>
Expand Down

0 comments on commit 19cfbaf

Please sign in to comment.