subject

The Problem The city of New York provides a monthly detailed listing of taxi rides within the five boroughs. Your assignment is to read in an extract of the destinations, which are provided in latitude and longitude. Each destination should be plotted as a point on a gray scale bit map.
Since many trips will be to the same destination, the output could be in heat map format, where each pixel is coded brighter if it is visited many times, and set to zero (black) if it is not a destination. However, for this lab assignment, only set the pixel to black or white.
Write a program based on exercise 1 to read in the file of destinations and plot them on a bit map. The dimensions should be 1024 by 1024 pixels. The background color should be black. The center point of the plot area should be latitude 40.765482, longitude -73.980006. (This the corner of 7th Avenue and West 57th Street, i. e. Carnegie Hall.) The southern boundary should be roughly 40.700455 and the northern boundary should be roughly 40.830509. The eastern and western boundaries will be proportionate to these.
The processing steps are basically (in C++):
Create a character array, 1024 by 1024 entries.
Open the input file.
Read in data. You will have to decide how much. Each longitude and latitude point will comprise two float values.
Validate that the longitude and latitude are within the bounds of the bit map. This step must be done in x87 assembly (use in inline assembly i. e. __asm {//insert code here})
Convert the longitude and latitude to a position within the bit map. This step must be done in x87 assembly.
Set that position to 255. This step must be done in x87 assembly.
At the end of the input, write out the bit map headers, color map, and the bit map array itself.
End the program.
Notes
Your input will be a binary file (https://www. dropbox. com/s/dhe2s9dd3cnysu9/L2Data10K. dat?dl=0)
You can read in more than two floats at a time from the input file.
The bit map will use a Mercator projection, so no adjustment of the longitude value will be needed.
To convert latitude to a bit position, subtract the bottom boundary from it, then divide by the latitude range of the bit map (top minus bottom), then multiply it by the vertical dimension of the bit map in pixels. So, for:
40.748418 (latitude of the Empire State Building)
a. subtract the bottom boundary: 40.748418 - 40.700455 = 0.047963
b. divide by the latitude range of the bit map: 0.047963 / (40.830509 - 40.700455) = 0.047963 / 0.130054 = 0.3687929...
c. multiply that quotient by the vertical dimension in pixels: 0.3687929 * 1024 = 377.64 = 378.
Follow a similar process for the longitude. Remember that west longitudes are expressed as negative numbers, with the absolute value of the number growing larger the further west the point, up to a maximum of 180.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:30
Choose the best explanation for the following statement communication is symbolic
Answers: 3
question
Computers and Technology, 22.06.2019 18:10
How can i delete permalinks from a word press site?
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Jason works as an accountant in a department store. he needs to keep a daily record of all the invoices issued by the store. which file naming convention would him the most?
Answers: 2
question
Computers and Technology, 23.06.2019 16:00
What is the biggest difference between section breaks and regular page breaks? section breaks are more difficult to add than page breaks. section breaks make it easier for you to view the document as an outline. section breaks allow you to have areas of the document with different formatting. section breaks are smaller than regular page breaks.
Answers: 2
You know the right answer?
The Problem The city of New York provides a monthly detailed listing of taxi rides within the five...
Questions
question
Mathematics, 26.04.2021 21:50
question
Mathematics, 26.04.2021 21:50